public interface JCGLDrawType
Modifier and Type | Method and Description |
---|---|
void |
draw(JCGLPrimitives p,
int first,
int count)
Draw
count - 1 primitives of type p , starting at element
first , taking the data from each currently active vertex
attribute. |
void |
drawElements(JCGLPrimitives p)
Draw primitives of type
p , taking the data from each currently
active vertex attribute using elements taken from the currently bound index
buffer. |
void |
drawElementsInstanced(JCGLPrimitives p,
int instances)
Draw
instances copies of primitives of type p , taking
the data from each currently active vertex attribute using elements taken
from the currently bound index buffer. |
void |
drawInstanced(JCGLPrimitives p,
int first,
int count,
int instances)
Draw
instances copies of count - 1 primitives of type
p , starting at element first , taking the data from each
currently active vertex attribute. |
void draw(JCGLPrimitives p, int first, int count) throws JCGLException
count - 1
primitives of type p
, starting at element
first
, taking the data from each currently active vertex
attribute.p
- The type of primitivesfirst
- The first elementcount
- The number of primitivesJCGLException
- On OpenGL errorsJCGLArrayObjectsType
void drawInstanced(JCGLPrimitives p, int first, int count, int instances) throws JCGLException
Draw instances
copies of count - 1
primitives of type
p
, starting at element first
, taking the data from each
currently active vertex attribute.
Implementations use the OpenGL instancing API internally to implement
this method. For the sake of explanation, the OpenGL API makes this
function morally equivalent to calling draw(JCGLPrimitives, int,
int)
in a loop instances
times.
p
- The type of primitivesfirst
- The first elementcount
- The number of primitivesinstances
- The number of instancesJCGLException
- On OpenGL errorsJCGLArrayObjectsType
void drawElements(JCGLPrimitives p) throws JCGLException, JCGLExceptionBufferNotBound
p
, taking the data from each currently
active vertex attribute using elements taken from the currently bound index
buffer.p
- The type of primitivesJCGLException
- On OpenGL errorsJCGLExceptionBufferNotBound
- If no index buffer is currently boundJCGLArrayObjectsType
void drawElementsInstanced(JCGLPrimitives p, int instances) throws JCGLException, JCGLExceptionBufferNotBound
Draw instances
copies of primitives of type p
, taking
the data from each currently active vertex attribute using elements taken
from the currently bound index buffer.
Implementations use the OpenGL instancing API internally to implement
this method. For the sake of explanation, the OpenGL API makes this
function morally equivalent to calling
drawElements(JCGLPrimitives)
in a loop instances
times.
p
- The type of primitivesinstances
- The number of instancesJCGLException
- On OpenGL errorsJCGLExceptionBufferNotBound
- If no index buffer is currently boundJCGLArrayObjectsType
Copyright © 2017 <code@io7m.com> http://io7m.com