VTK
9.1.0
|
Class to make rendering a full screen quad easier. More...
#include <vtkOpenGLQuadHelper.h>
Public Member Functions | |
vtkOpenGLQuadHelper (vtkOpenGLRenderWindow *, const char *vs, const char *fs, const char *gs) | |
~vtkOpenGLQuadHelper () | |
void | Render () |
void | ReleaseGraphicsResources (vtkWindow *) |
Release graphics resources. More... | |
Public Attributes | |
vtkShaderProgram * | Program |
vtkTimeStamp | ShaderSourceTime |
vtkOpenGLVertexArrayObject * | VAO |
unsigned int | ShaderChangeValue |
Class to make rendering a full screen quad easier.
vtkOpenGLQuadHelper is designed to be used by classes in VTK that need to render a quad to the screen with a shader program. This happens often with render passes or other advanced rendering techniques.
Note that when releasing graphics resources instances of this class should be destroyed. A common use pattern is to conditionally create the instance where used and delete it in ReleaseGraphicsResources and the destructor.
Example usage:
Definition at line 57 of file vtkOpenGLQuadHelper.h.
vtkOpenGLQuadHelper::vtkOpenGLQuadHelper | ( | vtkOpenGLRenderWindow * | , |
const char * | vs, | ||
const char * | fs, | ||
const char * | gs | ||
) |
vtkOpenGLQuadHelper::~vtkOpenGLQuadHelper | ( | ) |
void vtkOpenGLQuadHelper::Render | ( | ) |
void vtkOpenGLQuadHelper::ReleaseGraphicsResources | ( | vtkWindow * | ) |
Release graphics resources.
In general, there's no need to call this explicitly, since vtkOpenGLQuadHelper will invoke it appropriately when needed.
vtkShaderProgram* vtkOpenGLQuadHelper::Program |
Definition at line 60 of file vtkOpenGLQuadHelper.h.
vtkTimeStamp vtkOpenGLQuadHelper::ShaderSourceTime |
Definition at line 61 of file vtkOpenGLQuadHelper.h.
vtkOpenGLVertexArrayObject* vtkOpenGLQuadHelper::VAO |
Definition at line 62 of file vtkOpenGLQuadHelper.h.
unsigned int vtkOpenGLQuadHelper::ShaderChangeValue |
Definition at line 63 of file vtkOpenGLQuadHelper.h.