Hymn to Beauty
C++ 3D Engine
Video::OpenGLGeometryBinding Class Reference

OpenGL implementation of GeometryBinding. More...

#include <OpenGLGeometryBinding.hpp>

Inheritance diagram for Video::OpenGLGeometryBinding:
Video::GeometryBinding

Public Member Functions

 OpenGLGeometryBinding (const VertexDescription *vertexDescription, const Buffer *vertexBuffer, IndexType indexType=IndexType::NONE, const Buffer *indexBuffer=nullptr)
 Create new OpenGL geometry binding. More...
 
 ~OpenGLGeometryBinding () final
 Destructor. More...
 
GLuint GetVertexArray () const
 Get the vertex array object. More...
 
GLenum GetIndexType () const
 Get the type of the values in the index buffer. More...
 
uintptr_t GetIndexBufferOffset () const
 Get the offset into the index buffer. More...
 
- Public Member Functions inherited from Video::GeometryBinding
 GeometryBinding ()
 Create a new shader. More...
 
virtual ~GeometryBinding ()
 Destructor. More...
 

Additional Inherited Members

- Public Types inherited from Video::GeometryBinding
enum class  IndexType { NONE = 0 , SHORT , INT }
 The type of values in the index buffer. More...
 

Detailed Description

OpenGL implementation of GeometryBinding.

Constructor & Destructor Documentation

◆ OpenGLGeometryBinding()

Video::OpenGLGeometryBinding::OpenGLGeometryBinding ( const VertexDescription vertexDescription,
const Buffer vertexBuffer,
IndexType  indexType = IndexType::NONE,
const Buffer indexBuffer = nullptr 
)

Create new OpenGL geometry binding.

Parameters
vertexDescriptionDescription of the attributes in the vertex buffer.
vertexBufferBuffer containing the vertex data.
indexTypeThe type of values in the index buffer.
indexBufferIndex buffer.

◆ ~OpenGLGeometryBinding()

Video::OpenGLGeometryBinding::~OpenGLGeometryBinding ( )
final

Destructor.

Member Function Documentation

◆ GetIndexBufferOffset()

uintptr_t Video::OpenGLGeometryBinding::GetIndexBufferOffset ( ) const

Get the offset into the index buffer.

Returns
Offset of the first element in bytes.

◆ GetIndexType()

GLenum Video::OpenGLGeometryBinding::GetIndexType ( ) const

Get the type of the values in the index buffer.

Returns
The type of the values in the index buffer.

◆ GetVertexArray()

GLuint Video::OpenGLGeometryBinding::GetVertexArray ( ) const

Get the vertex array object.

Returns
The vertex array to use in OpenGL calls.

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