13#ifndef vtkOpenGLShaderCache_h
14#define vtkOpenGLShaderCache_h
17#include "vtkRenderingOpenGL2Module.h"
21VTK_ABI_NAMESPACE_BEGIN
42 vtkSetMacro(SyncGLSLShaderVersion,
bool);
43 vtkGetMacro(SyncGLSLShaderVersion,
bool);
44 vtkBooleanMacro(SyncGLSLShaderVersion,
bool);
51 const char* geometryCode,
const char* tessControlCode,
const char* tessEvalCode,
93 std::string& GSSource, std::string& TCSSource, std::string& TESSource);
96 const char* geometryCode,
const char* tessControlCode,
const char* tessEvalCode);
a simple class to control print indentation
abstract base class for most VTK objects
manage Shader Programs within a context
virtual vtkShaderProgram * ReadyShaderProgram(std::map< vtkShader::Type, vtkShader * > shaders, vtkTransformFeedback *cap=nullptr)
virtual vtkShaderProgram * GetShaderProgram(const char *vertexCode, const char *fragmentCode, const char *geometryCode, const char *tessControlCode, const char *tessEvalCode)
virtual int BindShader(vtkShaderProgram *shader)
~vtkOpenGLShaderCache() override
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual vtkShaderProgram * ReadyShaderProgram(const char *vertexCode, const char *fragmentCode, const char *geometryCode, const char *tessControlCode, const char *tessEvalCode, vtkTransformFeedback *cap=nullptr)
void SetElapsedTime(float val)
virtual vtkShaderProgram * ReadyShaderProgram(vtkShaderProgram *shader, vtkTransformFeedback *cap=nullptr)
vtkShaderProgram * LastShaderBound
void ReleaseCurrentShader()
Release the current shader.
static vtkOpenGLShaderCache * New()
bool SyncGLSLShaderVersion
virtual vtkShaderProgram * GetShaderProgram(std::map< vtkShader::Type, vtkShader * > shaders)
virtual unsigned int ReplaceShaderValues(std::string &VSSource, std::string &FSSource, std::string &GSSource, std::string &TCSSource, std::string &TESSource)
virtual void ReleaseGraphicsResources(vtkWindow *win)
Free up any resources being used by the provided shader.
virtual void ClearLastShaderBound()
Get/Clear the last Shader bound, called by shaders as they release their graphics resources.
virtual vtkShaderProgram * ReadyShaderProgram(const char *vertexCode, const char *fragmentCode, const char *geometryCode, vtkTransformFeedback *cap=nullptr)
The ShaderProgram uses one or more Shader objects.
window superclass for vtkRenderWindow