VTK  9.0.20200920
vtkOpenGLState.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLState.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
63 #ifndef vtkOpenGLState_h
64 #define vtkOpenGLState_h
65 
66 #include "vtkObject.h"
67 #include "vtkRenderingOpenGL2Module.h" // For export macro
68 #include <array> // for ivar
69 #include <list> // for ivar
70 #include <map> // for ivar
71 #include <stack> // for ivar
72 #include <string> // for ivar
73 
78 class vtkTextureObject;
80 
81 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLState : public vtkObject
82 {
83 public:
84  static vtkOpenGLState* New();
85  vtkTypeMacro(vtkOpenGLState, vtkObject);
86 
88  // cached OpenGL methods. By calling these the context will check
89  // the current value prior to making the OpenGL call. This can reduce
90  // the burden on the driver.
91  //
92  void vtkglClearColor(float red, float green, float blue, float alpha);
93  void vtkglClearDepth(double depth);
94  void vtkglDepthFunc(unsigned int val);
95  void vtkglDepthMask(unsigned char flag);
96  void vtkglColorMask(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
97  void vtkglViewport(int x, int y, int width, int height);
98  void vtkglScissor(int x, int y, int width, int height);
99  void vtkglEnable(unsigned int cap);
100  void vtkglDisable(unsigned int cap);
101  void vtkglBlendFunc(unsigned int sfactor, unsigned int dfactor)
102  {
103  this->vtkglBlendFuncSeparate(sfactor, dfactor, sfactor, dfactor);
104  }
105  void vtkglBlendFuncSeparate(unsigned int sfactorRGB, unsigned int dfactorRGB,
106  unsigned int sfactorAlpha, unsigned int dfactorAlpha);
107  void vtkglBlendEquation(unsigned int val);
108  void vtkglBlendEquationSeparate(unsigned int col, unsigned int alpha);
109  void vtkglCullFace(unsigned int val);
110  void vtkglActiveTexture(unsigned int);
111 
112  void vtkglBindFramebuffer(unsigned int target, unsigned int fb);
113  void vtkglDrawBuffer(unsigned int);
114  void vtkglDrawBuffers(unsigned int n, unsigned int*);
115  void vtkglReadBuffer(unsigned int);
116 
117  void vtkglPointSize(float);
118  void vtkglLineWidth(float);
119  void vtkglStencilMaskSeparate(unsigned int face, unsigned int mask);
120  void vtkglStencilMask(unsigned int mask);
121  void vtkglStencilOpSeparate(
122  unsigned int face, unsigned int sfail, unsigned int dpfail, unsigned int dppass);
123  void vtkglStencilOp(unsigned int sfail, unsigned int dpfail, unsigned int dppass);
124  void vtkglStencilFuncSeparate(unsigned int face, unsigned int func, int ref, unsigned int mask);
125  void vtkglStencilFunc(unsigned int func, int ref, unsigned int mask);
126 
127  void vtkBindFramebuffer(unsigned int target, vtkOpenGLFramebufferObject* fo);
128  void vtkDrawBuffers(unsigned int n, unsigned int*, vtkOpenGLFramebufferObject*);
129  void vtkReadBuffer(unsigned int, vtkOpenGLFramebufferObject*);
130 
131  void vtkglPixelStorei(unsigned int, int);
133 
135  // Methods to reset the state to the current OpenGL context value.
136  // These methods are useful when interfacing with third party code
137  // that may have changed the opengl state.
138  //
139  void ResetGLClearColorState();
140  void ResetGLClearDepthState();
141  void ResetGLDepthFuncState();
142  void ResetGLDepthMaskState();
143  void ResetGLColorMaskState();
144  void ResetGLViewportState();
145  void ResetGLScissorState();
146  void ResetGLBlendFuncState();
147  void ResetGLBlendEquationState();
148  void ResetGLCullFaceState();
149  void ResetGLActiveTexture();
151 
153  // OpenGL functions that we provide an API for even though they may
154  // not hold any state.
155  void vtkglClear(unsigned int mask);
157 
159  // Get methods that can be used to query state if the state is not cached
160  // they fall through and call the underlying opengl functions
161  void vtkglGetBooleanv(unsigned int pname, unsigned char* params);
162  void vtkglGetIntegerv(unsigned int pname, int* params);
163  void vtkglGetDoublev(unsigned int pname, double* params);
164  void vtkglGetFloatv(unsigned int pname, float* params);
166 
167  // convenience to get all 4 values at once
168  void GetBlendFuncState(int*);
169 
170  // convenience to return a bool
171  // as opposed to a unsigned char
172  bool GetEnumState(unsigned int name);
173 
174  // convenience method to set a enum (glEnable/glDisable)
175  void SetEnumState(unsigned int name, bool value);
176 
180  void ResetEnumState(unsigned int name);
181 
182  // superclass for Scoped subclasses
183  template <typename T>
184  class VTKRENDERINGOPENGL2_EXPORT ScopedValue
185  {
186  public:
187  ~ScopedValue() // restore value
188  {
189  ((*this->State).*(this->Method))(this->Value);
190  }
191 
192  protected:
194  T Value;
195  void (vtkOpenGLState::*Method)(T);
196  };
197 
201  void ActivateTexture(vtkTextureObject*);
202 
206  void DeactivateTexture(vtkTextureObject*);
207 
211  int GetTextureUnitForTexture(vtkTextureObject*);
212 
216  void VerifyNoActiveTextures();
217 
219 
223  {
224  this->PushDrawFramebufferBinding();
225  this->PushReadFramebufferBinding();
226  }
227  void PushDrawFramebufferBinding();
228  void PushReadFramebufferBinding();
229 
231  {
232  this->PopReadFramebufferBinding();
233  this->PopDrawFramebufferBinding();
234  }
235  void PopDrawFramebufferBinding();
236  void PopReadFramebufferBinding();
237 
238  void ResetFramebufferBindings();
240 
241  // Scoped classes you can use to save state
242  class VTKRENDERINGOPENGL2_EXPORT ScopedglDepthMask : public ScopedValue<unsigned char>
243  {
244  public:
246  };
247  class VTKRENDERINGOPENGL2_EXPORT ScopedglClearColor : public ScopedValue<std::array<float, 4>>
248  {
249  public:
251  };
252  class VTKRENDERINGOPENGL2_EXPORT ScopedglColorMask
253  : public ScopedValue<std::array<unsigned char, 4>>
254  {
255  public:
257  };
258  class VTKRENDERINGOPENGL2_EXPORT ScopedglScissor : public ScopedValue<std::array<int, 4>>
259  {
260  public:
262  };
263  class VTKRENDERINGOPENGL2_EXPORT ScopedglViewport : public ScopedValue<std::array<int, 4>>
264  {
265  public:
267  };
268  class VTKRENDERINGOPENGL2_EXPORT ScopedglBlendFuncSeparate
269  : public ScopedValue<std::array<unsigned int, 4>>
270  {
271  public:
273  };
274  class VTKRENDERINGOPENGL2_EXPORT ScopedglDepthFunc : public ScopedValue<unsigned int>
275  {
276  public:
278  };
279  class VTKRENDERINGOPENGL2_EXPORT ScopedglActiveTexture : public ScopedValue<unsigned int>
280  {
281  public:
283  };
284 
286  {
287  public:
289  {
290  this->State = state;
291  this->Name = name;
292  unsigned char val;
293  this->State->vtkglGetBooleanv(name, &val);
294  this->Value = val == 1;
295  }
296  ~ScopedglEnableDisable() // restore value
297  {
298  this->State->SetEnumState(this->Name, this->Value);
299  }
300 
301  protected:
303  unsigned int Name;
304  bool Value;
305  };
306 
311 
315  void SetTextureUnitManager(vtkTextureUnitManager* textureUnitManager);
316 
322 
323  // get the shader program cache for this context
324  vtkGetObjectMacro(ShaderCache, vtkOpenGLShaderCache);
325 
326  // get the vbo buffer cache for this context
327  vtkGetObjectMacro(VBOCache, vtkOpenGLVertexBufferObjectCache);
328 
329  // set the VBO Cache to use for this state
330  // this allows two contexts to share VBOs
331  // basically this is OPenGL's support for shared
332  // lists
334 
341  int vtktype, int numComponents, bool needInteger, bool needFloat, bool needSRGB);
342 
346  void GetCurrentDrawFramebufferState(unsigned int& drawBinding, unsigned int& drawBuffer);
347 
362  void Reset();
363 
369  void Push();
370 
375  void Pop();
376 
380  std::string const& GetVersion() { return this->Version; }
381 
385  std::string const& GetVendor() { return this->Vendor; }
386 
391  std::string const& GetRenderer() { return this->Renderer; }
392 
393 protected:
394  vtkOpenGLState(); // set initial values
395  ~vtkOpenGLState() override;
396 
397  void BlendFuncSeparate(std::array<unsigned int, 4> val);
398  void ClearColor(std::array<float, 4> val);
399  void ColorMask(std::array<unsigned char, 4> val);
400  void Scissor(std::array<int, 4> val);
401  void Viewport(std::array<int, 4> val);
402 
403  int TextureInternalFormats[VTK_UNICODE_STRING][3][5];
405 
407  std::map<const vtkTextureObject*, int> TextureResourceIds;
408 
413  void CheckState();
414 
415  // framebuffers hold state themselves
416  // specifically they hold their draw and read buffers
417  // and when bound they reinstate those buffers
418  class VTKRENDERINGOPENGL2_EXPORT BufferBindingState
419  {
420  public:
422  unsigned int Binding;
423  unsigned int ReadBuffer;
424  unsigned int DrawBuffers[10];
425  unsigned int GetBinding();
426  unsigned int GetDrawBuffer(unsigned int);
427  unsigned int GetReadBuffer();
428  };
429  std::list<BufferBindingState> DrawBindings;
430  std::list<BufferBindingState> ReadBindings;
431 
432  // static opengl properties
439 
440  class VTKRENDERINGOPENGL2_EXPORT GLState
441  {
442  public:
443  double ClearDepth;
444  unsigned char DepthMask;
445  unsigned int DepthFunc;
446  unsigned int BlendEquationValue1;
447  unsigned int BlendEquationValue2;
448  unsigned int CullFaceMode;
449  unsigned int ActiveTexture;
450 
451  float PointSize;
452  float LineWidth;
453  unsigned int StencilMaskFront;
454  unsigned int StencilMaskBack;
455  std::array<unsigned int, 3> StencilFuncFront;
456  std::array<unsigned int, 3> StencilFuncBack;
457  std::array<unsigned int, 3> StencilOpFront;
458  std::array<unsigned int, 3> StencilOpBack;
459 
464 
465  std::array<float, 4> ClearColor;
466  std::array<unsigned char, 4> ColorMask;
467  std::array<int, 4> Viewport;
468  std::array<int, 4> Scissor;
469  std::array<unsigned int, 4> BlendFunc;
470  bool DepthTest;
471  bool CullFace;
474  bool Blend;
478  int BoundVAO;
482  GLState() = default;
483  };
484 
485  std::stack<GLState> Stack;
486 
489 
490 private:
491  vtkOpenGLState(const vtkOpenGLState&) = delete;
492  void operator=(const vtkOpenGLState&) = delete;
493 };
494 
495 #endif
496 
497 // VTK-HeaderTest-Exclude: vtkOpenGLState.h
vtkOpenGLState::GLState::BlendFunc
std::array< unsigned int, 4 > BlendFunc
Definition: vtkOpenGLState.h:469
vtkOpenGLState::ReadBindings
std::list< BufferBindingState > ReadBindings
Definition: vtkOpenGLState.h:430
vtkOpenGLState::InitializeTextureInternalFormats
void InitializeTextureInternalFormats()
vtkOpenGLState::MaxTextureSize
int MaxTextureSize
Definition: vtkOpenGLState.h:435
vtkOpenGLState::Vendor
std::string Vendor
Definition: vtkOpenGLState.h:436
vtkOpenGLState::GLState
Definition: vtkOpenGLState.h:440
vtkOpenGLState::ScopedglClearColor
Definition: vtkOpenGLState.h:247
vtkOpenGLState::ScopedValue::Value
T Value
Definition: vtkOpenGLState.h:194
vtkOpenGLState::ColorMask
void ColorMask(std::array< unsigned char, 4 > val)
vtkOpenGLState::GetVersion
std::string const & GetVersion()
Return the opengl version for this context.
Definition: vtkOpenGLState.h:380
vtkX3D::alpha
Definition: vtkX3D.h:256
vtkOpenGLState::GLState::CubeMapSeamless
bool CubeMapSeamless
Definition: vtkOpenGLState.h:476
vtkOpenGLState::~vtkOpenGLState
~vtkOpenGLState() override
vtkOpenGLState::VBOCache
vtkOpenGLVertexBufferObjectCache * VBOCache
Definition: vtkOpenGLState.h:487
vtkOpenGLState::GetDefaultTextureInternalFormat
int GetDefaultTextureInternalFormat(int vtktype, int numComponents, bool needInteger, bool needFloat, bool needSRGB)
Get a mapping of vtk data types to native texture formats for this window we put this on the RenderWi...
vtkX3D::value
Definition: vtkX3D.h:226
vtkOpenGLState::Renderer
std::string Renderer
Definition: vtkOpenGLState.h:437
vtkOpenGLState::GetTextureUnitManager
vtkTextureUnitManager * GetTextureUnitManager()
Returns its texture unit manager object.
vtkOpenGLState::ScopedValue::~ScopedValue
~ScopedValue()
Definition: vtkOpenGLState.h:187
vtkOpenGLState::BufferBindingState
Definition: vtkOpenGLState.h:418
vtkOpenGLState::GLState::UnpackRowLength
int UnpackRowLength
Definition: vtkOpenGLState.h:462
vtkOpenGLState::GLState::BoundProgram
int BoundProgram
Definition: vtkOpenGLState.h:479
vtkOpenGLState::GLState::BlendEquationValue1
unsigned int BlendEquationValue1
Definition: vtkOpenGLState.h:446
VTK_UNICODE_STRING
#define VTK_UNICODE_STRING
Definition: vtkType.h:71
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkOpenGLState::GLState::BlendEquationValue2
unsigned int BlendEquationValue2
Definition: vtkOpenGLState.h:447
vtkOpenGLState::PushFramebufferBindings
void PushFramebufferBindings()
Store/Restore the current framebuffer bindings and buffers.
Definition: vtkOpenGLState.h:222
vtkOpenGLState::GLState::UnpackImageHeight
int UnpackImageHeight
Definition: vtkOpenGLState.h:463
vtkOpenGLState::ScopedglEnableDisable::Value
bool Value
Definition: vtkOpenGLState.h:304
vtkOpenGLState::GLState::StencilMaskFront
unsigned int StencilMaskFront
Definition: vtkOpenGLState.h:453
vtkOpenGLState::GLState::ScissorTest
bool ScissorTest
Definition: vtkOpenGLState.h:472
vtkOpenGLState::GLState::DepthMask
unsigned char DepthMask
Definition: vtkOpenGLState.h:444
vtkOpenGLFramebufferObject
Internal class which encapsulates OpenGL FramebufferObject.
Definition: vtkOpenGLFramebufferObject.h:181
vtkOpenGLState::GLState::StencilFuncFront
std::array< unsigned int, 3 > StencilFuncFront
Definition: vtkOpenGLState.h:455
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkOpenGLState::ScopedglEnableDisable::State
vtkOpenGLState * State
Definition: vtkOpenGLState.h:302
vtkOpenGLState::ScopedValue
Definition: vtkOpenGLState.h:184
vtkOpenGLState::ScopedglEnableDisable::ScopedglEnableDisable
ScopedglEnableDisable(vtkOpenGLState *state, unsigned int name)
Definition: vtkOpenGLState.h:288
vtkOpenGLState::GLState::CullFace
bool CullFace
Definition: vtkOpenGLState.h:471
vtkOpenGLState::GLState::UnpackAlignment
int UnpackAlignment
Definition: vtkOpenGLState.h:461
vtkOpenGLState::GLState::ActiveTexture
unsigned int ActiveTexture
Definition: vtkOpenGLState.h:449
vtkOpenGLState::Version
std::string Version
Definition: vtkOpenGLState.h:438
vtkOpenGLState::TextureUnitManager
vtkTextureUnitManager * TextureUnitManager
Definition: vtkOpenGLState.h:406
vtkOpenGLState::ClearColor
void ClearColor(std::array< float, 4 > val)
vtkOpenGLState::Push
void Push()
Push all the recorded state onto the stack.
vtkOpenGLState::GetCurrentDrawFramebufferState
void GetCurrentDrawFramebufferState(unsigned int &drawBinding, unsigned int &drawBuffer)
Get the current stored state of the draw buffer and binding.
vtkOpenGLState::GLState::LineSmooth
bool LineSmooth
Definition: vtkOpenGLState.h:477
vtkOpenGLState::CheckState
void CheckState()
Check that this OpenGL state has consistent values with the current OpenGL context.
vtkOpenGLState::Initialize
void Initialize(vtkOpenGLRenderWindow *)
Initialize OpenGL context using current state.
vtkOpenGLState::SetTextureUnitManager
void SetTextureUnitManager(vtkTextureUnitManager *textureUnitManager)
Set the texture unit manager.
vtkOpenGLState::ScopedglEnableDisable::Name
unsigned int Name
Definition: vtkOpenGLState.h:303
target
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:965
vtkOpenGLState::TextureResourceIds
std::map< const vtkTextureObject *, int > TextureResourceIds
Definition: vtkOpenGLState.h:407
vtkOpenGLState::ShaderCache
vtkOpenGLShaderCache * ShaderCache
Definition: vtkOpenGLState.h:488
vtkTextureUnitManager
allocate/free texture units.
Definition: vtkTextureUnitManager.h:38
vtkOpenGLState::ScopedglActiveTexture
Definition: vtkOpenGLState.h:279
vtkOpenGLState::ScopedglDepthFunc
Definition: vtkOpenGLState.h:274
vtkOpenGLState::GLState::BoundVAO
int BoundVAO
Definition: vtkOpenGLState.h:478
vtkOpenGLState::GLState::PackAlignment
int PackAlignment
Definition: vtkOpenGLState.h:460
vtkOpenGLState::ScopedglColorMask
Definition: vtkOpenGLState.h:252
vtkX3D::height
Definition: vtkX3D.h:260
vtkOpenGLState::GLState::DrawBinding
BufferBindingState DrawBinding
Definition: vtkOpenGLState.h:480
vtkOpenGLState::GLState::DepthTest
bool DepthTest
Definition: vtkOpenGLState.h:470
vtkOpenGLState::GLState::StencilFuncBack
std::array< unsigned int, 3 > StencilFuncBack
Definition: vtkOpenGLState.h:456
vtkOpenGLState::DrawBindings
std::list< BufferBindingState > DrawBindings
Definition: vtkOpenGLState.h:429
vtkOpenGLState::GetVendor
std::string const & GetVendor()
Return the opengl vendor for this context.
Definition: vtkOpenGLState.h:385
vtkOpenGLState::Pop
void Pop()
Pop the state stack to restore a previous state.
vtkTextureObject
abstracts an OpenGL texture object.
Definition: vtkTextureObject.h:40
vtkOpenGLState::GLState::Viewport
std::array< int, 4 > Viewport
Definition: vtkOpenGLState.h:467
vtkOpenGLState::Stack
std::stack< GLState > Stack
Definition: vtkOpenGLState.h:485
vtkOpenGLState::GLState::Blend
bool Blend
Definition: vtkOpenGLState.h:474
vtkOpenGLState::MajorVersion
int MajorVersion
Definition: vtkOpenGLState.h:433
vtkOpenGLState::GLState::DepthFunc
unsigned int DepthFunc
Definition: vtkOpenGLState.h:445
vtkOpenGLState::Reset
void Reset()
Record the OpenGL state into this class.
vtkOpenGLState::GLState::Scissor
std::array< int, 4 > Scissor
Definition: vtkOpenGLState.h:468
vtkOpenGLState::MinorVersion
int MinorVersion
Definition: vtkOpenGLState.h:434
vtkOpenGLState::ScopedglEnableDisable::~ScopedglEnableDisable
~ScopedglEnableDisable()
Definition: vtkOpenGLState.h:296
vtkOpenGLShaderCache
manage Shader Programs within a context
Definition: vtkOpenGLShaderCache.h:35
vtkOpenGLState::vtkOpenGLState
vtkOpenGLState()
vtkOpenGLState::BufferBindingState::ReadBuffer
unsigned int ReadBuffer
Definition: vtkOpenGLState.h:423
vtkX3D::name
Definition: vtkX3D.h:225
vtkObject.h
vtkOpenGLState::PopFramebufferBindings
void PopFramebufferBindings()
Definition: vtkOpenGLState.h:230
vtkOpenGLState::GLState::PointSize
float PointSize
Definition: vtkOpenGLState.h:451
vtkOpenGLState::ScopedglViewport
Definition: vtkOpenGLState.h:263
vtkOpenGLState::GLState::LineWidth
float LineWidth
Definition: vtkOpenGLState.h:452
vtkOpenGLState::ScopedglDepthMask
Definition: vtkOpenGLState.h:242
vtkOpenGLState::GLState::StencilOpFront
std::array< unsigned int, 3 > StencilOpFront
Definition: vtkOpenGLState.h:457
vtkOpenGLState::GLState::MultiSample
bool MultiSample
Definition: vtkOpenGLState.h:475
vtkX3D::string
Definition: vtkX3D.h:496
vtkOpenGLState::Viewport
void Viewport(std::array< int, 4 > val)
vtkOpenGLState::GLState::ReadBinding
BufferBindingState ReadBinding
Definition: vtkOpenGLState.h:481
vtkOpenGLState::GLState::StencilMaskBack
unsigned int StencilMaskBack
Definition: vtkOpenGLState.h:454
vtkOpenGLState::SetVBOCache
void SetVBOCache(vtkOpenGLVertexBufferObjectCache *val)
vtkOpenGLState::GLState::StencilOpBack
std::array< unsigned int, 3 > StencilOpBack
Definition: vtkOpenGLState.h:458
vtkOpenGLState::ScopedglBlendFuncSeparate
Definition: vtkOpenGLState.h:268
vtkOpenGLVertexBufferObjectCache
manage vertex buffer objects shared within a context
Definition: vtkOpenGLVertexBufferObjectCache.h:38
vtkOpenGLState::GetRenderer
std::string const & GetRenderer()
Return the opengl renderer for this context.
Definition: vtkOpenGLState.h:391
vtkOpenGLState::vtkglBlendFunc
void vtkglBlendFunc(unsigned int sfactor, unsigned int dfactor)
Definition: vtkOpenGLState.h:101
vtkOpenGLState::ScopedglScissor
Definition: vtkOpenGLState.h:258
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition: vtkOpenGLRenderWindow.h:53
vtkOpenGLState::GLState::ClearDepth
double ClearDepth
Definition: vtkOpenGLState.h:443
vtkOpenGLState::ScopedglEnableDisable
Definition: vtkOpenGLState.h:285
vtkOpenGLState::ScopedValue::State
vtkOpenGLState * State
Definition: vtkOpenGLState.h:193
vtkOpenGLState::GLState::ColorMask
std::array< unsigned char, 4 > ColorMask
Definition: vtkOpenGLState.h:466
vtkOpenGLState::GLState::StencilTest
bool StencilTest
Definition: vtkOpenGLState.h:473
vtkOpenGLState
OpenGL state storage.
Definition: vtkOpenGLState.h:81
vtkOpenGLState::GLState::ClearColor
std::array< float, 4 > ClearColor
Definition: vtkOpenGLState.h:465
vtkOpenGLState::BufferBindingState::Binding
unsigned int Binding
Definition: vtkOpenGLState.h:422
vtkOpenGLState::GLState::CullFaceMode
unsigned int CullFaceMode
Definition: vtkOpenGLState.h:448
vtkOpenGLState::Scissor
void Scissor(std::array< int, 4 > val)
vtkOpenGLState::BlendFuncSeparate
void BlendFuncSeparate(std::array< unsigned int, 4 > val)