63 #ifndef vtkOpenGLState_h
64 #define vtkOpenGLState_h
67 #include "vtkRenderingOpenGL2Module.h"
94 void vtkglColorMask(
unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a);
101 this->vtkglBlendFuncSeparate(sfactor, dfactor, sfactor, dfactor);
104 unsigned int sfactorAlpha,
unsigned int dfactorAlpha);
169 template <
typename T>
175 ((*this->State).*(this->Method))(this->Value);
210 this->PushDrawFramebufferBinding();
211 this->PushReadFramebufferBinding();
218 this->PopReadFramebufferBinding();
219 this->PopDrawFramebufferBinding();
239 :
public ScopedValue<std::array<unsigned char, 4> >
279 this->State->vtkglGetBooleanv(
name, &val);
280 this->Value = val == 1;
284 this->State->SetEnumState(this->Name, this->Value);
327 int vtktype,
int numComponents,
bool needInteger,
bool needFloat,
bool needSRGB);
364 unsigned int DrawBuffers[10];
abstract base class for most VTK objects
Internal class which encapsulates OpenGL FramebufferObject.
manage Shader Programs within a context
unsigned int GetDrawBuffer(unsigned int)
unsigned int GetBinding()
unsigned int GetReadBuffer()
vtkOpenGLFramebufferObject * Framebuffer
BufferBindingState ReadBinding
BufferBindingState DrawBinding
unsigned int BlendEquationValue1
std::array< unsigned int, 4 > BlendFunc
std::array< unsigned char, 4 > ColorMask
unsigned int CullFaceMode
unsigned int BlendEquationValue2
std::array< int, 4 > Viewport
std::array< int, 4 > Scissor
std::array< float, 4 > ClearColor
unsigned int ActiveTexture
ScopedglActiveTexture(vtkOpenGLState *state)
ScopedglBlendFuncSeparate(vtkOpenGLState *state)
ScopedglClearColor(vtkOpenGLState *state)
ScopedglColorMask(vtkOpenGLState *state)
ScopedglDepthFunc(vtkOpenGLState *state)
ScopedglDepthMask(vtkOpenGLState *state)
ScopedglEnableDisable(vtkOpenGLState *state, unsigned int name)
ScopedglScissor(vtkOpenGLState *state)
ScopedglViewport(vtkOpenGLState *state)
void Scissor(std::array< int, 4 > val)
void vtkglViewport(int x, int y, int width, int height)
void vtkReadBuffer(unsigned int, vtkOpenGLFramebufferObject *)
void vtkglGetIntegerv(unsigned int pname, int *params)
bool GetEnumState(unsigned int name)
void vtkDrawBuffers(unsigned int n, unsigned int *, vtkOpenGLFramebufferObject *)
void CheckState()
Check that this OpenGL state has consistent values with the current OpenGL context.
std::list< BufferBindingState > DrawBindings
void ResetGLBlendEquationState()
void ResetGLScissorState()
void SetVBOCache(vtkOpenGLVertexBufferObjectCache *val)
void vtkglActiveTexture(unsigned int)
void vtkBindFramebuffer(unsigned int target, vtkOpenGLFramebufferObject *fo)
void Initialize(vtkOpenGLRenderWindow *)
Initialize OpenGL context using current state.
vtkOpenGLShaderCache * ShaderCache
void ResetGLActiveTexture()
std::map< const vtkTextureObject *, int > TextureResourceIds
void PopFramebufferBindings()
void ResetEnumState(unsigned int name)
convenience method to reset an enum state from current openGL context
~vtkOpenGLState() override
void ColorMask(std::array< unsigned char, 4 > val)
void PopDrawFramebufferBinding()
void SetTextureUnitManager(vtkTextureUnitManager *textureUnitManager)
Set the texture unit manager.
void vtkglDrawBuffers(unsigned int n, unsigned int *)
void vtkglCullFace(unsigned int val)
void Viewport(std::array< int, 4 > val)
void vtkglReadBuffer(unsigned int)
void vtkglBlendFuncSeparate(unsigned int sfactorRGB, unsigned int dfactorRGB, unsigned int sfactorAlpha, unsigned int dfactorAlpha)
void vtkglBindFramebuffer(unsigned int target, unsigned int fb)
void ResetGLDepthMaskState()
void ActivateTexture(vtkTextureObject *)
Activate a texture unit for this texture.
void vtkglDisable(unsigned int cap)
void vtkglGetDoublev(unsigned int pname, double *params)
void ResetGLDepthFuncState()
static vtkOpenGLState * New()
void BlendFuncSeparate(std::array< unsigned int, 4 > val)
void vtkglBlendFunc(unsigned int sfactor, unsigned int dfactor)
void vtkglEnable(unsigned int cap)
void PushFramebufferBindings()
Store/Restore the current framebuffer bindings and buffers.
void ResetGLClearDepthState()
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...
void vtkglClearDepth(double depth)
void ResetGLColorMaskState()
void PopReadFramebufferBinding()
void vtkglDrawBuffer(unsigned int)
void InitializeTextureInternalFormats()
void vtkglGetFloatv(unsigned int pname, float *params)
void PushReadFramebufferBinding()
void vtkglScissor(int x, int y, int width, int height)
void VerifyNoActiveTextures()
Check to make sure no textures have been left active.
void vtkglColorMask(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
void vtkglDepthMask(unsigned char flag)
void vtkglBlendEquationSeparate(unsigned int col, unsigned int alpha)
void vtkglClearColor(float red, float green, float blue, float alpha)
void DeactivateTexture(vtkTextureObject *)
Deactivate a previously activated texture.
std::list< BufferBindingState > ReadBindings
void vtkglDepthFunc(unsigned int val)
void PushDrawFramebufferBinding()
void vtkglClear(unsigned int mask)
void SetEnumState(unsigned int name, bool value)
void ResetGLViewportState()
void ResetGLClearColorState()
void ClearColor(std::array< float, 4 > val)
void vtkglBlendEquation(unsigned int val)
void ResetGLCullFaceState()
void vtkglGetBooleanv(unsigned int pname, unsigned char *params)
vtkTextureUnitManager * GetTextureUnitManager()
Returns its texture unit manager object.
void ResetFramebufferBindings()
vtkOpenGLVertexBufferObjectCache * VBOCache
void ResetGLBlendFuncState()
void GetBlendFuncState(int *)
int GetTextureUnitForTexture(vtkTextureObject *)
Get the texture unit for a given texture object.
vtkTextureUnitManager * TextureUnitManager
manage vertex buffer objects shared within a context
abstracts an OpenGL texture object.
allocate/free texture units.
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define VTK_UNICODE_STRING