Contents User Forum Source Index APIs by Task APIs by Level Data


glFormat.h File Reference

#include "glheaders.h"
#include "G3D/g3dmath.h"

Namespaces

namespace  G3D
namespace  G3D::_internal

Classes

class  G3D::_internal::_GLFormat< T >
class  G3D::_internal::_GLFormat< Color3 >
class  G3D::_internal::_GLFormat< Color3uint8 >
class  G3D::_internal::_GLFormat< Color4 >
class  G3D::_internal::_GLFormat< Color4uint8 >
class  G3D::_internal::_GLFormat< double >
class  G3D::_internal::_GLFormat< float >
class  G3D::_internal::_GLFormat< int16 >
class  G3D::_internal::_GLFormat< int32 >
class  G3D::_internal::_GLFormat< int8 >
class  G3D::_internal::_GLFormat< uint16 >
class  G3D::_internal::_GLFormat< uint32 >
class  G3D::_internal::_GLFormat< uint8 >
class  G3D::_internal::_GLFormat< Vector2 >
class  G3D::_internal::_GLFormat< Vector2int16 >
class  G3D::_internal::_GLFormat< Vector3 >
class  G3D::_internal::_GLFormat< Vector3int16 >
class  G3D::_internal::_GLFormat< Vector4 >

Defines

#define DECLARE_GLFORMATOF(G3DType, GLType)
#define glFormatOf(T)   (G3D::_internal::_GLFormat<T>::x())

Define Documentation

#define DECLARE_GLFORMATOF ( G3DType,
GLType   ) 

Value:

namespace G3D {                                      \
    namespace _internal {                            \
        template<> class _GLFormat<G3DType> {        \
        public:                                      \
            static GLenum x()  {                     \
                return GLType;                       \
            }                                        \
        };                                           \
    }                                                \
}
Macro to declare the underlying format (as will be returned by glFormatOf) of a type.

For example,

    DECLARE_GLFORMATOF(Vector4, GL_FLOAT)
  

Use this so you can make vertex arrays of your own classes and not just the standard ones.

#define glFormatOf (  )     (G3D::_internal::_GLFormat<T>::x())

A macro that maps G3D types to OpenGL formats (e.g.

glFormat(Vector3) == GL_FLOAT).

Use DECLARE_GLFORMATOF(MyType, GLType) at top-level to define glFormatOf values for your own classes.

Used by the vertex array infrastructure.


Generated on Thu Aug 2 11:40:42 2007 for G3D by doxygen 1.5.2
Hosted by SourceForge.net Logo