Namespaces | Defines

glut-state.cpp File Reference

#include "glut-state.h"
#include "perf/perf.h"
Include dependency graph for glut-state.cpp:

Go to the source code of this file.

Namespaces

namespace  glut

Defines

#define GET_INTEGER(flag, valCount)
#define GET_LIGHTF(light, flag, valCount)
#define GET_FLOAT(flag, valCount)
#define GET_BOOL(flag, valCount)
#define GET_TEXTUREI(flag, valCount)
#define GET_MATERIALF(flag, valCount)
#define GET_TEXENVI(flag, valCount)

Define Documentation

#define GET_INTEGER (   flag,
  valCount 
)
Value:
{                                                               \
                value_t v;                                              \
                v.type = eType_Int;                                     \
                v.count = valCount;                                     \
                ASSERT(valCount > 0 && valCount < 5,                    \
                    "Bad count for OpenGL int: %d", valCount);          \
                glGetIntegerv( flag , v.iVal );                         \
                m_values[ #flag ] = v;                                  \
        }

Definition at line 160 of file glut-state.cpp.

#define GET_LIGHTF (   light,
  flag,
  valCount 
)
Value:
{                                                               \
                value_t v;                                              \
                v.type = eType_Float;                                   \
                v.count = valCount;                                     \
                ASSERT(valCount > 0 && valCount < 5,                    \
                    "Bad count for OpenGL light float: %d", valCount);  \
                glGetLightfv( light , flag , v.fVal );                  \
                char buffer[64];                                        \
                buffer[0] = '0' + light - GL_LIGHT0;                    \
                buffer[1] = ':';                                        \
                strcpy(buffer + 2, #flag );                             \
                m_values[ buffer ] = v;                                 \
        }

Definition at line 171 of file glut-state.cpp.

#define GET_FLOAT (   flag,
  valCount 
)
Value:
{                                                               \
                value_t v;                                              \
                v.type = eType_Float;                                   \
                v.count = valCount;                                     \
                ASSERT(valCount > 0 && valCount < 5,                    \
                    "Bad count for OpenGL int: %d", valCount);          \
                glGetFloatv( flag , v.fVal );                           \
                m_values[ #flag ] = v;                                  \
        }

Definition at line 186 of file glut-state.cpp.

#define GET_BOOL (   flag,
  valCount 
)
Value:
{                                                               \
                value_t v;                                              \
                v.type = eType_Bool;                                    \
                v.count = valCount;                                     \
                ASSERT(valCount > 0 && valCount < 5,                    \
                    "Bad count for OpenGL int: %d", valCount);          \
                glGetBooleanv( flag , v.bVal );                         \
                m_values[ #flag ] = v;                                  \
        }

Definition at line 197 of file glut-state.cpp.

#define GET_TEXTUREI (   flag,
  valCount 
)
Value:
{                                                               \
                value_t v;                                              \
                v.type = eType_Int;                                     \
                v.count = valCount;                                     \
                ASSERT(valCount > 0 && valCount < 5,                    \
                    "Bad count for OpenGL int: %d", valCount);          \
                glGetTexParameteriv(GL_TEXTURE_2D, flag , v.iVal );     \
                m_values[ #flag ] = v;                                  \
        }

Definition at line 208 of file glut-state.cpp.

#define GET_MATERIALF (   flag,
  valCount 
)
Value:
{                                                               \
                value_t v;                                              \
                v.type = eType_Float;                                   \
                v.count = valCount;                                     \
                ASSERT(valCount > 0 && valCount < 5,                    \
                    "Bad count for OpenGL float: %d", valCount);        \
                glGetMaterialfv(GL_FRONT, flag , v.fVal );              \
                m_values[ "getMaterial_" #flag ] = v;                   \
        }

Definition at line 219 of file glut-state.cpp.

#define GET_TEXENVI (   flag,
  valCount 
)
Value:
{                                                               \
                value_t v;                                              \
                v.type = eType_Int;                                     \
                v.count = valCount;                                     \
                ASSERT(valCount > 0 && valCount < 5,                    \
                    "Bad count for openGl Int: %d", valCount);          \
                glGetTexEnviv(GL_TEXTURE_ENV, flag , v.iVal );          \
                m_values[ #flag ] = v;                                  \
        }

Definition at line 230 of file glut-state.cpp.