Support Forum G3D Web Page |
G3D Innovation Engine http://casual-effects.com/g3d Copyright 2000-2019, Morgan McGuire All rights reserved Available under the BSD License. More...
Namespaces | |
G3D | |
G3D::_internal | |
Macros | |
#define | DECLARE_GLFORMATOF(G3DType, GLType, _isIndex, _isNormalizedFixedPoint) |
Macro to declare the underlying format (as will be returned by glFormatOf) of a type. More... | |
#define | glCanBeIndexType(T) (G3D::_internal::_GLFormat<T>::canBeIndex()) |
True if the C-type passed as an argument can be used by an OpenGL index buffer as the data type. More... | |
#define | glFormatOf(T) (G3D::_internal::_GLFormat<T>::type()) |
A macro that maps G3D types to OpenGL formats (e.g. More... | |
#define | glIsNormalizedFixedPoint(T) (G3D::_internal::_GLFormat<T>::isNormalizedFixedPoint()) |
True if the C-type passed as an argument is stored in OpenGL normalized fixed point format. More... | |
G3D Innovation Engine http://casual-effects.com/g3d Copyright 2000-2019, Morgan McGuire All rights reserved Available under the BSD License.
#define DECLARE_GLFORMATOF | ( | G3DType, | |
GLType, | |||
_isIndex, | |||
_isNormalizedFixedPoint | |||
) |
Macro to declare the underlying format (as will be returned by glFormatOf) of a type.
For example,
Use this so you can make vertex arrays of your own classes and not just the standard ones.
_isIndex | True for types that can be used as indices. |
G3DType | |
GLType | |
_isNormalizedFixedPoint |
#define glCanBeIndexType | ( | T | ) | (G3D::_internal::_GLFormat<T>::canBeIndex()) |
True if the C-type passed as an argument can be used by an OpenGL index buffer as the data type.
e.g., glCanBeIndexType(float) = false.
#define glFormatOf | ( | T | ) | (G3D::_internal::_GLFormat<T>::type()) |
A macro that maps G3D types to OpenGL formats (e.g.
glFormat(Vector3) == GL_FLOAT
).
Use DECLARE_GLFORMATOF(MyType, GLType, bool)
at top-level to define glFormatOf values for your own classes.
Used by the vertex array infrastructure.
Referenced by G3D::AttributeArray::AttributeArray(), G3D::AttributeArray::createInterleaved(), G3D::AttributeArray::set(), and G3D::AttributeArray::update().
#define glIsNormalizedFixedPoint | ( | T | ) | (G3D::_internal::_GLFormat<T>::isNormalizedFixedPoint()) |
True if the C-type passed as an argument is stored in OpenGL normalized fixed point format.
e.g., glIsNormalizedFixedPoint(Vector2unorm16) = true.
Referenced by G3D::AttributeArray::AttributeArray(), G3D::AttributeArray::createInterleaved(), G3D::AttributeArray::set(), and G3D::AttributeArray::update().