 |
VTK
9.0.1
|
Go to the documentation of this file.
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];
std::array< unsigned int, 4 > BlendFunc
std::list< BufferBindingState > ReadBindings
void ResetGLColorMaskState()
void vtkglBindFramebuffer(unsigned int target, unsigned int fb)
void InitializeTextureInternalFormats()
vtkOpenGLFramebufferObject * Framebuffer
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)
~vtkOpenGLState() override
void vtkglEnable(unsigned int cap)
void PopDrawFramebufferBinding()
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 vtkglActiveTexture(unsigned int)
vtkTextureUnitManager * GetTextureUnitManager()
Returns its texture unit manager object.
void ResetGLViewportState()
void PushReadFramebufferBinding()
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.
void ResetGLClearDepthState()
Internal class which encapsulates OpenGL FramebufferObject.
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 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 vtkglDepthFunc(unsigned int val)
void ResetGLActiveTexture()
void vtkglBlendEquation(unsigned int val)
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()
vtkOpenGLShaderCache * ShaderCache
allocate/free texture units.
void ActivateTexture(vtkTextureObject *)
Activate a texture unit for this texture.
BufferBindingState DrawBinding
ScopedglDepthMask(vtkOpenGLState *state)
std::list< BufferBindingState > DrawBindings
void ResetGLDepthMaskState()
abstracts an OpenGL texture object.
void vtkglCullFace(unsigned int val)
void vtkglGetDoublev(unsigned int pname, double *params)
std::array< int, 4 > Viewport
void PopReadFramebufferBinding()
void vtkDrawBuffers(unsigned int n, unsigned int *, vtkOpenGLFramebufferObject *)
void SetEnumState(unsigned int name, bool value)
void ResetGLCullFaceState()
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()
void ResetGLDepthFuncState()
void Viewport(std::array< int, 4 > val)
BufferBindingState ReadBinding
void vtkglClear(unsigned int mask)
bool GetEnumState(unsigned int name)
void vtkglDrawBuffer(unsigned int)
unsigned int GetReadBuffer()
void SetVBOCache(vtkOpenGLVertexBufferObjectCache *val)
ScopedglScissor(vtkOpenGLState *state)
void vtkglGetFloatv(unsigned int pname, float *params)
manage vertex buffer objects shared within a 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()
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 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)