15 #ifndef vtkVolumeStateRAII_h 16 #define vtkVolumeStateRAII_h 36 this->DepthTestEnabled = ostate->
GetEnumState(GL_DEPTH_TEST);
40 this->CullFaceEnabled = ostate->
GetEnumState(GL_CULL_FACE);
43 GLboolean depthMaskWrite = GL_TRUE;
45 this->DepthMaskEnabled = (depthMaskWrite == GL_TRUE);
69 glBindBuffer(GL_ARRAY_BUFFER, 0);
70 glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
78 this->State->
SetEnumState(GL_CULL_FACE, this->CullFaceEnabled);
84 if (!this->BlendEnabled)
89 this->State->
SetEnumState(GL_DEPTH_TEST, this->DepthTestEnabled);
91 if (this->DepthMaskEnabled)
99 bool DepthTestEnabled;
101 bool CullFaceEnabled;
103 bool DepthMaskEnabled;
107 #endif // vtkVolumeStateRAII_h
vtkVolumeStateRAII(vtkOpenGLState *ostate, bool noOp=false)
void vtkglCullFace(unsigned int val)
void vtkglGetBooleanv(unsigned int pname, unsigned char *params)
void SetEnumState(unsigned int name, bool value)
void vtkglGetIntegerv(unsigned int pname, int *params)
void vtkglDepthMask(unsigned char flag)
bool GetEnumState(unsigned int name)
void vtkglBlendFunc(unsigned int sfactor, unsigned int dfactor)
void vtkglDisable(unsigned int cap)
void vtkglEnable(unsigned int cap)