59 #ifndef vtkOpenGLState_h 60 #define vtkOpenGLState_h 62 #include "vtkRenderingOpenGL2Module.h" 77 void vtkglClearColor(
float red,
float green,
float blue,
float alpha);
78 void vtkglClearDepth(
double depth);
79 void vtkglDepthFunc(
unsigned int val);
80 void vtkglDepthMask(
unsigned char flag);
81 void vtkglColorMask(
unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a);
82 void vtkglViewport(
int x,
int y,
int width,
int height);
83 void vtkglScissor(
int x,
int y,
int width,
int height);
84 void vtkglEnable(
unsigned int cap);
85 void vtkglDisable(
unsigned int cap);
87 this->vtkglBlendFuncSeparate(sfactor, dfactor, sfactor, dfactor);
89 void vtkglBlendFuncSeparate(
unsigned int sfactorRGB,
unsigned int dfactorRGB,
90 unsigned int sfactorAlpha,
unsigned int dfactorAlpha);
91 void vtkglBlendEquation(
unsigned int val);
92 void vtkglBlendEquationSeparate(
unsigned int col,
unsigned int alpha);
93 void vtkglCullFace(
unsigned int val);
99 void ResetGlClearColorState();
100 void ResetGlClearDepthState();
101 void ResetGlDepthFuncState();
102 void ResetGlDepthMaskState();
103 void ResetGlColorMaskState();
104 void ResetGlViewportState();
105 void ResetGlScissorState();
106 void ResetGlBlendFuncState();
107 void ResetGlBlendEquationState();
108 void ResetGlCullFaceState();
114 void vtkglClear(
unsigned int mask);
122 void vtkglGetBooleanv(
unsigned int pname,
unsigned char *params);
123 void vtkglGetIntegerv(
unsigned int pname,
int *params);
124 void vtkglGetDoublev(
unsigned int pname,
double *params);
125 void vtkglGetFloatv(
unsigned int pname,
float *params);
129 void GetBlendFuncState(
int *);
133 bool GetEnumState(
unsigned int name);
136 void SetEnumState(
unsigned int name,
bool value);
141 void ResetEnumState(
unsigned int name);
144 template <
typename T>
150 ((*this->State).*(this->Method))(this->Value);
166 :
public ScopedValue<std::array<unsigned char, 4> > {
175 :
public ScopedValue<std::array<unsigned int, 4> > {
186 this->State->vtkglGetBooleanv(name, &val);
187 this->Value = val == 1;
191 this->State->SetEnumState(this->Name, this->Value);
205 void BlendFuncSeparate(std::array<unsigned int, 4> val);
206 void ClearColor(std::array<float, 4> val);
207 void ColorMask(std::array<unsigned char, 4> val);
208 void Scissor(std::array<int, 4> val);
209 void Viewport(std::array<int, 4> val);
std::array< int, 4 > Viewport
std::array< float, 4 > ClearColor
std::array< unsigned char, 4 > ColorMask
std::array< int, 4 > Scissor
void vtkglBlendFunc(unsigned int sfactor, unsigned int dfactor)
unsigned int CullFaceMode
unsigned int BlendEquationValue2
unsigned int BlendEquationValue1
ScopedglEnableDisable(vtkOpenGLState *state, unsigned int name)
std::array< unsigned int, 4 > BlendFunc