class
#include <nCine/Graphics/Geometry.h>
Geometry Contains geometric data for a drawable node.
Constructors, destructors, conversion operators
Public functions
- auto primitiveType() const -> GLenum
- Returns the primitive type (
GL_TRIANGLES
,GL_TRIANGLE_STRIP
, ...) - auto firstVertex() const -> GLint
- Returns the index of the first vertex to draw.
- auto numVertices() const -> GLsizei
- Returns the number of vertices.
- auto numElementsPerVertex() const -> unsigned int
- Returns the number of float elements that composes the vertex format.
- void setDrawParameters(GLenum primitiveType, GLint firstVertex, GLsizei numVertices)
- Sets all three drawing parameters.
- void setPrimitiveType(GLenum primitiveType)
- Sets the primitive type (
GL_TRIANGLES
,GL_TRIANGLE_STRIP
, ...) - void setFirstVertex(GLint firstVertex)
- Sets the index number of the first vertex to draw.
- void setNumVertices(GLsizei numVertices)
- Sets the number of vertices.
- void setNumElementsPerVertex(unsigned int numElements)
- Sets the number of float elements that composes the vertex format.
- void createCustomVbo(unsigned int numFloats, GLenum usage)
- Creates a custom VBO that is unique to this
Geometry
object. - auto acquireVertexPointer(unsigned int numFloats, unsigned int numFloatsAlignment) -> GLfloat*
- Retrieves a pointer that can be used to write vertex data from a custom VBO owned by this object.
- auto acquireVertexPointer(unsigned int numFloats) -> GLfloat*
- Retrieves a pointer that can be used to write vertex data from a custom VBO owned by this object.
- auto acquireVertexPointer() -> GLfloat*
- Retrieves a pointer that can be used to write vertex data from a VBO owned by the buffers manager.
- void releaseVertexPointer()
- Releases the pointer used to write vertex data.
- auto hostVertexPointer() const -> const float*
- Returns a pointer into host memory containing vertex data to be copied into a VBO.
- void setHostVertexPointer(const float* vertexPointer)
- Sets a pointer into host memory containing vertex data to be copied into a VBO.
- void shareVbo(const Geometry* geometry)
- Shares the VBO of another
Geometry
object. - auto numIndices() const -> unsigned int
- Returns the number of indices used to render the geometry.
- void setFirstIndex(GLushort firstIndex)
- Sets the index number of the first index to draw.
- void setNumIndices(unsigned int numIndices)
- Sets the number of indices used to render the geometry.
- void createCustomIbo(unsigned int numIndices, GLenum usage)
- Creates a custom IBO that is unique to this
Geometry
object. - auto acquireIndexPointer(unsigned int numIndices) -> GLushort*
- Retrieves a pointer that can be used to write index data from a custom IBO owned by this object.
- auto acquireIndexPointer() -> GLushort*
- Retrieves a pointer that can be used to write index data from a IBO owned by the buffers manager.
- void releaseIndexPointer()
- Releases the pointer used to write index data.
- auto hostIndexPointer() const -> const GLushort*
- Returns a pointer into host memory containing index data to be copied into a IBO.
- void setHostIndexPointer(const GLushort* indexPointer)
- Sets a pointer into host memory containing index data to be copied into a IBO.
- void shareIbo(const Geometry* geometry)
- Shares the IBO of another
Geometry
object.
Function documentation
GLfloat* nCine:: Geometry:: acquireVertexPointer(unsigned int numFloats,
unsigned int numFloatsAlignment)
Retrieves a pointer that can be used to write vertex data from a custom VBO owned by this object.
This overloaded version allows a custom alignment specification