Unofficial OpenGL Software Development Kit: glmesh::AttribDesc Class Reference

Unofficial OpenGL Software Development Kit 0.5.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
List of all members | Public Member Functions
glmesh::AttribDesc Class Reference
Immediate Mesh Drawing

`#include <VertexFormat.h>`

##

Describes the storage for a single vertex attribute.

This object is used as part of the construction for a VertexFormat. It allows for "atomic" construction of VertexFormat objects, such that all attributes are added at once during construction.

Note
  A valid OpenGL context must be active to create one of these objects. Do not make global variables of these.

## Public Member Functions

| AttribDesc (unsigned int attribIndex, unsigned int numComponents, VertexDataType vertType, AttribDataType attribType)
| Creates a valid AttribDesc. More...
unsigned int | GetAttribIndex () const
| Get the attribute index to be passed to glVertexAttribPointer for this attribute.
unsigned int | GetNumComponents () const
| Get the number of components in the attribute's data.
VertexDataType | GetVertexDataType () const
| Get the C/C++ type of the attribute data.
AttribDataType | GetAttribDataType () const
| Get the interpretation of that attribute's type.
size_t | ByteSize () const
| Computes the size in bytes of this attribute.

## Constructor & Destructor Documentation

glmesh::AttribDesc::AttribDesc | ( | unsigned int | attribIndex,
|  | unsigned int | numComponents,
|  | VertexDataType | vertType,
|  | AttribDataType | attribType
| ) |  |

Creates a valid AttribDesc.

Exceptions

  AttributeDataUnsupportedException | If attribIndex is outside the implementation-defined allowed range of OpenGL attributes.
  AttributeDataInvalidException | If vertType and attribType do not match, as defined in glmesh::AttribDataType.
  AttributeDataInvalidException | If numComponents is not on the range [1, 4].
  AttributeDataUnsupportedException | If attribType is `ADT_DOUBLE` and the implementation doesn't support double-precision attributes.
  AttributeDataUnsupportedException | If attribType is `ADT_INTEGER` and the implementation doesn't support integral attributes.
  AttributeDataUnsupportedException | If vertType is `VDT_HALF_FLOAT` and the implementation doesn't support half-floating point attributes.

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

- C:/Projects/distro/glsdk_0_5_1/glmesh/include/glmesh/VertexFormat.h