 |
VTK
9.1.0
|
Go to the documentation of this file.
63 #ifndef vtkOpenGLState_h
64 #define vtkOpenGLState_h
67 #include "vtkRenderingOpenGL2Module.h"
97 void vtkglColorMask(
unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a);
104 this->vtkglBlendFuncSeparate(sfactor, dfactor, sfactor, dfactor);
107 unsigned int sfactorAlpha,
unsigned int dfactorAlpha);
123 unsigned int face,
unsigned int sfail,
unsigned int dpfail,
unsigned int dppass);
124 void vtkglStencilOp(
unsigned int sfail,
unsigned int dpfail,
unsigned int dppass);
184 template <
typename T>
190 ((*this->State).*(this->Method))(this->Value);
225 this->PushDrawFramebufferBinding();
226 this->PushReadFramebufferBinding();
233 this->PopReadFramebufferBinding();
234 this->PopDrawFramebufferBinding();
294 this->State->vtkglGetBooleanv(
name, &val);
295 this->Value = val == 1;
299 this->State->SetEnumState(this->Name, this->Value);
342 int vtktype,
int numComponents,
bool needInteger,
bool needFloat,
bool needSRGB);
431 unsigned int DrawBuffers[10];
std::array< unsigned int, 4 > BlendFunc
std::list< BufferBindingState > ReadBindings
void ResetGLColorMaskState()
void vtkglBindFramebuffer(unsigned int target, unsigned int fb)
void InitializeTextureInternalFormats()
int GetTextureUnitForTexture(vtkTextureObject *)
Get the texture unit for a given texture object.
void vtkReadBuffer(unsigned int, vtkOpenGLFramebufferObject *)
void vtkglGetIntegerv(unsigned int pname, int *params)
void DeactivateTexture(vtkTextureObject *)
Deactivate a previously activated texture.
void ColorMask(std::array< unsigned char, 4 > val)
void vtkglStencilFuncSeparate(unsigned int face, unsigned int func, int ref, unsigned int mask)
std::string const & GetVersion()
Return the opengl version for this context.
~vtkOpenGLState() override
void vtkglEnable(unsigned int cap)
void PopDrawFramebufferBinding()
Store/Restore the current framebuffer bindings and buffers.
void GetBlendFuncState(int *)
vtkOpenGLVertexBufferObjectCache * VBOCache
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 vtkglBlendFuncSeparate(unsigned int sfactorRGB, unsigned int dfactorRGB, unsigned int sfactorAlpha, unsigned int dfactorAlpha)
void vtkglPixelStorei(unsigned int, int)
void vtkglActiveTexture(unsigned int)
vtkTextureUnitManager * GetTextureUnitManager()
Returns its texture unit manager object.
void ResetGLViewportState()
void PushReadFramebufferBinding()
Store/Restore the current framebuffer bindings and buffers.
void ResetEnumState(unsigned int name)
convenience method to reset an enum state from current openGL context
unsigned int BlendEquationValue1
#define VTK_UNICODE_STRING
unsigned int BlendEquationValue2
void PushFramebufferBindings()
Store/Restore the current framebuffer bindings and buffers.
unsigned int StencilMaskFront
void ResetGLClearDepthState()
Internal class which encapsulates OpenGL FramebufferObject.
void vtkglStencilOp(unsigned int sfail, unsigned int dpfail, unsigned int dppass)
std::array< unsigned int, 3 > StencilFuncFront
abstract base class for most VTK objects
void vtkglDisable(unsigned int cap)
ScopedglDepthFunc(vtkOpenGLState *state)
ScopedglEnableDisable(vtkOpenGLState *state, unsigned int name)
void ResetGLBlendEquationState()
void vtkglScissor(int x, int y, int width, int height)
void vtkglStencilOpSeparate(unsigned int face, unsigned int sfail, unsigned int dpfail, unsigned int dppass)
void vtkBindFramebuffer(unsigned int target, vtkOpenGLFramebufferObject *fo)
unsigned int ActiveTexture
void vtkglDrawBuffers(unsigned int n, unsigned int *)
vtkTextureUnitManager * TextureUnitManager
void ClearColor(std::array< float, 4 > val)
void Push()
Push all the recorded state onto the stack.
void GetCurrentDrawFramebufferState(unsigned int &drawBinding, unsigned int &drawBuffer)
Get the current stored state of the draw buffer and binding.
void vtkglDepthFunc(unsigned int val)
void ResetGLActiveTexture()
void vtkglBlendEquation(unsigned int val)
void vtkglBlitFramebuffer(int, int, int, int, int, int, int, int, unsigned int, unsigned int)
Perform a blit but handle some driver bugs safely.
ScopedglViewport(vtkOpenGLState *state)
void vtkglViewport(int x, int y, int width, int height)
ScopedglClearColor(vtkOpenGLState *state)
void CheckState()
Check that this OpenGL state has consistent values with the current OpenGL context.
void Initialize(vtkOpenGLRenderWindow *)
Initialize OpenGL context using current state.
void SetTextureUnitManager(vtkTextureUnitManager *textureUnitManager)
Set the texture unit manager.
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
std::map< const vtkTextureObject *, int > TextureResourceIds
void ResetFramebufferBindings()
Store/Restore the current framebuffer bindings and buffers.
vtkOpenGLShaderCache * ShaderCache
allocate/free texture units.
void ActivateTexture(vtkTextureObject *)
Activate a texture unit for this texture.
BufferBindingState DrawBinding
int BoundElementArrayBuffer
ScopedglDepthMask(vtkOpenGLState *state)
std::array< unsigned int, 3 > StencilFuncBack
std::list< BufferBindingState > DrawBindings
std::string const & GetVendor()
Return the opengl vendor for this context.
void Pop()
Pop the state stack to restore a previous state.
void ResetGLDepthMaskState()
a simple class to control print indentation
abstracts an OpenGL texture object.
void vtkglCullFace(unsigned int val)
void vtkglGetDoublev(unsigned int pname, double *params)
std::array< int, 4 > Viewport
std::stack< GLState > Stack
void PopReadFramebufferBinding()
Store/Restore the current framebuffer bindings and buffers.
void vtkDrawBuffers(unsigned int n, unsigned int *, vtkOpenGLFramebufferObject *)
void SetEnumState(unsigned int name, bool value)
void ResetGLCullFaceState()
void Reset()
Record the OpenGL state into this class.
void vtkglLineWidth(float)
std::array< int, 4 > Scissor
void vtkglDepthMask(unsigned char flag)
manage Shader Programs within a context
void VerifyNoActiveTextures()
Check to make sure no textures have been left active.
void vtkglClearColor(float red, float green, float blue, float alpha)
void PopFramebufferBindings()
Store/Restore the current framebuffer bindings and buffers.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
std::array< unsigned int, 3 > StencilOpFront
void vtkglStencilFunc(unsigned int func, int ref, unsigned int mask)
void ResetGLDepthFuncState()
void vtkglStencilMask(unsigned int mask)
void Viewport(std::array< int, 4 > val)
BufferBindingState ReadBinding
void vtkglClear(unsigned int mask)
void vtkglStencilMaskSeparate(unsigned int face, unsigned int mask)
bool GetEnumState(unsigned int name)
void vtkglDrawBuffer(unsigned int)
unsigned int StencilMaskBack
unsigned int GetReadBuffer()
void SetVBOCache(vtkOpenGLVertexBufferObjectCache *val)
ScopedglScissor(vtkOpenGLState *state)
std::array< unsigned int, 3 > StencilOpBack
void vtkglGetFloatv(unsigned int pname, float *params)
manage vertex buffer objects shared within a context
std::string const & GetRenderer()
Return the opengl renderer for this context.
void vtkglBlendFunc(unsigned int sfactor, unsigned int dfactor)
void vtkglGetBooleanv(unsigned int pname, unsigned char *params)
ScopedglActiveTexture(vtkOpenGLState *state)
unsigned int GetDrawBuffer(unsigned int)
ScopedglColorMask(vtkOpenGLState *state)
void PushDrawFramebufferBinding()
Store/Restore the current framebuffer bindings and buffers.
void vtkglBlendEquationSeparate(unsigned int col, unsigned int alpha)
void vtkglReadBuffer(unsigned int)
std::array< unsigned char, 4 > ColorMask
void vtkglClearDepth(double depth)
ScopedglBlendFuncSeparate(vtkOpenGLState *state)
void ResetGLScissorState()
std::array< float, 4 > ClearColor
void ResetGLClearColorState()
unsigned int CullFaceMode
void Scissor(std::array< int, 4 > val)
void vtkglPointSize(float)
void ResetGLBlendFuncState()
unsigned int GetBinding()
void BlendFuncSeparate(std::array< unsigned int, 4 > val)
static vtkOpenGLState * New()
void vtkglColorMask(unsigned char r, unsigned char g, unsigned char b, unsigned char a)