20 #ifndef vtkShaderProgram_h 21 #define vtkShaderProgram_h 23 #include "vtkRenderingOpenGL2Module.h" 32 class VertexArrayObject;
98 bool isBound()
const {
return this->Bound; }
101 void ReleaseGraphicsResources(
vtkWindow *win);
113 bool EnableAttributeArray(
const char *
name);
119 bool DisableAttributeArray(
const char *name);
136 bool UseAttributeArray(
const char *name,
int offset,
size_t stride,
137 int elementType,
int elementTupleSize,
158 bool SetAttributeArray(
const char *name,
const T &array,
162 bool SetUniformi(
const char *name,
int v);
163 bool SetUniformf(
const char *name,
float v);
164 bool SetUniform2i(
const char *name,
const int v[2]);
165 bool SetUniform2f(
const char *name,
const float v[2]);
166 bool SetUniform3f(
const char *name,
const float v[3]);
167 bool SetUniform4f(
const char *name,
const float v[4]);
168 bool SetUniform3uc(
const char *name,
const unsigned char v[3]);
169 bool SetUniform4uc(
const char *name,
const unsigned char v[4]);
170 bool SetUniformMatrix(
const char *name,
vtkMatrix3x3 *v);
171 bool SetUniformMatrix(
const char *name,
vtkMatrix4x4 *v);
172 bool SetUniformMatrix3x3(
const char *name,
float *v);
173 bool SetUniformMatrix4x4(
const char *name,
float *v);
176 bool SetUniform1iv(
const char *name,
const int count,
const int *
f);
177 bool SetUniform1fv(
const char *name,
const int count,
const float *f);
178 bool SetUniform2fv(
const char *name,
const int count,
const float (*f)[2]);
179 bool SetUniform3fv(
const char *name,
const int count,
const float (*f)[3]);
180 bool SetUniform4fv(
const char *name,
const int count,
const float (*f)[4]);
237 bool SetAttributeArrayInternal(
const char *name,
void *
buffer,
238 int type,
int tupleSize,
252 friend class VertexArrayObject;
255 int FindAttributeArray(
const char *name);
256 int FindUniform(
const char *name);
int GetHandle() const
Get the handle of the shader program.
GLuint GLuint GLsizei GLenum type
VTKRENDERINGOPENGL_EXPORT PFNGLDETACHSHADERPROC DetachShader
abstract base class for most VTK objects
represent and manipulate 4x4 transformation matrices
manage Shader Programs within a context
bool isBound() const
Check if the program is currently bound, or not.
#define vtkGetMacro(name, type)
The values range across the limits of the numeric type.
GLuint GLuint GLsizei count
std::map< std::string, int > Attributes
#define vtkTypeMacro(thisClass, superclass)
void SetMD5Hash(const std::string &hash)
window superclass for vtkRenderWindow
GLuint const GLchar * name
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
vtkShader * GeometryShader
vtkShader * FragmentShader
#define vtkGetObjectMacro(name, type)
VTKRENDERINGOPENGL_EXPORT PFNGLATTACHSHADERPROC AttachShader
NormalizeOption
Options for attribute normalization.
std::string GetMD5Hash() const
Vertex or Fragment shader, combined into a ShaderProgram.
std::string GetError() const
Get the error message (empty if none) for the shader program.
#define vtkBooleanMacro(name, type)
represent and manipulate 3x3 transformation matrices
GLsizei const GLchar ** string
VTKRENDERINGOPENGL_EXPORT PFNGLCOMPILESHADERPROC CompileShader
The ShaderProgram uses one or more Shader objects.
#define vtkSetMacro(name, type)