proj home

Files   Classes   Functions   Hierarchy  

gobjglDisable Class Reference

Turn off graphics states. More...

#include <gobj.h>

Inheritance diagram for gobjglDisable:
Collaboration diagram for gobjglDisable:

List of all members.

Public Member Functions

 gobjglDisable (GLenum capability_)
 Pass in what switch that you want to turn off.
 gobjglDisable (stringc &arg)
 Construct from string.
boolc serializeInverse (stringc &arg)
 Construct from string.
void draw ()
 Turn the switch off.

Public Attributes

GLenum capability
 The OpenGL capability being disabled.


Detailed Description

Turn off graphics states.

This is often used with pushing the states onto a stack before changing them. OpenGL is a state machine so this operation changes the OpenGL state.

Definition at line 471 of file gobj.h.


Constructor & Destructor Documentation

gobjglDisable::gobjglDisable ( GLenum  capability_  )  [inline]

Pass in what switch that you want to turn off.

Definition at line 480 of file gobj.h.

00481     : capability(capability_) {}

gobjglDisable::gobjglDisable ( stringc arg  ) 

Construct from string.

Definition at line 287 of file gobj.cpp.

References asserteval, and serializeInverse().

00288 {  
00289   asserteval(serializeInverse(arg));
00290 }


Member Function Documentation

void gobjglDisable::draw (  )  [inline, virtual]

Turn the switch off.

Implements gobj.

Definition at line 488 of file gobj.h.

References capability, and GOBJDEBUGCODE.

00489     { GOBJDEBUGCODE glDisable(capability); }

boolc gobjglDisable::serializeInverse ( stringc arg  ) 

Construct from string.

Definition at line 246 of file gobj.cpp.

References gobjglenabledisable.

Referenced by gobjglDisable().

00247 {
00248   string s1(arg);
00249   spacertrim<>()(s1);
00250 
00251   gobjglenabledisable(GL_ALPHA);
00252   gobjglenabledisable(GL_AUTO_NORMAL);
00253   gobjglenabledisable(GL_BLEND);
00254   //gobjglenabledisable(GL_CLIP_PLANEi);
00255   gobjglenabledisable(GL_COLOR_LOGIC_OP);
00256   gobjglenabledisable(GL_COLOR_MATERIAL);
00257   gobjglenabledisable(GL_COLOR_TABLE);
00258   gobjglenabledisable(GL_CONVOLUTION_1D);
00259   gobjglenabledisable(GL_CONVOLUTION_2D);
00260   gobjglenabledisable(GL_CULL_FACE);
00261   gobjglenabledisable(GL_DEPTH_TEST);
00262   gobjglenabledisable(GL_DITHER);
00263   gobjglenabledisable(GL_FOG);
00264   gobjglenabledisable(GL_HISTOGRAM);
00265   gobjglenabledisable(GL_INDEX_LOGIC_OP);
00266   //gobjglenabledisable(GL_LIGHTi);
00267   gobjglenabledisable(GL_LIGHTING);
00268   gobjglenabledisable(GL_LINE_SMOOTH);
00269   gobjglenabledisable(GL_LINE_STIPPLE);
00270   gobjglenabledisable(GL_MAP1_COLOR_4);
00271   gobjglenabledisable(GL_MAP1_INDEX);
00272 
00273 /*
00274   if (s1=="GL_LIGHTING")
00275   {
00276     capability = GL_LIGHTING;
00277     return true;
00278   }
00279 */
00280 
00281   cout << "error: gobjglDisable(" << arg << ");" << endl; 
00282   assert(false); 
00283 
00284   return false;
00285 }


Member Data Documentation

The OpenGL capability being disabled.

For example GL_LIGHTING.

Definition at line 477 of file gobj.h.

Referenced by draw().


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

Generated on Fri Mar 4 00:49:58 2011 for Chelton Evans Source by  doxygen 1.5.8