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

OpenGL implementation of VertexDescription. More...

#include <OpenGLVertexDescription.hpp>

Inheritance diagram for Video::OpenGLVertexDescription:
Video::VertexDescription

Classes

struct  OpenGLAttribute
 Describes an OpenGL attribute in a vertex array object. More...
 

Public Member Functions

 OpenGLVertexDescription (unsigned int attributeCount, const VertexDescription::Attribute *attributes, bool indexBuffer)
 Create new OpenGL vertex description. More...
 
 ~OpenGLVertexDescription () final
 Destructor. More...
 
unsigned int GetStride () const
 Get the stride between vertices. More...
 
const std::vector< OpenGLAttribute > & GetAttributes () const
 Get the attributes. More...
 
- Public Member Functions inherited from Video::VertexDescription
 VertexDescription ()
 Create a new vertex description. More...
 
virtual ~VertexDescription ()
 Destructor. More...
 

Additional Inherited Members

- Public Types inherited from Video::VertexDescription
enum class  AttributeType { UNSIGNED_BYTE , INT , FLOAT }
 The type of a vertex attribute. More...
 

Detailed Description

OpenGL implementation of VertexDescription.

Constructor & Destructor Documentation

◆ OpenGLVertexDescription()

Video::OpenGLVertexDescription::OpenGLVertexDescription ( unsigned int  attributeCount,
const VertexDescription::Attribute attributes,
bool  indexBuffer 
)

Create new OpenGL vertex description.

Parameters
attributeCountThe number of vertex attributes.
attributesThe array of attributes.
indexBufferWhether to use an index buffer.

◆ ~OpenGLVertexDescription()

Video::OpenGLVertexDescription::~OpenGLVertexDescription ( )
final

Destructor.

Member Function Documentation

◆ GetAttributes()

const std::vector< OpenGLVertexDescription::OpenGLAttribute > & Video::OpenGLVertexDescription::GetAttributes ( ) const

Get the attributes.

Returns
Descriptions of the attributes in the vertex buffer(s).

◆ GetStride()

unsigned int Video::OpenGLVertexDescription::GetStride ( ) const

Get the stride between vertices.

Returns
The stride between vertices in bytes.

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