Class DrawableVBO2
- java.lang.Object
-
- org.jzy3d.plot3d.primitives.Drawable
-
- org.jzy3d.plot3d.primitives.Wireframeable
-
- org.jzy3d.plot3d.primitives.vbo.drawable.DrawableVBO2
-
- All Implemented Interfaces:
IGLBindedResource
,IGLRenderer
,ISortableDraw
public class DrawableVBO2 extends Wireframeable implements IGLBindedResource
ADrawableVBO2
is able to efficiently draw a large collection of geometries.Effect of repeated vertices
Repeated vertices make all vertice normal being processed with the only three vertices of a triangle. A collection of neighbour triangles hence have normals producing sharp light reaction as bellow.Shared vertices between triangles based on element index
Sharing vertices among triangles avoid repeating data, and also allows knowing all surrounding triangles to a point, hence allowing to compute a normal based on the mean of all triangles normal. This produce a smooth light reaction at the triangle edges.Not processing normals in java
Is faster and yield to this light reaction.Using a colormap
Initializing DrawableVBO2
AWTChartFactory f = new AWTChartFactory(); Chart chart = f.newChart(Quality.Intermediate()); int dimensions = TestMesh.DIMENSIONS; double[] vertices = TestMesh.makeArray4(); int[] elements = TestMesh.makeElementArray4(); int nVertices = TestMesh.nVertices(vertices); DrawableVBO2 vbo = new DrawableVBO2(vertices, dimensions, elements, null); chart.add(vbo); chart.open();
-
-
Field Summary
Fields Modifier and Type Field Description protected Color
color
Default flat color for the complete geometryprotected int[]
colorArrayIds
protected int
colorChannels
number of channels per color, 3 for {r,g,b}, 4 for {r,g,b,a}protected FloatBuffer
colors
The (direct) float buffer storing colors in GPU.protected boolean
computeNormals
protected boolean
debug
protected int[]
elementArrayIds
protected IntBuffer
elements
The (non-mandatory) int buffer storing geometry indices in GPU.protected IntBuffer
elementsCount
The (non-mandatory) int buffer storing geometry indices in GPU.protected com.jogamp.common.nio.PointerBuffer
elementsIndices
protected int
elementSize
Number of element (geometries) in the element buffer.protected IntBuffer
elementsLength
protected IntBuffer
elementsStarts
The (non-mandatory) int buffer storing geometry indices in GPU.protected int
firstCoordOffset
protected static int
GEOMETRY_SIZE
number of vertext per geometry, 3 for triangles, 4 for quadsprotected int
glGeometryType
store the Geometry type in OpenGL, GL_TRIANGLES, GL_POLYGONS, etcprotected boolean
hasColorBuffer
protected boolean
hasMountedOnce
protected boolean
hasNormalInVertexArray
protected IGLLoader<DrawableVBO2>
loader
protected static org.apache.logging.log4j.Logger
log
protected int[]
normalArrayIds
protected Normal.NormalMode
normalMode
Should be true AND the element array provided to be able to process averaged normal.protected int
normalOffset
Byte shift between to access a vertice normal in the vertex buffer.protected FloatBuffer
normals
The (direct) float buffer storing normals in GPU.static int
PRIMITIVE_RESTART_VALUE
Primitive restart is NOT working for now.protected boolean
primitiveRestart
protected static int
QUAD_SIZE
protected static int
TRIANGLE_SIZE
static int
VERTEX_DIMENSIONS
number of dimensions for vertex, 3 for {x,y,z}protected int[]
vertexArrayIds
protected int
vertexOffset
Byte shift between two vertices in the vertex buffer.protected FloatBuffer
vertices
The (direct) float buffer storing vertices in GPU.protected int
verticesPerGeometry
number of vertex per geometry-
Fields inherited from class org.jzy3d.plot3d.primitives.Wireframeable
depthFunctionChangeForWireframe, faceDisplayed, materialAmbiantReflection, materialDiffuseReflection, materialEmission, materialShininess, materialSpecularReflection, NO_OVERLAP_DEPTH_RATIO, polygonOffsetFactor, polygonOffsetFillEnable, polygonOffsetUnit, polygonWireframeDepthTrick, reflectLight, wireframeColor, wireframeColorFromPolygonPoints, wireframeDisplayed, wireframeWidth, wireframeWithLineLoop
-
Fields inherited from class org.jzy3d.plot3d.primitives.Drawable
bbox, boundingBoxColor, boundingBoxDisplayed, displayed, hasListeners, legend, legendDisplayed, listeners, spaceTransformer, transform, transformBefore
-
-
Constructor Summary
Constructors Constructor Description DrawableVBO2(float[] points, int pointDimensions)
Initialize a VBO object with arrays with no colormap and no vertex sharing scheme.DrawableVBO2(float[] points, int[][] elementIndices, float[] colors)
DrawableVBO2(float[] points, int[][] elementIndices, float[] colors, float[] normals)
DrawableVBO2(float[] points, int[][] elementIndices, float[] colors, Normal.NormalMode normalMode)
DrawableVBO2(float[] points, int[] elementStart, int[] elementLength, float[] colors)
DrawableVBO2(float[] points, int[] elements, int elementSize, float[] colors)
DrawableVBO2(float[] points, int pointDimensions, int[] elements)
Initialize a VBO object with arrays with no colormap.DrawableVBO2(float[] points, int pointDimensions, int[][] elementIndices, float[] colors)
DrawableVBO2(float[] points, int pointDimensions, int[] elementStart, int[] elementLength, float[] colors)
DrawableVBO2(float[] points, int pointDimensions, int[] elements, int elementSize, float[] colors)
This constructor will only work correctly for triangle geometry.DrawableVBO2(float[] points, int pointDimensions, int[] elements, IColorMap colormap)
Initialize a VBO object with arrays with the following content.DrawableVBO2(float[] points, int pointDimensions, int[] elements, IColorMap colormap, Normal.NormalMode normalMode)
DrawableVBO2(float[] points, int pointDimensions, IColorMap colormap)
Initialize a VBO object with arrays with a colormap but no vertex sharing scheme.DrawableVBO2(List<Polygon> polygons)
Build a VBO out of simple polygons.DrawableVBO2(IGLLoader<DrawableVBO2> loader)
Initialize a VBO object with a customizable loader.DrawableVBO2(Composite composite)
Build a VBO out of a composite made of simple polygons.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyGeometryTransform(Transform transform)
protected void
applyPrimitiveRestartIfEnabled(com.jogamp.opengl.GL gl)
Experimental - not working yet How it should workprotected void
debugMultiDrawArray()
protected void
debugMultiDrawElements()
protected void
doDrawElements(IPainter painter)
Perform rendering of this VBO.protected void
doDrawGeometries(com.jogamp.opengl.GL2 gl2)
Actually do draw by applying the GL geometry defined byglGeometryType
.void
draw(IPainter painter)
Call OpenGL2 routines for rendering the object.static DrawableVBO2
fromComposites(List<Composite> composites)
Build a VBO out of a list of composites made of simple polygons.Color
getColor()
int[]
getColorArrayIds()
int
getColorChannels()
FloatBuffer
getColors()
int[]
getElementArrayIds()
IntBuffer
getElements()
IntBuffer
getElementsCount()
com.jogamp.common.nio.PointerBuffer
getElementsIndices()
IntBuffer
getElementsLength()
IntBuffer
getElementsStarts()
protected com.jogamp.opengl.GL
getGL(IPainter painter)
int
getGLGeometryType()
int[]
getNormalArrayIds()
FloatBuffer
getNormals()
int[]
getVertexArrayIds()
FloatBuffer
getVertices()
int
getVerticesPerGeometry()
boolean
hasMountedOnce()
Return true if mount(...) has been called at least one timeboolean
hasNormalInVertexArray()
boolean
isComputeNormals()
boolean
isHasColorBuffer()
boolean
isPrimitiveRestart()
Kept for prototyping, but not supported for nowstatic IGLLoader<DrawableVBO2>
makeLoader(float[] points, int elementSize)
static IGLLoader<DrawableVBO2>
makeLoader(float[] points, int pointDimensions, int[][] elementIndices, float[] colors, float[] normals)
static IGLLoader<DrawableVBO2>
makeLoader(float[] points, int pointDimensions, int[][] elementIndices, float[] colors, Normal.NormalMode perVertex)
static IGLLoader<DrawableVBO2>
makeLoader(float[] points, int pointDimensions, int[] elementStart, int[] elementLength, float[] coloring, Normal.NormalMode normalMode)
static IGLLoader<DrawableVBO2>
makeLoader(float[] points, int pointDimensions, int[] elements, int elementSize, IColorMap colormap, float[] coloring, Normal.NormalMode normalMode)
static VBOBufferLoaderForPolygons
makeLoader(List<Polygon> polygons, int verticesPerGeometry)
void
mount(IPainter painter)
Invoke the loader.protected void
registerColors(com.jogamp.opengl.GL gl, FloatBuffer newColors)
protected void
registerElements(com.jogamp.opengl.GL gl, IntBuffer newElements)
protected void
registerNormals(com.jogamp.opengl.GL gl, FloatBuffer newNormals)
protected void
registerVertexAndNormalOffsets()
protected void
registerVertices(com.jogamp.opengl.GL gl, FloatBuffer newVertices)
void
setColor(Color color)
void
setColorChannels(int colorChannels)
void
setColors(float[] colors)
Set the next color buffer to apply to this VBO.void
setComputeNormals(boolean computeNormals)
If false, normals are not computed and light processing might depend on GPU capabilitiesvoid
setData(IPainter painter, FloatBuffer vertices, FloatBuffer normals, FloatBuffer colors, BoundingBox3d bounds)
void
setData(IPainter painter, IntBuffer elementsCount, com.jogamp.common.nio.PointerBuffer elementsIndices, FloatBuffer vertices, FloatBuffer normals, FloatBuffer colors, BoundingBox3d bounds)
void
setData(IPainter painter, IntBuffer elements, FloatBuffer vertices, FloatBuffer normals, FloatBuffer colors, BoundingBox3d bounds)
Configure a VBO with vertices, colors, and indices describing vertex references for building triangles.void
setData(IPainter painter, IntBuffer elementsStarts, IntBuffer elementsLength, FloatBuffer vertices, FloatBuffer normals, FloatBuffer colors, BoundingBox3d bounds)
void
setGLGeometryType(int glGeometryType)
void
setHasColorBuffer(boolean hasColorBuffer)
void
setHasNormalInVertexArray(boolean hasNormal)
void
setPrimitiveRestart(boolean primitiveRestart)
Kept for prototyping, but not supported for now.void
setVerticesPerGeometry(int geometrySize)
void
updateBounds()
-
Methods inherited from class org.jzy3d.plot3d.primitives.Wireframeable
applyDepthRangeDefault, applyDepthRangeForOverlying, applyDepthRangeForUnderlying, applyMaterial, doDrawBoundsIfDisplayed, getMaterialAmbiantReflection, getMaterialDiffuseReflection, getMaterialEmission, getMaterialShininess, getMaterialSpecularReflection, getPolygonOffsetFactor, getPolygonOffsetUnit, getWireframeColor, getWireframeWidth, isFaceDisplayed, isPolygonOffsetFillEnable, isPolygonWireframeDepthTrick, isReflectLight, isWireframeColorFromPolygonPoints, isWireframeDisplayed, polygonOffsetFillDisable, polygonOffsetFillEnable, polygonOffsetLineDisable, polygonOffsetLineEnable, setFaceDisplayed, setMaterialAmbiantReflection, setMaterialDiffuseReflection, setMaterialEmission, setMaterialShininess, setMaterialSpecularReflection, setPolygonOffsetFactor, setPolygonOffsetFillEnable, setPolygonOffsetUnit, setPolygonWireframeDepthTrick, setReflectLight, setWireframeColor, setWireframeColorFromPolygonPoints, setWireframeDisplayed, setWireframeWidth
-
Methods inherited from class org.jzy3d.plot3d.primitives.Drawable
addDrawableListener, asWireframeable, dispose, doTransform, fireDrawableChanged, fireDrawableChanged, getBarycentre, getBoundingBoxColor, getBounds, getDistance, getLegend, getLongestDistance, getShortestDistance, getSpaceTransformer, getTransform, getTransformBefore, hasLegend, isBoundingBoxDisplayed, isDisplayed, isLegendDisplayed, removeDrawableListener, setBoundingBoxColor, setBoundingBoxDisplayed, setDisplayed, setLegend, setLegendDisplayed, setSpaceTransformer, setTransform, setTransformBefore, toString, toString
-
-
-
-
Field Detail
-
log
protected static org.apache.logging.log4j.Logger log
-
PRIMITIVE_RESTART_VALUE
public static int PRIMITIVE_RESTART_VALUE
Primitive restart is NOT working for now. Kept here for further debugging https://forum.jogamp.org/Using-glPrimitiveRestartIndex-to-declare-multiple-geometries-in-the-same-VBO-td4041307.html
-
loader
protected IGLLoader<DrawableVBO2> loader
-
hasNormalInVertexArray
protected boolean hasNormalInVertexArray
-
primitiveRestart
protected boolean primitiveRestart
-
debug
protected boolean debug
-
computeNormals
protected boolean computeNormals
-
vertices
protected FloatBuffer vertices
The (direct) float buffer storing vertices in GPU. If none of the non mandatory element buffer are defined, will render withGL#glDrawArrays()
-
normals
protected FloatBuffer normals
The (direct) float buffer storing normals in GPU.
-
colors
protected FloatBuffer colors
The (direct) float buffer storing colors in GPU.
-
elements
protected IntBuffer elements
The (non-mandatory) int buffer storing geometry indices in GPU. If defined, will render withGL#glDrawElements()
-
elementsStarts
protected IntBuffer elementsStarts
The (non-mandatory) int buffer storing geometry indices in GPU. If defined, will render withGL#glMultiDrawArrays
-
elementsLength
protected IntBuffer elementsLength
-
elementsCount
protected IntBuffer elementsCount
The (non-mandatory) int buffer storing geometry indices in GPU. If defined, will render withGL#glMultiDrawElements
-
elementsIndices
protected com.jogamp.common.nio.PointerBuffer elementsIndices
-
vertexOffset
protected int vertexOffset
Byte shift between two vertices in the vertex buffer.
-
normalOffset
protected int normalOffset
Byte shift between to access a vertice normal in the vertex buffer.
-
elementSize
protected int elementSize
Number of element (geometries) in the element buffer.
-
firstCoordOffset
protected int firstCoordOffset
-
colorArrayIds
protected int[] colorArrayIds
-
vertexArrayIds
protected int[] vertexArrayIds
-
normalArrayIds
protected int[] normalArrayIds
-
elementArrayIds
protected int[] elementArrayIds
-
hasMountedOnce
protected boolean hasMountedOnce
-
QUAD_SIZE
protected static int QUAD_SIZE
-
TRIANGLE_SIZE
protected static int TRIANGLE_SIZE
-
GEOMETRY_SIZE
protected static int GEOMETRY_SIZE
number of vertext per geometry, 3 for triangles, 4 for quads
-
VERTEX_DIMENSIONS
public static int VERTEX_DIMENSIONS
number of dimensions for vertex, 3 for {x,y,z}
-
verticesPerGeometry
protected int verticesPerGeometry
number of vertex per geometry
-
colorChannels
protected int colorChannels
number of channels per color, 3 for {r,g,b}, 4 for {r,g,b,a}
-
glGeometryType
protected int glGeometryType
store the Geometry type in OpenGL, GL_TRIANGLES, GL_POLYGONS, etc
-
hasColorBuffer
protected boolean hasColorBuffer
-
color
protected Color color
Default flat color for the complete geometry
-
normalMode
protected Normal.NormalMode normalMode
Should be true AND the element array provided to be able to process averaged normal. If any of these two conditions is not fullfilled, then one normal per point is computed.
-
-
Constructor Detail
-
DrawableVBO2
public DrawableVBO2(float[] points, int pointDimensions)
Initialize a VBO object with arrays with no colormap and no vertex sharing scheme. The object has a uniform color given bysetColor(Color)
. When using aLight
, the object will have edges looking sharp as shown on the picture below. One can obtain smoother edges by avoiding vertex repetitions and instead define an element array indicating which unique vertex should be used in each triangle. See {@link DrawableVBO2(double[], int, int[]).- See Also:
constructor for detailed arguments.
-
DrawableVBO2
public DrawableVBO2(float[] points, int pointDimensions, IColorMap colormap)
Initialize a VBO object with arrays with a colormap but no vertex sharing scheme.- See Also:
constructor for detailed arguments.
-
DrawableVBO2
public DrawableVBO2(float[] points, int pointDimensions, int[] elements, IColorMap colormap)
Initialize a VBO object with arrays with the following content.- Parameters:
points
- contains an array of vertices[x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4, ..]
pointDimensions
- indicate the number of dimension in the array for each vertex, as the input array may contain extra dimensions for each vertex, e.g. [x1, y1, z1, m1, x2, y2, z2, m2, ...]elements
- contains reference to points that may be used in several elements. E.g. the array[1, 3, 2, 4, 3, 2, ...]
indicates that the two first triangles are sharing vertices 3 and 2. This assume the user of this class is aware that this class will build triangles made of 3 vertices each. It may be null, in that case thepoints
array will be drawn as a sequence of vertices defining elements, without sharing vertices between elements.colormap
- defines how to color vertices. It may be null, in that case the object is colored bysetColor(Color)
adn shaded byLight
-
DrawableVBO2
public DrawableVBO2(float[] points, int pointDimensions, int[] elements)
Initialize a VBO object with arrays with no colormap. The object has a uniform color given bysetColor(Color)
. Providing an element array allows defining which points form a triangle without having to repeat these points. When such constructor is used, shared vertices allow computing shared normals for each point, hence each point normal is computed as a mean of the normals of all triangles that share this point. The result is smoother light transition between polygons, which differ from the light transition of repeated-vertex schemes as processed when the element array is null (or when invokingDrawableVBO2(double[], int)
- See Also:
constructor for detailed arguments.
-
DrawableVBO2
public DrawableVBO2(float[] points, int pointDimensions, int[] elements, IColorMap colormap, Normal.NormalMode normalMode)
-
DrawableVBO2
public DrawableVBO2(float[] points, int pointDimensions, int[] elements, int elementSize, float[] colors)
This constructor will only work correctly for triangle geometry. The elementSize parameter is mainly used for processing normals. If one wish to draw multiple polygons of 4 or more point, then use a loader suitable for this.- Parameters:
points
-pointDimensions
-elements
-elementSize
-colors
-
-
DrawableVBO2
public DrawableVBO2(float[] points, int[] elements, int elementSize, float[] colors)
-
DrawableVBO2
public DrawableVBO2(float[] points, int[] elementStart, int[] elementLength, float[] colors)
-
DrawableVBO2
public DrawableVBO2(float[] points, int pointDimensions, int[] elementStart, int[] elementLength, float[] colors)
-
DrawableVBO2
public DrawableVBO2(List<Polygon> polygons)
Build a VBO out of simple polygons. Assume the same number of vertices for all polygons given the list.
-
DrawableVBO2
public DrawableVBO2(Composite composite)
Build a VBO out of a composite made of simple polygons. Assume the same number of vertices for all polygons given the list.
-
DrawableVBO2
public DrawableVBO2(float[] points, int[][] elementIndices, float[] colors)
-
DrawableVBO2
public DrawableVBO2(float[] points, int[][] elementIndices, float[] colors, float[] normals)
-
DrawableVBO2
public DrawableVBO2(float[] points, int[][] elementIndices, float[] colors, Normal.NormalMode normalMode)
-
DrawableVBO2
public DrawableVBO2(float[] points, int pointDimensions, int[][] elementIndices, float[] colors)
-
DrawableVBO2
public DrawableVBO2(IGLLoader<DrawableVBO2> loader)
Initialize a VBO object with a customizable loader.
-
-
Method Detail
-
fromComposites
public static DrawableVBO2 fromComposites(List<Composite> composites)
Build a VBO out of a list of composites made of simple polygons. Assume the same number of vertices for all polygons given the list.
-
makeLoader
public static VBOBufferLoaderForPolygons makeLoader(List<Polygon> polygons, int verticesPerGeometry)
-
makeLoader
public static IGLLoader<DrawableVBO2> makeLoader(float[] points, int pointDimensions, int[][] elementIndices, float[] colors, Normal.NormalMode perVertex)
-
makeLoader
public static IGLLoader<DrawableVBO2> makeLoader(float[] points, int pointDimensions, int[][] elementIndices, float[] colors, float[] normals)
-
makeLoader
public static IGLLoader<DrawableVBO2> makeLoader(float[] points, int pointDimensions, int[] elements, int elementSize, IColorMap colormap, float[] coloring, Normal.NormalMode normalMode)
-
makeLoader
public static IGLLoader<DrawableVBO2> makeLoader(float[] points, int elementSize)
-
makeLoader
public static IGLLoader<DrawableVBO2> makeLoader(float[] points, int pointDimensions, int[] elementStart, int[] elementLength, float[] coloring, Normal.NormalMode normalMode)
-
mount
public void mount(IPainter painter)
Invoke the loader. This is called byGraph
when the application initialize and aGL
context is available for feeding the GPU with arrays.- Specified by:
mount
in interfaceIGLBindedResource
-
hasMountedOnce
public boolean hasMountedOnce()
Description copied from interface:IGLBindedResource
Return true if mount(...) has been called at least one time- Specified by:
hasMountedOnce
in interfaceIGLBindedResource
-
setData
public void setData(IPainter painter, FloatBuffer vertices, FloatBuffer normals, FloatBuffer colors, BoundingBox3d bounds)
-
setData
public void setData(IPainter painter, IntBuffer elements, FloatBuffer vertices, FloatBuffer normals, FloatBuffer colors, BoundingBox3d bounds)
Configure a VBO with vertices, colors, and indices describing vertex references for building triangles. This is supposed to be called by theIGLLoader
whenmount(IPainter)
is invoked. The result is that all non null provided buffers are binded to the GPU.- See Also:
constructor documentation for argument description.
-
setData
public void setData(IPainter painter, IntBuffer elementsStarts, IntBuffer elementsLength, FloatBuffer vertices, FloatBuffer normals, FloatBuffer colors, BoundingBox3d bounds)
-
setData
public void setData(IPainter painter, IntBuffer elementsCount, com.jogamp.common.nio.PointerBuffer elementsIndices, FloatBuffer vertices, FloatBuffer normals, FloatBuffer colors, BoundingBox3d bounds)
-
registerVertexAndNormalOffsets
protected void registerVertexAndNormalOffsets()
-
registerVertices
protected void registerVertices(com.jogamp.opengl.GL gl, FloatBuffer newVertices)
-
registerNormals
protected void registerNormals(com.jogamp.opengl.GL gl, FloatBuffer newNormals)
-
registerColors
protected void registerColors(com.jogamp.opengl.GL gl, FloatBuffer newColors)
-
registerElements
protected void registerElements(com.jogamp.opengl.GL gl, IntBuffer newElements)
-
draw
public void draw(IPainter painter)
Description copied from class:Drawable
Call OpenGL2 routines for rendering the object.- Specified by:
draw
in interfaceIGLRenderer
- Specified by:
draw
in classDrawable
-
doDrawElements
protected void doDrawElements(IPainter painter)
Perform rendering of this VBO.- Parameters:
painter
- holds a GL instance to invoke the GPU.
-
doDrawGeometries
protected void doDrawGeometries(com.jogamp.opengl.GL2 gl2)
Actually do draw by applying the GL geometry defined byglGeometryType
. Either use non indexed mode, simple index mode, or multi-index mode. Expect glPolygonMode to be defined before to define if we are drawing wireframe or filling polygon.
-
applyPrimitiveRestartIfEnabled
protected void applyPrimitiveRestartIfEnabled(com.jogamp.opengl.GL gl)
Experimental - not working yet How it should work
-
isHasColorBuffer
public boolean isHasColorBuffer()
-
setHasColorBuffer
public void setHasColorBuffer(boolean hasColorBuffer)
-
getColor
public Color getColor()
-
setColor
public void setColor(Color color)
-
hasNormalInVertexArray
public boolean hasNormalInVertexArray()
-
setHasNormalInVertexArray
public void setHasNormalInVertexArray(boolean hasNormal)
-
getColorChannels
public int getColorChannels()
-
setColorChannels
public void setColorChannels(int colorChannels)
-
applyGeometryTransform
public void applyGeometryTransform(Transform transform)
- Specified by:
applyGeometryTransform
in classDrawable
-
updateBounds
public void updateBounds()
- Specified by:
updateBounds
in classDrawable
-
getGL
protected com.jogamp.opengl.GL getGL(IPainter painter)
-
getVertices
public FloatBuffer getVertices()
-
getNormals
public FloatBuffer getNormals()
-
getColors
public FloatBuffer getColors()
-
getElements
public IntBuffer getElements()
-
getElementsStarts
public IntBuffer getElementsStarts()
-
getElementsLength
public IntBuffer getElementsLength()
-
getElementsCount
public IntBuffer getElementsCount()
-
getElementsIndices
public com.jogamp.common.nio.PointerBuffer getElementsIndices()
-
getColorArrayIds
public int[] getColorArrayIds()
-
getVertexArrayIds
public int[] getVertexArrayIds()
-
getNormalArrayIds
public int[] getNormalArrayIds()
-
getElementArrayIds
public int[] getElementArrayIds()
-
getGLGeometryType
public int getGLGeometryType()
-
setGLGeometryType
public void setGLGeometryType(int glGeometryType)
-
getVerticesPerGeometry
public int getVerticesPerGeometry()
-
setVerticesPerGeometry
public void setVerticesPerGeometry(int geometrySize)
-
isPrimitiveRestart
public boolean isPrimitiveRestart()
Kept for prototyping, but not supported for now
-
setPrimitiveRestart
public void setPrimitiveRestart(boolean primitiveRestart)
Kept for prototyping, but not supported for now. Do not change this setting. @seeapplyPrimitiveRestartIfEnabled(GL)
-
isComputeNormals
public boolean isComputeNormals()
-
setComputeNormals
public void setComputeNormals(boolean computeNormals)
If false, normals are not computed and light processing might depend on GPU capabilities
-
setColors
public void setColors(float[] colors)
Set the next color buffer to apply to this VBO. The color will be updated at next rendering, which may be forced withChart.render()
.
-
debugMultiDrawElements
protected void debugMultiDrawElements()
-
debugMultiDrawArray
protected void debugMultiDrawArray()
-
-