Carna  Version 3.3.2
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Carna::base::VertexAttribute Struct Reference

Declares a vertex attribute. More...

#include <VertexAttributes.h>

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
Date
22.2.15 - 19.3.15

Definition at line 40 of file VertexAttributes.h.

Constructor & Destructor Documentation

◆ VertexAttribute()

Carna::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 88 of file VertexAttributes.h.

Member Data Documentation

◆ componentsCount

std::size_t Carna::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 65 of file VertexAttributes.h.

◆ position

std::size_t Carna::base::VertexAttribute::position

Holds position of the vertex attribute within the vertex definition.

Definition at line 60 of file VertexAttributes.h.

◆ type

unsigned int Carna::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 71 of file VertexAttributes.h.


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