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;
void vtkglGetIntegerv(unsigned int pname, int *params)
bool GetEnumState(unsigned int name)
void vtkglCullFace(unsigned int val)
void vtkglDisable(unsigned int cap)
void vtkglBlendFunc(unsigned int sfactor, unsigned int dfactor)
void vtkglEnable(unsigned int cap)
void vtkglDepthMask(unsigned char flag)
void SetEnumState(unsigned int name, bool value)
void vtkglGetBooleanv(unsigned int pname, unsigned char *params)
vtkVolumeStateRAII(vtkOpenGLState *ostate, bool noOp=false)