16 #ifndef vtkVolumeStateRAII_h 
   17 #define vtkVolumeStateRAII_h 
   27       this->DepthTestEnabled = (glIsEnabled(GL_DEPTH_TEST) != 0);
 
   29       this->BlendEnabled = (glIsEnabled(GL_BLEND) != 0);
 
   31       this->CullFaceEnabled = (glIsEnabled(GL_CULL_FACE) != 0);
 
   34       if (!this->DepthTestEnabled)
 
   36         std::cerr << 
"enabling depth test" << std::endl;
 
   37         glEnable(GL_DEPTH_TEST);
 
   43       glBlendFunc(GL_ONE,GL_ONE_MINUS_SRC_ALPHA);
 
   45       if (!this->BlendEnabled)
 
   51       if (!this->CullFaceEnabled)
 
   53         glEnable(GL_CULL_FACE);
 
   65       glBindBuffer(GL_ARRAY_BUFFER, 0);
 
   66       glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
 
   68       if (!this->CullFaceEnabled)
 
   70         glDisable(GL_CULL_FACE);
 
   73       glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 
   75       if (!this->BlendEnabled)
 
   80       if (!this->DepthTestEnabled)
 
   82         glDisable(GL_DEPTH_TEST);
 
   87   bool DepthTestEnabled;
 
   92 #endif // vtkVolumeStateRAII_h 
static bool GetContextSupportsOpenGL32()