![]() |
TAPs 0.7.7.3
|
#include "TAPsOpenGLFns.hpp"
Include dependency graph for TAPsOpenGLFns.cpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Defines | |
| #define | CHECK_GL_ERROR() GFnCheckGLError( __FILE__, __LINE__ ) |
| #define | CHECK_GL_ERROR_MESSAGE(s) GFnCheckGLError( s ) |
| #define | CHECK_FRAMEBUFFER_STATUS() GFnCheckFrameBufferStatus() |
Functions | |
| GLuint | GetGLFontDisplayList () |
| void | GFnCheckGLError (char *file, int line, int *glErrCode) |
| void | GFnCheckGLError (char *customMessage, int *glErrCode) |
| void | GFnCheckFrameBufferStatus () |
| void | InitializeLight (GLenum light, GLfloat a0, GLfloat a1, GLfloat a2, GLfloat a3, GLfloat d0, GLfloat d1, GLfloat d2, GLfloat d3, GLfloat s0, GLfloat s1, GLfloat s2, GLfloat s3, GLfloat p0, GLfloat p1, GLfloat p2, GLfloat p3) |
| void | SetLightAmbient (GLenum light, GLfloat r, GLfloat g, GLfloat b, GLfloat a) |
| void | SetLightDiffuse (GLenum light, GLfloat r, GLfloat g, GLfloat b, GLfloat a) |
| void | SetLightSpecular (GLenum light, GLfloat r, GLfloat g, GLfloat b, GLfloat a) |
| void | SetLightPosition (GLenum light, GLfloat x, GLfloat y, GLfloat z, GLfloat w) |
| void | SetLightAttenuation (GLenum light, GLfloat constant, GLfloat linear, GLfloat quadratic) |
| void | SetLightSpotCutoff (GLenum light, GLfloat halfAngle) |
| void | SetLightSpotDirection (GLenum light, GLfloat x, GLfloat y, GLfloat z) |
| void | SetLightSpotExponent (GLenum light, GLfloat exp) |
| void | EnableLight (GLenum light) |
| void | DisableLight (GLenum light) |
| void | EnableLightingWithTwoSide (bool twoSide) |
| void | EnableLightingWithOneSide (bool oneSide) |
| void | EnableLighting () |
| void | DisableLighting () |
| void | ToggleLighting () |
| void | EnableDepthTest () |
| void | DisableDepthTest () |
| void | ToggleDepthTest () |
| void | SetFrontFaceCCW (bool b) |
| void | SetFrontFaceCW (bool b) |
| void | ToggleFrontFaceOriantation () |
| void | EnableCullFace () |
| void | DisableCullFace () |
| void | ToggleCullFace () |
| void | SetDrawingMode (GLenum face, GLenum mode) |
| void | SwitchDrawingMode () |
| void | SwitchDrawFaceMode () |
| void | SwitchCullFaceMode () |
| template<typename T > | |
| Matrix4x4< T > | CalShadowProjectionMatrix (Vector4< T > const &lightPos, Vector4< T > const &planeEqn) |
| void | GenerateScreenText (Enum::GLUT textStyle) |
| void | Draw3DLine (const GLfloat x1, const GLfloat y1, const GLfloat z1, const GLfloat x2, const GLfloat y2, const GLfloat z2) |
| void | Draw3DLine (GLfloat const *const p1, GLfloat const *const p2) |
| void | Draw3DLine (const Vector3< GLint > P1, const Vector3< GLint > P2) |
| void | Draw3DLine (const Vector3< GLfloat > P1, const Vector3< GLfloat > P2) |
| void | Draw3DLine (const Vector3< GLdouble > P1, const Vector3< GLdouble > P2) |
| GLUquadricObj * | NewGLUQuardic () |
| void | DeleteGLUQuardic (GLUquadricObj *qObj) |
| void | ErrorCallBack (GLenum errCode) |
Variables | |
| BEGIN_NAMESPACE_TAPs__OpenGL__Fn GLuint | g_uiGLFontDisplayList = 0 |
| #define CHECK_FRAMEBUFFER_STATUS | ( | ) | GFnCheckFrameBufferStatus() |
Definition at line 181 of file TAPsOpenGLFns.cpp.
| #define CHECK_GL_ERROR | ( | ) | GFnCheckGLError( __FILE__, __LINE__ ) |
Definition at line 62 of file TAPsOpenGLFns.cpp.
| #define CHECK_GL_ERROR_MESSAGE | ( | s | ) | GFnCheckGLError( s ) |
Definition at line 98 of file TAPsOpenGLFns.cpp.
| Matrix4x4<T> CalShadowProjectionMatrix | ( | Vector4< T > const & | lightPos, |
| Vector4< T > const & | planeEqn | ||
| ) |
Definition at line 489 of file TAPsOpenGLFns.cpp.
{
T dot = planeEqn*lightPos;
return Matrix4x4<T> (
dot - lightPos[0]*planeEqn[0],
dot - lightPos[0]*planeEqn[1],
dot - lightPos[0]*planeEqn[2],
dot - lightPos[0]*planeEqn[3],
dot - lightPos[1]*planeEqn[0],
dot - lightPos[1]*planeEqn[1],
dot - lightPos[1]*planeEqn[2],
dot - lightPos[1]*planeEqn[3],
dot - lightPos[2]*planeEqn[0],
dot - lightPos[2]*planeEqn[1],
dot - lightPos[2]*planeEqn[2],
dot - lightPos[2]*planeEqn[3],
dot - lightPos[3]*planeEqn[0],
dot - lightPos[3]*planeEqn[1],
dot - lightPos[3]*planeEqn[2],
dot - lightPos[3]*planeEqn[3]
);
}
| void DeleteGLUQuardic | ( | GLUquadricObj * | qObj | ) |
Definition at line 656 of file TAPsOpenGLFns.cpp.
{
gluDeleteQuadric( qObj );
}
| void DisableCullFace | ( | ) | [inline] |
Definition at line 369 of file TAPsOpenGLFns.cpp.
{ glDisable( GL_CULL_FACE ); }
| void DisableDepthTest | ( | ) | [inline] |
Definition at line 325 of file TAPsOpenGLFns.cpp.
{ glDisable( GL_DEPTH_TEST ); }
| void DisableLight | ( | GLenum | light | ) | [inline] |
Definition at line 283 of file TAPsOpenGLFns.cpp.
{
glDisable( light );
}
| void DisableLighting | ( | ) | [inline] |
Definition at line 312 of file TAPsOpenGLFns.cpp.
{ glDisable( GL_LIGHTING ); }
Definition at line 621 of file TAPsOpenGLFns.cpp.
{
glBegin( GL_LINES );
glVertex3f( P1[0], P1[1], P1[2] );
glVertex3f( P2[0], P2[1], P2[2] );
glEnd();
}
| void Draw3DLine | ( | const GLfloat | x1, |
| const GLfloat | y1, | ||
| const GLfloat | z1, | ||
| const GLfloat | x2, | ||
| const GLfloat | y2, | ||
| const GLfloat | z2 | ||
| ) |
Definition at line 599 of file TAPsOpenGLFns.cpp.
Referenced by OpenGLXPolygonalModel< T >::DrawGL(), OpenGLSpringHalfEdgeModel< T >::DrawGL(), OpenGLHETriMeshOneModelMultiParts< T >::DrawGL(), OpenGLHalfEdgeModel< T >::DrawGL(), OpenGLXPolygonalModel< T >::DrawGLFaceRange(), OpenGLXPolygonalModel< T >::DrawGLSLWithDSFaceVertex_RGB(), OpenGLSpringHalfEdgeModel< T >::DrawGLSLWithDSFaceVertex_RGB(), OpenGLHETriMeshOneModelMultiParts< T >::DrawGLSLWithDSFaceVertex_RGB(), OpenGLHalfEdgeModel< T >::DrawGLSLWithDSFaceVertex_RGB(), OpenGLXPolygonalModel< T >::DrawGLSLWithDSFaceVertex_RGBA(), OpenGLSpringHalfEdgeModel< T >::DrawGLSLWithDSFaceVertex_RGBA(), OpenGLHETriMeshOneModelMultiParts< T >::DrawGLSLWithDSFaceVertex_RGBA(), OpenGLHalfEdgeModel< T >::DrawGLSLWithDSFaceVertex_RGBA(), OpenGLXPolygonalModel< T >::DrawGLWithFaceVertexColor_RGB(), OpenGLSpringHalfEdgeModel< T >::DrawGLWithFaceVertexColor_RGB(), OpenGLHETriMeshOneModelMultiParts< T >::DrawGLWithFaceVertexColor_RGB(), OpenGLHalfEdgeModel< T >::DrawGLWithFaceVertexColor_RGB(), OpenGLXPolygonalModel< T >::DrawGLWithFaceVertexColor_RGBA(), OpenGLSpringHalfEdgeModel< T >::DrawGLWithFaceVertexColor_RGBA(), OpenGLHETriMeshOneModelMultiParts< T >::DrawGLWithFaceVertexColor_RGBA(), and OpenGLHalfEdgeModel< T >::DrawGLWithFaceVertexColor_RGBA().
{
glBegin( GL_LINES );
glVertex3f( x1, y1, z1 );
glVertex3f( x2, y2, z2 );
glEnd();
}
Here is the caller graph for this function:| void Draw3DLine | ( | GLfloat const *const | p1, |
| GLfloat const *const | p2 | ||
| ) |
Definition at line 607 of file TAPsOpenGLFns.cpp.
{
glBegin( GL_LINES );
glVertex3fv( p1 );
glVertex3fv( p2 );
glEnd();
}
Definition at line 614 of file TAPsOpenGLFns.cpp.
{
glBegin( GL_LINES );
glVertex3i( P1[0], P1[1], P1[2] );
glVertex3i( P2[0], P2[1], P2[2] );
glEnd();
}
Definition at line 628 of file TAPsOpenGLFns.cpp.
{
glBegin( GL_LINES );
glVertex3d( P1[0], P1[1], P1[2] );
glVertex3d( P2[0], P2[1], P2[2] );
glEnd();
}
| void EnableCullFace | ( | ) | [inline] |
Definition at line 366 of file TAPsOpenGLFns.cpp.
{ glEnable( GL_CULL_FACE ); }
| void EnableDepthTest | ( | ) | [inline] |
Definition at line 322 of file TAPsOpenGLFns.cpp.
{ glEnable( GL_DEPTH_TEST ); }
| void EnableLight | ( | GLenum | light | ) | [inline] |
Definition at line 277 of file TAPsOpenGLFns.cpp.
{
glEnable( light );
}
| void EnableLighting | ( | ) | [inline] |
Definition at line 309 of file TAPsOpenGLFns.cpp.
{ glEnable( GL_LIGHTING ); }
| void EnableLightingWithOneSide | ( | bool | oneSide | ) | [inline] |
Definition at line 303 of file TAPsOpenGLFns.cpp.
References EnableLightingWithTwoSide().
{
EnableLightingWithTwoSide( !oneSide );
}
Here is the call graph for this function:| void EnableLightingWithTwoSide | ( | bool | twoSide | ) |
Definition at line 290 of file TAPsOpenGLFns.cpp.
Referenced by EnableLightingWithOneSide().
{
// Set lighting for one side or two sides.
if ( twoSide ) glLightModeli( GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE );
else glLightModeli( GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE );
// Start Using GL Light(s)
glShadeModel( GL_SMOOTH );
glEnable( GL_LIGHTING );
glEnable( GL_DEPTH_TEST );
}
Here is the caller graph for this function:| void ErrorCallBack | ( | GLenum | errCode | ) |
Definition at line 660 of file TAPsOpenGLFns.cpp.
{
const GLubyte *errStr = gluErrorString( errCode );
std::cerr << "Quadric Error: " << errStr << "!" << std::endl;
exit(1);
}
| void GenerateScreenText | ( | Enum::GLUT | textStyle | ) |
Definition at line 519 of file TAPsOpenGLFns.cpp.
References BITMAP_8_BY_13, BITMAP_9_BY_15, BITMAP_HELVETICA_10, BITMAP_HELVETICA_12, BITMAP_HELVETICA_18, BITMAP_TIMES_ROMAN_10, BITMAP_TIMES_ROMAN_24, and g_uiGLFontDisplayList.
Referenced by DrawGLText().
{
//std::cout << "GenerateScreenText\n";
if ( g_uiGLFontDisplayList == 0 ) {
void * ptr = NULL;
switch (textStyle) {
case Enum::BITMAP_9_BY_15:
ptr = GLUT_BITMAP_9_BY_15;
break;
case Enum::BITMAP_8_BY_13:
ptr = GLUT_BITMAP_8_BY_13;
break;
case Enum::BITMAP_TIMES_ROMAN_10:
ptr = GLUT_BITMAP_TIMES_ROMAN_10;
break;
case Enum::BITMAP_TIMES_ROMAN_24:
ptr = GLUT_BITMAP_TIMES_ROMAN_24;
break;
case Enum::BITMAP_HELVETICA_10:
ptr = GLUT_BITMAP_HELVETICA_10;
break;
case Enum::BITMAP_HELVETICA_12:
ptr = GLUT_BITMAP_HELVETICA_12;
break;
case Enum::BITMAP_HELVETICA_18:
ptr = GLUT_BITMAP_HELVETICA_18;
break;
default:
ptr = GLUT_BITMAP_9_BY_15;
}
int baseSize = 256;
//int base = glGenLists( baseSize ); // font list base
g_uiGLFontDisplayList = glGenLists( baseSize ); // font list base
// generate fonts
for ( int i = 0; i < 256; ++i ) {
//glNewList(base+i, GL_COMPILE);
glNewList(g_uiGLFontDisplayList+i, GL_COMPILE);
glutBitmapCharacter(ptr, i);
glEndList();
}
//glListBase(base);
}
}
Here is the caller graph for this function:| GLuint GetGLFontDisplayList | ( | ) |
Definition at line 27 of file TAPsOpenGLFns.cpp.
References g_uiGLFontDisplayList.
Referenced by DrawGLText().
{ return g_uiGLFontDisplayList; }
Here is the caller graph for this function:| void GFnCheckFrameBufferStatus | ( | ) |
Use TAPs::OpenGL::Fn::CHECK_GL_ERROR() which is a macro for GFnCheckGLError( __FILE__, __LINE__ ) to printout GL errors that are accumulated due to OpenGL commands.
This function is a no-op function if the TAPs_DEBUG_MODE preprocessor symbol is not defined.
Definition at line 176 of file TAPsOpenGLFns.cpp.
{}
| void GFnCheckGLError | ( | char * | file, |
| int | line, | ||
| int * | glErrCode | ||
| ) |
Use TAPs::OpenGL::Fn::CHECK_GL_ERROR() which is a macro for GFnCheckGLError( __FILE__, __LINE__ ) to printout GL errors that are accumulated due to OpenGL commands.
This function is a no-op function if the TAPs_DEBUG_MODE preprocessor symbol is not defined.
Definition at line 41 of file TAPsOpenGLFns.cpp.
{
GLenum glErr = glGetError();
int errCode = 0;
while ( glErr != GL_NO_ERROR ) {
#ifdef TAPs_USE_WXWIDGETS
wxLogError( wxT( "GL Error #%d (%s) in file %s at line#%d" ),
glErr, gluErrorString(glErr), file, line );
#else
std::cout
<< "GL Error #" << glErr << " (" << gluErrorString(glErr) << ") "
<< "in file " << file << " at line#" << line << std::endl;
#endif
errCode = 1;
glErr = glGetError();
}
if ( glErrCode ) *glErrCode = errCode;
}
| void GFnCheckGLError | ( | char * | customMessage, |
| int * | glErrCode | ||
| ) |
Use TAPs::OpenGL::Fn::CHECK_GL_ERROR_MESSAGE( char * customMessage ) which is a macro for GFnCheckGLError( s ) to printout GL errors that are accumulated due to OpenGL commands.
<customMessage> is a string that can be used to indicate the location or message where the error check occurs.
This function is a no-op function if the TAPs_DEBUG_MODE preprocessor symbol is not defined.
Definition at line 77 of file TAPsOpenGLFns.cpp.
{
GLenum glErr = glGetError();
int errCode = 0;
while ( glErr != GL_NO_ERROR ) {
#ifdef TAPs_USE_WXWIDGETS
wxLogError( wxT( "%s --> GL Error #%d (%s)!" ),
customMessage, glErr, gluErrorString(glErr) );
#else
std::cerr
<< customMessage << " --> GL Error #" << glErr
<< " (" << gluErrorString(glErr) << ")!" << std::endl;
#endif
errCode = 1;
glErr = glGetError();
}
if ( glErrCode ) *glErrCode = errCode;
}
| void InitializeLight | ( | GLenum | light, |
| GLfloat | a0, | ||
| GLfloat | a1, | ||
| GLfloat | a2, | ||
| GLfloat | a3, | ||
| GLfloat | d0, | ||
| GLfloat | d1, | ||
| GLfloat | d2, | ||
| GLfloat | d3, | ||
| GLfloat | s0, | ||
| GLfloat | s1, | ||
| GLfloat | s2, | ||
| GLfloat | s3, | ||
| GLfloat | p0, | ||
| GLfloat | p1, | ||
| GLfloat | p2, | ||
| GLfloat | p3 | ||
| ) |
Definition at line 192 of file TAPsOpenGLFns.cpp.
Referenced by OpenGLViewManager< T >::Setup().
{
// Light Attributes
GLfloat light_ambient[] = { a0, a1, a2, a3 };
GLfloat light_diffuse[] = { d0, d1, d2, d3 };
GLfloat light_specular[] = { s0, s1, s2, s3 };
GLfloat light_position[] = { p0, p1, p2, p3 };
// Setup Light
glLightfv( light, GL_AMBIENT, light_ambient );
glLightfv( light, GL_DIFFUSE, light_diffuse );
glLightfv( light, GL_SPECULAR, light_specular );
glLightfv( light, GL_POSITION, light_position );
// Enable Light
glEnable( light );
}
Here is the caller graph for this function:| GLUquadricObj* NewGLUQuardic | ( | ) |
Definition at line 642 of file TAPsOpenGLFns.cpp.
{
GLUquadricObj * qObj = gluNewQuadric();
#ifdef TAPs_DEBUG_ENABLE
if ( !qObj ) {
std::cerr << "Warning: GLUquadricObj cannot be created!\n";
return qObj;
}
#endif
//gluQuadricCallback( qObj, GLU_ERROR, ErrorCallBack);
gluQuadricDrawStyle( qObj, GLU_FILL ); // smooth shaded
gluQuadricNormals( qObj, GLU_SMOOTH );
return qObj;
}
| void SetDrawingMode | ( | GLenum | face, |
| GLenum | mode | ||
| ) | [inline] |
Definition at line 387 of file TAPsOpenGLFns.cpp.
{
glPolygonMode( face, mode );
glCullFace( face );
glEnable( GL_CULL_FACE );
}
| void SetFrontFaceCCW | ( | bool | b | ) | [inline] |
Definition at line 342 of file TAPsOpenGLFns.cpp.
{
if ( b ) glFrontFace( GL_CCW );
else glFrontFace( GL_CW );
}
| void SetFrontFaceCW | ( | bool | b | ) | [inline] |
Definition at line 349 of file TAPsOpenGLFns.cpp.
References SetFrontFaceCCW().
{
SetFrontFaceCCW( !b );
}
Here is the call graph for this function:| void SetLightAmbient | ( | GLenum | light, |
| GLfloat | r, | ||
| GLfloat | g, | ||
| GLfloat | b, | ||
| GLfloat | a | ||
| ) | [inline] |
Definition at line 216 of file TAPsOpenGLFns.cpp.
References Physics_SI::K::g.
{
GLfloat v[] = { r, g, b, a };
glLightfv( light, GL_AMBIENT, v );
}
| void SetLightAttenuation | ( | GLenum | light, |
| GLfloat | constant, | ||
| GLfloat | linear, | ||
| GLfloat | quadratic | ||
| ) | [inline] |
Definition at line 244 of file TAPsOpenGLFns.cpp.
{
glLightf( light, GL_CONSTANT_ATTENUATION, constant );
glLightf( light, GL_LINEAR_ATTENUATION, linear );
glLightf( light, GL_QUADRATIC_ATTENUATION, quadratic );
}
| void SetLightDiffuse | ( | GLenum | light, |
| GLfloat | r, | ||
| GLfloat | g, | ||
| GLfloat | b, | ||
| GLfloat | a | ||
| ) | [inline] |
Definition at line 223 of file TAPsOpenGLFns.cpp.
References Physics_SI::K::g.
{
GLfloat v[] = { r, g, b, a };
glLightfv( light, GL_DIFFUSE, v );
}
| void SetLightPosition | ( | GLenum | light, |
| GLfloat | x, | ||
| GLfloat | y, | ||
| GLfloat | z, | ||
| GLfloat | w | ||
| ) | [inline] |
Definition at line 237 of file TAPsOpenGLFns.cpp.
{
GLfloat v[] = { x, y, z, w };
glLightfv( light, GL_POSITION, v );
}
| void SetLightSpecular | ( | GLenum | light, |
| GLfloat | r, | ||
| GLfloat | g, | ||
| GLfloat | b, | ||
| GLfloat | a | ||
| ) | [inline] |
Definition at line 230 of file TAPsOpenGLFns.cpp.
References Physics_SI::K::g.
{
GLfloat v[] = { r, g, b, a };
glLightfv( light, GL_SPECULAR, v );
}
| void SetLightSpotCutoff | ( | GLenum | light, |
| GLfloat | halfAngle | ||
| ) | [inline] |
Definition at line 256 of file TAPsOpenGLFns.cpp.
{
glLightf( light, GL_SPOT_CUTOFF, halfAngle );
}
| void SetLightSpotDirection | ( | GLenum | light, |
| GLfloat | x, | ||
| GLfloat | y, | ||
| GLfloat | z | ||
| ) | [inline] |
Definition at line 263 of file TAPsOpenGLFns.cpp.
{
GLfloat v[] = { x, y, z };
glLightfv( light, GL_SPOT_DIRECTION, v );
}
| void SetLightSpotExponent | ( | GLenum | light, |
| GLfloat | exp | ||
| ) | [inline] |
Definition at line 271 of file TAPsOpenGLFns.cpp.
{
glLightf( light, GL_SPOT_EXPONENT, exp );
}
| void SwitchCullFaceMode | ( | ) |
Definition at line 448 of file TAPsOpenGLFns.cpp.
{
GLint cullFace;
glGetIntegerv( GL_CULL_FACE_MODE, &cullFace );
switch ( cullFace ) {
case GL_FRONT:
cullFace = GL_BACK;
break;
case GL_BACK:
cullFace = GL_FRONT_AND_BACK;
break;
case GL_FRONT_AND_BACK:
cullFace = GL_FRONT;
break;
}
glCullFace( cullFace );
// if ( GL_BACK == g_eCullFace ) g_eCullFace = GL_FRONT;
// else if ( GL_FRONT == g_eCullFace ) g_eCullFace = GL_FRONT_AND_BACK;
// else g_eCullFace = GL_BACK;
// glCullFace( g_eCullFace );
}
| void SwitchDrawFaceMode | ( | ) |
Definition at line 422 of file TAPsOpenGLFns.cpp.
{
GLint DrawFaceAndMode[2];
glGetIntegerv( GL_POLYGON_MODE, DrawFaceAndMode );
switch ( DrawFaceAndMode[0] ) {
case GL_FRONT:
DrawFaceAndMode[0] = GL_BACK;
break;
case GL_BACK:
DrawFaceAndMode[0] = GL_FRONT_AND_BACK;
break;
case GL_FRONT_AND_BACK:
DrawFaceAndMode[0] = GL_FRONT;
break;
}
glPolygonMode( DrawFaceAndMode[0], DrawFaceAndMode[1] );
// if ( GL_FRONT == g_eCullFace ) g_eCullFace = GL_BACK;
// else if ( GL_BACK == g_eCullFace ) g_eCullFace = GL_FRONT_AND_BACK;
// else g_eCullFace = GL_FRONT;
// glPolygonMode( g_eDrawFace, g_eDrawMode );
}
| void SwitchDrawingMode | ( | ) |
Definition at line 397 of file TAPsOpenGLFns.cpp.
{
GLint DrawFaceAndMode[2];
glGetIntegerv( GL_POLYGON_MODE, DrawFaceAndMode );
switch ( DrawFaceAndMode[1] ) {
case GL_POINT:
DrawFaceAndMode[1] = GL_LINE;
break;
case GL_LINE:
DrawFaceAndMode[1] = GL_FILL;
break;
case GL_FILL:
DrawFaceAndMode[1] = GL_POINT;
break;
}
glPolygonMode( DrawFaceAndMode[0], DrawFaceAndMode[1] );
//++g_eDrawMode;
//if ( g_eDrawMode > GL_FILL ) g_eDrawMode = GL_POINT;
//glPolygonMode( g_eDrawFace, g_eDrawMode );
}
| void ToggleCullFace | ( | ) | [inline] |
Definition at line 372 of file TAPsOpenGLFns.cpp.
{
if ( glIsEnabled( GL_CULL_FACE ) ) glDisable( GL_CULL_FACE );
else glEnable ( GL_CULL_FACE );
}
| void ToggleDepthTest | ( | ) | [inline] |
Definition at line 328 of file TAPsOpenGLFns.cpp.
{
if ( glIsEnabled( GL_DEPTH_TEST ) ) glDisable( GL_DEPTH_TEST );
else glEnable ( GL_DEPTH_TEST );
}
| void ToggleFrontFaceOriantation | ( | ) | [inline] |
Definition at line 355 of file TAPsOpenGLFns.cpp.
{
GLint value;
glGetIntegerv( GL_FRONT_FACE, &value );
if ( GL_CCW == value )
glEnable( GL_CW );
else
glEnable( GL_CCW );
}
| void ToggleLighting | ( | ) | [inline] |
Definition at line 315 of file TAPsOpenGLFns.cpp.
{
if ( glIsEnabled( GL_LIGHTING ) ) glDisable( GL_LIGHTING );
else glEnable ( GL_LIGHTING );
}
| BEGIN_NAMESPACE_TAPs__OpenGL__Fn GLuint g_uiGLFontDisplayList = 0 |
Definition at line 26 of file TAPsOpenGLFns.cpp.
Referenced by GenerateScreenText(), and GetGLFontDisplayList().