| GL Studio C++ Runtime API

Public Member Functions | List of all members
GlsGeometryResource::TypeDesc Class Reference

`#include <gls_geometry_resource.h>`

## Public Member Functions
void | HasNormal (bool value)
bool | HasNormal () const
void | NormalType (unsigned int value)
unsigned int | NormalType () const
void | TexCoordType (unsigned int value)
unsigned int | TexCoordType () 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

  which | 0 or 1

## ◆ GetVertexAttribComponents()

GLint GetVertexAttribComponents | ( | unsigned char | which | ) | const
| inline

Returns
  The number of components of the given vertex attribute.

Parameters

  which | The attribute in question.

## ◆ GetVertexAttribNormalize()

GLboolean GetVertexAttribNormalize | ( | unsigned char | which | ) | const
| inline

Returns
  The normalize flag for the given attribute.

Parameters

  which | The index of the attribute.

## ◆ GetVertexAttribSemantic()

int GetVertexAttribSemantic | ( | unsigned char | which | ) | const
| inline

Returns
  The semantic value for the given attribute index.

Parameters

  which | The index of the attribute.

## ◆ GetVertexAttribType()

GLenum GetVertexAttribType | ( | unsigned char | which | ) | const
| inline

Returns
  The given vertex attribute.

Parameters

  which | The 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

  value | The 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

  value | The 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

  value | The new secondary color storage flag.

## ◆ NormalType() [1/2]

unsigned int NormalType | ( |  | ) | const
| inline

Returns
  a copy of normalType.

## ◆ NormalType() [2/2]

void NormalType | ( | unsigned int | value | ) |
| inline

Sets the normal type to the new value.

Parameters

  value | Sets the normalType to this value.

## ◆ SetNumTextureCoords()

void SetNumTextureCoords | ( | unsigned char | value | ) |
| inline

Set the number of texture coordinates to be stored.

Parameters

  value | The 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

  value | The 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

  which | 0 or 1
  value | 0 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

  which | The index of the attribute to set.
  value | The 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

  which | The index of the attribute to set.
  value | The 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

  which | Which vertex attrib to set
  semanticEnum | The 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

  which | The index of the attribute to set.
  value | The value to set at the attribute.

## ◆ TexCoordType() [1/2]

unsigned int TexCoordType | ( |  | ) | const
| inline

Returns
  a copy of texCoordType.

## ◆ TexCoordType() [2/2]

void TexCoordType | ( | unsigned int | value | ) |
| inline

Sets the texCoordType to the new value.

Parameters

  value | Sets the texCoordType to this value.

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

- gls_geometry_resource.h