Visualization Library 2.0.0-b3

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | List of all members
vl::DrawElementsUShort Class Reference

See DrawElements. More...

#include <DrawElements.hpp>

+ Inheritance diagram for vl::DrawElementsUShort:

Public Member Functions

 DrawElementsUShort (EPrimitiveType primitive=PT_TRIANGLES, int instances=1)
 
- Public Member Functions inherited from vl::DrawElements< ArrayUShort1 >
virtual unsigned int primitiveRestartIndex ()
 Returns the primitive restart index used by the draw call or 0 if primitive restart is not supported. More...
 
 DrawElements (EPrimitiveType primitive=PT_TRIANGLES, int instances=1)
 Constructor. More...
 
DrawElementsoperator= (const DrawElements &other)
 Assign operator. More...
 
virtual ref< DrawCallclone () const
 Returns a clone of this DrawCall. More...
 
void setCount (i32 count)
 The number of indices to render, default is -1 which means 'till the end of the indexBuffer() from offset()'. More...
 
i32 count () const
 The number of indices to render, default is -1 which means 'till the end of the indexBuffer() from offset()'. More...
 
void setOffset (u32 offset)
 The offset in bytes from which the index buffer will be read. More...
 
u32 offset () const
 The offset in bytes from which the index buffer will be read. More...
 
void setIndexBuffer (ArrayUShort1 *index_buffer)
 The BufferObject containing the indices used to render. More...
 
ArrayUShort1indexBuffer ()
 The BufferObject containing the indices used to render. More...
 
const ArrayUShort1indexBuffer () const
 The BufferObject containing the indices used to render. More...
 
virtual void updateDirtyBufferObject (EBufferObjectUpdateMode mode)
 Updates the index buffer's BufferObject if marked as dirty. More...
 
virtual void deleteBufferObject ()
 Deletes the index buffer's BufferObject. More...
 
virtual void render (bool use_bo) const
 Executes the draw call. More...
 
TriangleIterator triangleIterator () const
 Returns a TriangleIterator used to iterate through the triangles of a DrawCall. More...
 
IndexIterator indexIterator () const
 Returns a IndexIterator used to iterate through the virtual indices of a DrawCall. More...
 
- Public Member Functions inherited from vl::DrawElementsBase
virtual bool primitiveRestartEnabled () const
 Returns whether the primitive-restart functionality is enabled or not (requires OpenGL 3.1). More...
 
void setPrimitiveRestartEnabled (bool enabled)
 Enables the primitive-restart functionality (requires OpenGL 3.1). More...
 
void setInstances (int instances)
 Sets the number of instances for this set of primitives. More...
 
int instances () const
 Returns the number of instances for this set of primitives. More...
 
void setBaseVertex (int base_vertex)
 If base_vertx is != 0 glDrawElementsBaseVertex/glDrawElementsInstancedBaseVertex will be used instead of their non *BaseVertx counterparts. More...
 
int baseVertex () const
 Returns the currently used base vertex. More...
 
- Public Member Functions inherited from vl::DrawCall
 DrawCall ()
 Constructor. More...
 
DrawCalloperator= (const DrawCall &other)
 Assignment operator. More...
 
void setPrimitiveType (EPrimitiveType type)
 Sets the draw call's primitive type. More...
 
EPrimitiveType primitiveType () const
 Returns the draw call's primitive type. More...
 
void setEnabled (bool enable)
 Enables/disables the draw call. More...
 
bool isEnabled () const
 True if the draw call is enabled. More...
 
u32 countIndices () const
 Counts the number of virtual indices of a DrawCall., i.e. More...
 
u32 countTriangles () const
 Counts the number of virtual triangles of a DrawCall., i.e. More...
 
void setPatchParameter (PatchParameter *patch_param)
 Attach a PatchParameter to a DrawCall to be used when using primitive-type PT_PATCHES. More...
 
PatchParameterpatchParameter ()
 The PatchParameter attached to a DrawCall to be used when using primitive-type PT_PATCHES. More...
 
const PatchParameterpatchParameter () const
 The PatchParameter attached to a DrawCall to be used when using primitive-type PT_PATCHES. More...
 
- Public Member Functions inherited from vl::Object
 Object ()
 Constructor. More...
 
 Object (const Object &other)
 Copy constructor: copies the name, ref count mutex and user data. More...
 
Objectoperator= (const Object &other)
 Copy operator: copies the object's name, ref count mutex and user data. More...
 
const std::string & objectName () const
 The name of the object, by default set to the object's class name. More...
 
void setObjectName (const char *name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setObjectName (const std::string &name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setRefCountMutex (IMutex *mutex)
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
IMutexrefCountMutex ()
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
const IMutexrefCountMutex () const
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
int referenceCount () const
 Returns the number of references of an object. More...
 
void incReference () const
 Increments the reference count of an object. More...
 
void decReference ()
 Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More...
 
void setAutomaticDelete (bool autodel_on)
 If set to true the Object is deleted when its reference count reaches 0. More...
 
bool automaticDelete () const
 If set to true the Object is deleted when its reference count reaches 0. More...
 
template<class T >
T * as ()
 Casts an Object to the specified class. More...
 
template<class T >
const T * as () const
 Casts an Object to the specified class. More...
 

Additional Inherited Members

- Public Types inherited from vl::DrawElements< ArrayUShort1 >
typedef ArrayUShort1 ::scalar_type index_type
 
- Static Public Attributes inherited from vl::DrawElements< ArrayUShort1 >
static const index_type primitive_restart_index
 The special index which identifies a primitive restart. By default it is set to ~0 that is 0xFF, 0xFFFF, 0xFFFFFFFF respectively for GLubyte, GLushort, GLuint index types. */. More...
 
- Protected Member Functions inherited from vl::DrawCall
void applyPatchParameters () const
 
- Protected Member Functions inherited from vl::Object
virtual ~Object ()
 
- Protected Attributes inherited from vl::DrawElements< ArrayUShort1 >
ref< ArrayUShort1mIndexBuffer
 
i32 mCount
 
u32 mOffset
 
- Protected Attributes inherited from vl::DrawElementsBase
int mInstances
 
bool mPrimitiveRestartEnabled
 
GLuint mBaseVertex
 
- Protected Attributes inherited from vl::DrawCall
ref< PatchParametermPatchParameter
 
EPrimitiveType mType
 
bool mEnabled
 
- Protected Attributes inherited from vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Detailed Description

See DrawElements.

A DrawElements using indices of type GLushort.

Definition at line 388 of file DrawElements.hpp.

Constructor & Destructor Documentation

◆ DrawElementsUShort()

vl::DrawElementsUShort::DrawElementsUShort ( EPrimitiveType  primitive = PT_TRIANGLES,
int  instances = 1 
)
inline

Definition at line 393 of file DrawElements.hpp.


The documentation for this class was generated from the following file: