32 #ifndef DrawArrays_INCLUDE_DEFINE 33 #define DrawArrays_INCLUDE_DEFINE 64 VL_DEBUG_SET_OBJECT_NAME()
72 VL_DEBUG_SET_OBJECT_NAME()
79 super::operator=(other);
101 if (
instances() > 1 && (Has_GL_ARB_draw_instanced||Has_GL_EXT_draw_instanced) )
107 unsigned int glerr = glGetError();
108 if (glerr != GL_NO_ERROR)
111 Log::error(
Say(
"glGetError() [%s:%n]: %s\n") << __FILE__ << __LINE__ << msg );
112 Log::warning(
"- If you are using geometry instancing in conjunction with display lists you will have to disable one of them.\n" );
113 Log::warning(
"- If you are using OpenGL ES you must NOT use GL_QUADS, GL_QUAD_STRIP and GL_POLYGON primitive types.\n" );
A simple String formatting class.
static void warning(const String &message)
Use this function to provide information about situations that might lead to errors or loss of data...
The String class implements an advanced UTF16 (Unicode BMP) string manipulation engine.
DrawArrays & operator=(const DrawArrays &other)
DrawArrays(EPrimitiveType primitive, int start, int count, int instances=1)
static void error(const String &message)
Use this function to provide information about run-time errors: file not found, out of memory...
#define VL_INSTRUMENT_CLASS(ClassName, BaseClass)
virtual void deleteBufferObject()
Deletes the index buffer's BufferObject.
Visualization Library main namespace.
void initialize(IndexIteratorAbstract *iterator)
void applyPatchParameters() const
void setStart(int start)
sets the starting vertex for the rendering.
void setCount(int count)
sets the number of vertices to be rendered.
virtual void render(bool) const
Executes the draw call.
int count() const
returns the number of vertices to be rendered.
Index iterator operating used by DrawArrays.
Iterator used to extract the indices of every single triangle of a DrawCall regardless of the primiti...
IndexIterator indexIterator() const
Returns a IndexIterator used to iterate through the virtual indices of a DrawCall.
VLGRAPHICS_EXPORT const char * getGLErrorString(int err)
Returns a readable string corresponding to the given OpenGL error code as returned by glGetError() ...
The base class of DrawArrays, DrawElements, MultiDrawElements and DrawRangeElements.
virtual ref< DrawCall > clone() const
Returns a clone of the draw call.
The ref<> class is used to reference-count an Object.
int start() const
returns the starting vertex for the rendering.
void setInstances(int instances)
Sets the number of instances for this set of primitives.
int instances() const
Returns the number of instances for this set of primitives.
Wraps a IndexIteratorAbstract to iterate over the indices of a DrawCall.
EPrimitiveType primitiveType() const
Returns the draw call's primitive type.
Wraps the OpenGL function glDrawArrays().
TriangleIterator triangleIterator() const
Returns a TriangleIterator used to iterate through the triangles of a DrawCall.
virtual void updateDirtyBufferObject(EBufferObjectUpdateMode)
Updates the index buffer's BufferObject if marked as dirty.