 |
VTK
9.0.1
|
Go to the documentation of this file.
22 #ifndef vtkOpenGLShaderCache_h
23 #define vtkOpenGLShaderCache_h
26 #include "vtkRenderingOpenGL2Module.h"
88 const char* vertexCode,
const char* fragmentCode,
const char* geometryCode);
virtual vtkShaderProgram * ReadyShaderProgram(std::map< vtkShader::Type, vtkShader * > shaders, vtkTransformFeedback *cap=nullptr)
virtual unsigned int ReplaceShaderValues(std::string &VSSource, std::string &FSSource, std::string &GSSource)
virtual void ReleaseGraphicsResources(vtkWindow *win)
Free up any resources being used by the provided shader.
virtual vtkShaderProgram * GetShaderProgram(const char *vertexCode, const char *fragmentCode, const char *geometryCode)
vtkShaderProgram * LastShaderBound
abstract base class for most VTK objects
virtual vtkShaderProgram * GetShaderProgram(std::map< vtkShader::Type, vtkShader * > shaders)
~vtkOpenGLShaderCache() override
window superclass for vtkRenderWindow
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
The ShaderProgram uses one or more Shader objects.
void SetElapsedTime(float val)
a simple class to control print indentation
void ReleaseCurrentShader()
Release the current shader.
manage Shader Programs within a context
virtual vtkShaderProgram * ReadyShaderProgram(vtkShaderProgram *shader, vtkTransformFeedback *cap=nullptr)
virtual vtkShaderProgram * ReadyShaderProgram(const char *vertexCode, const char *fragmentCode, const char *geometryCode, vtkTransformFeedback *cap=nullptr)
virtual int BindShader(vtkShaderProgram *shader)
static vtkOpenGLShaderCache * New()
virtual void ClearLastShaderBound()
Get/Clear the last Shader bound, called by shaders as they release their graphics resources.