Go to the documentation of this file.
27 #ifndef vtkShaderProgram2_h
28 #define vtkShaderProgram2_h
286 { this->SetUniform1f(
name, &
val); }
298 { this->SetUniform1i(
name, &
val); }
309 { this->SetUniform1f(loc, &
val); }
316 { this->SetUniform1i(loc, &
val); }
395 #define vtkShaderProgram2SetUniformCopyCastMacro(toLetter, toType, num) \
396 template<typename fromType> \
397 void vtkShaderProgram2::SetUniform##num##toLetter##t(const char *name, fromType *fvalues) \
399 toType tvalues[num]; \
400 for (int i=0; i<num; ++i) \
402 tvalues[i] = static_cast<toType>(fvalues[i]); \
404 this->SetUniform##num##toLetter(name, tvalues); \
406 template<typename fromType> \
407 void vtkShaderProgram2::SetUniform##num##toLetter##t(int location, fromType *fvalues) \
409 assert(location!=-1); \
410 toType tvalues[num]; \
411 for (int i=0; i<num; ++i) \
413 tvalues[i] = static_cast<toType>(fvalues[i]); \
415 this->SetUniform##num##toLetter(location, tvalues); \
int GetUniformLocationInternal(const char *name)
@ VTK_SHADER_PROGRAM2_LINK_SUCCEEDED
void SetUniform3i(int loc, int *val)
void SetUniform3ft(const char *name, T *value)
vtkTimeStamp LastSendUniformsTime
#define vtkGetObjectMacro(name, type)
void SetUniform2f(const char *name, float *val)
void SetUniformi(const char *name, int val)
void SetUniform2it(int loc, T *value)
void SetUniform1f(int loc, float *val)
void SetUniform4it(int loc, T *value)
@ VTK_GEOMETRY_SHADER_OUT_TYPE_TRIANGLE_STRIP
#define vtkShaderProgram2SetUniformCopyCastMacro(toLetter, toType, num)
vtkShader2Collection * Shaders
a list of Shader2 objects.
record modification and/or execution time
bool DisplayListUnderCreationInCompileMode()
virtual void ReleaseGraphicsResources()
#define vtkTypeMacro(thisClass, superclass)
vtkShaderProgram2GeometryOutType
int GetAttributeLocation(const char *name)
abstract base class for most VTK objects
virtual void SetUniformVariables(vtkUniformVariables *variables)
vtkTimeStamp LastLinkTime
vtkUniformVariables * UniformVariables
void SetUniform1f(const char *name, float *val)
@ VTK_SHADER_PROGRAM2_LINK_FAILED
@ VTK_GEOMETRY_SHADER_OUT_TYPE_POINTS
vtkRenderWindow * GetContext()
bool HasGeometryShaders()
void PrintActiveUniformVariablesOnCout()
void SetUniform1ft(const char *name, T *value)
bool HasTessellationEvaluationShaders()
void SetUniform1it(const char *name, T *value)
void SetUniform2ft(const char *name, T *value)
void SetUniform4it(const char *name, T *value)
@ VTK_GEOMETRY_SHADER_IN_TYPE_LINES
void SetUniformf(int loc, float val)
void SetUniform1ft(int loc, T *value)
void SetUniform3i(const char *name, int *val)
GLuint const GLchar * name
Interface class for querying and using OpenGL extensions.
GLsizei const GLfloat * value
@ VTK_GEOMETRY_SHADER_IN_TYPE_TRIANGLES
vtkShaderProgram2GeometryInType
size_t LastValidateLogCapacity
void SetUniform2i(int loc, int *val)
void SetUniform4f(int loc, float *val)
void SetUniform1i(int loc, int *val)
const char * GetLastValidateLog()
void SetUniform4f(const char *name, float *val)
void SetUniform4i(int loc, int *val)
void SetContext(vtkRenderWindow *context)
void RestoreFixedPipeline()
a simple class to control print indentation
void SetUniform4i(const char *name, int *val)
VTKRENDERINGOPENGL_EXPORT PFNGLGETUNIFORMLOCATIONPROC GetUniformLocation
int GetUniformLocation(const char *name)
#define vtkGetMacro(name, type)
@ VTK_GEOMETRY_SHADER_IN_TYPE_TRIANGLES_ADJACENCY
void PrintActiveUniformVariables(ostream &os, vtkIndent indent)
bool LoadRequiredExtensions(vtkRenderWindow *context)
@ VTK_GEOMETRY_SHADER_IN_TYPE_LINES_ADJACENCY
static vtkShaderProgram2 * New()
void SetUniform2f(int loc, float *val)
void PrintSelf(ostream &os, vtkIndent indent)
void SetUniform2it(const char *name, T *value)
vtkSetMacro(IgnoreDriverBugs, bool)
void SetUniform2i(const char *name, int *val)
void SetUniformf(const char *name, float val)
void SetUniform4ft(int loc, T *value)
void SetUniform1it(int loc, T *value)
void SetUniform2ft(int loc, T *value)
@ VTK_GEOMETRY_SHADER_IN_TYPE_POINTS
static bool IsSupported(vtkRenderWindow *context)
void SetUniform3it(int loc, T *value)
void SetUniformi(int loc, int val)
void SetUniform3ft(int loc, T *value)
create a window for renderers to draw into
virtual ~vtkShaderProgram2()
void SetUniform3it(const char *name, T *value)
const char * GetLastLinkLog()
void SetUniform3f(int loc, float *val)
void SetUniform3f(const char *name, float *val)
@ VTK_GEOMETRY_SHADER_OUT_TYPE_LINE_STRIP
vtkShaderProgram2BuildStatus
void SetUniform1i(const char *name, int *val)
size_t LastLinkLogCapacity
void SetUniform4ft(const char *name, T *value)
vtkWeakPointer< vtkRenderWindow > Context
@ VTK_SHADER_PROGRAM2_COMPILE_FAILED
bool HasFragmentShaders()
#define VTKRENDERINGOPENGL_EXPORT
bool HasTessellationControlShaders()