GL Studio C++ Runtime API
GlsGeometryResource::TypeDesc Class Reference

#include <gls_geometry_resource.h>

Public Member Functions

void HasNormal (bool value)
 
bool HasNormal () const
 
void HasColor (bool value)
 
bool HasColor () const
 
void HasSecondaryColor (bool value)
 
bool HasSecondaryColor () const
 
void SetNumTextureCoords (unsigned char value)
 
unsigned char GetNumTextureCoords () const
 
void SetTexCoordDimension (unsigned char which, unsigned char value)
 
unsigned char GetTexCoordDimension (unsigned char which) const
 
void SetNumVertexAttribs (unsigned char value)
 
unsigned char GetNumVertexAttribs () const
 
void SetVertexAttribComponents (unsigned char which, GLint value)
 
GLint GetVertexAttribComponents (unsigned char which) const
 
void SetVertexAttribType (unsigned char which, GLenum value)
 
GLenum GetVertexAttribType (unsigned char which) const
 
void SetVertexAttribNormalize (unsigned char which, GLboolean value)
 
GLboolean GetVertexAttribNormalize (unsigned char which) const
 
void SetVertexAttribSemantic (unsigned char which, int semanticEnum)
 
int GetVertexAttribSemantic (unsigned char which) const
 

Detailed Description

The TypeDesc class. Describes the underlying format of a GL vertex.

Member Function Documentation

◆ GetNumTextureCoords()

unsigned char GetNumTextureCoords ( ) const
inline
Returns
The number of texture coordinates stored.

◆ GetNumVertexAttribs()

unsigned char GetNumVertexAttribs ( ) const
inline
Returns
The number of vertex attributes.

◆ GetTexCoordDimension()

unsigned char GetTexCoordDimension ( unsigned char  which) const
inline
Returns
The component of a given texture coordinate (0 through 4).
Parameters
which0 or 1

◆ GetVertexAttribComponents()

GLint GetVertexAttribComponents ( unsigned char  which) const
inline
Returns
The number of components of the given vertex attribute.
Parameters
whichThe attribute in question.

◆ GetVertexAttribNormalize()

GLboolean GetVertexAttribNormalize ( unsigned char  which) const
inline
Returns
The normalize flag for the given attribute.
Parameters
whichThe index of the attribute.

◆ GetVertexAttribSemantic()

int GetVertexAttribSemantic ( unsigned char  which) const
inline
Returns
The semantic value for the given attribute index.
Parameters
whichThe index of the attribute.

◆ GetVertexAttribType()

GLenum GetVertexAttribType ( unsigned char  which) const
inline
Returns
The given vertex attribute.
Parameters
whichThe index of the attribute.

◆ HasColor() [1/2]

bool HasColor ( ) const
inline
Returns
Whether or not this type stores colors.

◆ HasColor() [2/2]

void HasColor ( bool  value)
inline

Set whether or not there should be storage for colors.

Parameters
valueThe new color storage flag.

◆ HasNormal() [1/2]

bool HasNormal ( ) const
inline
Returns
Whether or not this type stores normals.

◆ HasNormal() [2/2]

void HasNormal ( bool  value)
inline

Set whether or not there should be storage for normals.

Parameters
valueThe new normal storage flag.

◆ HasSecondaryColor() [1/2]

bool HasSecondaryColor ( ) const
inline
Returns
Whether or not this type store secondary colors.

◆ HasSecondaryColor() [2/2]

void HasSecondaryColor ( bool  value)
inline

Set whether or not there should be storage for secondary colors.

Parameters
valueThe new secondary color storage flag.

◆ SetNumTextureCoords()

void SetNumTextureCoords ( unsigned char  value)
inline

Set the number of texture coordinates to be stored.

Parameters
valueThe new number of texture coordinates to store.

◆ SetNumVertexAttribs()

void SetNumVertexAttribs ( unsigned char  value)
inline

Set the number of generic vertex attributes stored in the resource. Generic vertex attributes are passed to OpenGL using glVertexAttribPointer. These are special attributes to be used by the vertex shader.

Parameters
valueThe new number of generic vertex attributes
See also
SetVertexAttribSizeBytes

◆ SetTexCoordDimension()

void SetTexCoordDimension ( unsigned char  which,
unsigned char  value 
)
inline

Set a component of a texture coordinate.

Parameters
which0 or 1
value0 through 4

◆ SetVertexAttribComponents()

void SetVertexAttribComponents ( unsigned char  which,
GLint  value 
)
inline

Set the size (number of components) in the generic vertex attribute. See documentation on glVertexAttribPointer for details.

Parameters
whichThe index of the attribute to set.
valueThe value to set at the attribute.

◆ SetVertexAttribNormalize()

void SetVertexAttribNormalize ( unsigned char  which,
GLboolean  value 
)
inline

Set whether fixed-point data values should be normalized (Default is false). See documentation on glVertexAttribPointer for details.

Parameters
whichThe index of the attribute to set.
valueThe value to set at the attribute.

◆ SetVertexAttribSemantic()

void SetVertexAttribSemantic ( unsigned char  which,
int  semanticEnum 
)
inline

Set semantic of a given generic vertex attribute The semantic value can be used to determine the "meaning" of the vertex attribute

Parameters
whichWhich vertex attrib to set
semanticEnumThe new sematic value (see AttributeSemanticEnum)

◆ SetVertexAttribType()

void SetVertexAttribType ( unsigned char  which,
GLenum  value 
)
inline

Set the type of a given generic vertex attribute. See documentation on glVertexAttribPointer for details.

Parameters
whichThe index of the attribute to set.
valueThe value to set at the attribute.

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