LibCarna Version 3.4.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
LibCarna::base::VertexAttribute Struct Reference

Declares a vertex attribute. More...

#include <VertexAttributes.hpp>

Public Member Functions

 VertexAttribute (std::size_t position, std::size_t componentsCount, unsigned int type)
 

Public Attributes

std::size_t position
 
std::size_t componentsCount
 
unsigned int type
 

Static Public Attributes

static const unsigned int TYPE_FLOAT
 Indicates vertex attribute of GL_FLOAT type.
 
static const unsigned int TYPE_INT
 Indicates vertex attribute of GL_INT type.
 
static const unsigned int TYPE_UINT
 Indicates vertex attribute of GL_UNSIGNED_INT type.
 

Detailed Description

Declares a vertex attribute.

Author
Leonid Kostrykin

Definition at line 43 of file VertexAttributes.hpp.

Constructor & Destructor Documentation

◆ VertexAttribute()

LibCarna::base::VertexAttribute::VertexAttribute ( std::size_t  position,
std::size_t  componentsCount,
unsigned int  type 
)
inline

Instantiates.

The attribute is scalar if componentsCount is \(1\). It is vector-valued otherwise.

Parameters
positionis the position of the vertex attribute within the vertex definition.
componentsCountis the number of components from type within this vertex attribute.
typeis the type of this vertex attribute if it is scalar or the type of the vector components otherwise.

Definition at line 91 of file VertexAttributes.hpp.

Member Data Documentation

◆ componentsCount

std::size_t LibCarna::base::VertexAttribute::componentsCount

Holds number of components from type within this vertex attribute. The attribute is scalar if the value is \(1\), it is a vector otherwise.

Definition at line 68 of file VertexAttributes.hpp.

◆ position

std::size_t LibCarna::base::VertexAttribute::position

Holds position of the vertex attribute within the vertex definition.

Definition at line 63 of file VertexAttributes.hpp.

◆ type

unsigned int LibCarna::base::VertexAttribute::type

Holds the type of this vertex attribute if it is scalar. Holds the type of the vector components otherwise.

Definition at line 74 of file VertexAttributes.hpp.

◆ TYPE_FLOAT

const unsigned int LibCarna::base::VertexAttribute::TYPE_FLOAT
static

Indicates vertex attribute of GL_FLOAT type.

Definition at line 49 of file VertexAttributes.hpp.

◆ TYPE_INT

const unsigned int LibCarna::base::VertexAttribute::TYPE_INT
static

Indicates vertex attribute of GL_INT type.

Definition at line 54 of file VertexAttributes.hpp.

◆ TYPE_UINT

const unsigned int LibCarna::base::VertexAttribute::TYPE_UINT
static

Indicates vertex attribute of GL_UNSIGNED_INT type.

Definition at line 59 of file VertexAttributes.hpp.


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