VTK
|
GLSL Program. More...
#include <vtkShaderProgram2.h>
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
Return 1 if this class is the same type of (or a subclass of) the named class. More... | |
vtkShaderProgram2 * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. More... | |
bool | HasVertexShaders () |
Tells if at least one of the shaders is a vertex shader. More... | |
bool | HasTessellationControlShaders () |
Tells if at least one of the shaders is a tessellation control shader. More... | |
bool | HasTessellationEvaluationShaders () |
Tells if at least one of the shaders is a tessellation evaluation shader. More... | |
bool | HasGeometryShaders () |
Tells if at least one of the shaders is a geometry shader. More... | |
bool | HasFragmentShaders () |
Tells if at least one of the shaders is a fragment shader. More... | |
bool | IsValid () |
Tell if the shader program is valid with the current OpenGL state. More... | |
void | Build () |
If not done yet, compile all the shaders and link the program. More... | |
void | SendUniforms () |
Send the uniform variables values to the program. More... | |
void | PrintActiveUniformVariables (ostream &os, vtkIndent indent) |
Introspection. More... | |
void | PrintActiveUniformVariablesOnCout () |
Call PrintActiveUniformVariables on cout. More... | |
bool | IsUsed () |
Tell if the program is the one currently used by OpenGL. More... | |
void | Use () |
Use the shader program. More... | |
void | Restore () |
Restore the previous shader program (or fixed-pipeline). More... | |
void | RestoreFixedPipeline () |
Force the current shader program to be the fixed-pipeline. More... | |
int | GetLastBuildStatus () |
Tells if the last build: failed during compilation of one of the shader, fails during link of the program or succeeded to link the program. More... | |
const char * | GetLastLinkLog () |
Return the log of the last link as a string. More... | |
const char * | GetLastValidateLog () |
Return the log of the last call to IsValid as a string. More... | |
virtual void | ReleaseGraphicsResources () |
Release OpenGL resource (program id and sub-resources). More... | |
int | GetAttributeLocation (const char *name) |
Returns the generic attribute location. More... | |
bool | DisplayListUnderCreationInCompileMode () |
Tells if a display list is under construction with GL_COMPILE mode. More... | |
int | GetUniformLocation (const char *name) |
Get a uniform's location. More... | |
void | SetUniformf (const char *name, float val) |
Set a uniform value directly. More... | |
void | SetUniform1f (const char *name, float *val) |
void | SetUniform2f (const char *name, float *val) |
void | SetUniform3f (const char *name, float *val) |
void | SetUniform4f (const char *name, float *val) |
void | SetUniformi (const char *name, int val) |
void | SetUniform1i (const char *name, int *val) |
void | SetUniform2i (const char *name, int *val) |
void | SetUniform3i (const char *name, int *val) |
void | SetUniform4i (const char *name, int *val) |
void | SetUniformf (int loc, float val) |
void | SetUniform1f (int loc, float *val) |
void | SetUniform2f (int loc, float *val) |
void | SetUniform3f (int loc, float *val) |
void | SetUniform4f (int loc, float *val) |
void | SetUniformi (int loc, int val) |
void | SetUniform1i (int loc, int *val) |
void | SetUniform2i (int loc, int *val) |
void | SetUniform3i (int loc, int *val) |
void | SetUniform4i (int loc, int *val) |
template<typename T > | |
void | SetUniform1ft (const char *name, T *value) |
template<typename T > | |
void | SetUniform2ft (const char *name, T *value) |
template<typename T > | |
void | SetUniform3ft (const char *name, T *value) |
template<typename T > | |
void | SetUniform4ft (const char *name, T *value) |
template<typename T > | |
void | SetUniform1it (int loc, T *value) |
template<typename T > | |
void | SetUniform2it (int loc, T *value) |
template<typename T > | |
void | SetUniform3it (int loc, T *value) |
template<typename T > | |
void | SetUniform4it (int loc, T *value) |
template<typename T > | |
void | SetUniform1ft (int loc, T *value) |
template<typename T > | |
void | SetUniform2ft (int loc, T *value) |
template<typename T > | |
void | SetUniform3ft (int loc, T *value) |
template<typename T > | |
void | SetUniform4ft (int loc, T *value) |
virtual bool | GetPrintErrors () |
Tell if vtkErrorMacro should be called when there is a build error or not. More... | |
virtual void | SetPrintErrors (bool) |
Tell if vtkErrorMacro should be called when there is a build error or not. More... | |
void | SetContext (vtkRenderWindow *context) |
Get/Set the context. More... | |
vtkRenderWindow * | GetContext () |
Get/Set the context. More... | |
virtual vtkShader2Collection * | GetShaders () |
The list of shaders. More... | |
void | UseProgram () |
Simple direct use of the program without side affects and with error check. More... | |
void | UnuseProgram () |
Simple direct use of the program without side affects and with error check. More... | |
virtual vtkUniformVariables * | GetUniformVariables () |
Get/Set the list of uniform variables values. More... | |
virtual void | SetUniformVariables (vtkUniformVariables *variables) |
Get/Set the list of uniform variables values. More... | |
virtual void | SetGeometryTypeIn (int) |
Specific to the geometry shader part of the program. More... | |
virtual int | GetGeometryTypeIn () |
Specific to the geometry shader part of the program. More... | |
virtual void | SetGeometryVerticesOut (int) |
Specific to the geometry shader part of the program. More... | |
virtual int | GetGeometryVerticesOut () |
Specific to the geometry shader part of the program. More... | |
virtual void | SetGeometryTypeOut (int) |
Specific to the geometry shader part of the program. More... | |
virtual int | GetGeometryTypeOut () |
Specific to the geometry shader part of the program. More... | |
template<typename T > | |
void | SetUniform1it (const char *name, T *value) |
Convenience methods for copy/convert to supported type. More... | |
template<typename T > | |
void | SetUniform2it (const char *name, T *value) |
Convenience methods for copy/convert to supported type. More... | |
template<typename T > | |
void | SetUniform3it (const char *name, T *value) |
Convenience methods for copy/convert to supported type. More... | |
template<typename T > | |
void | SetUniform4it (const char *name, T *value) |
Convenience methods for copy/convert to supported type. More... | |
Public Member Functions inherited from vtkObject | |
vtkBaseTypeMacro (vtkObject, vtkObjectBase) | |
virtual void | DebugOn () |
Turn debugging output on. More... | |
virtual void | DebugOff () |
Turn debugging output off. More... | |
bool | GetDebug () |
Get the value of the debug flag. More... | |
void | SetDebug (bool debugFlag) |
Set the value of the debug flag. More... | |
virtual void | Modified () |
Update the modification time for this object. More... | |
virtual vtkMTimeType | GetMTime () |
Return this object's modified time. More... | |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
vtkCommand * | GetCommand (unsigned long tag) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
void | RemoveObserver (vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
void | RemoveObservers (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
void | RemoveObservers (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
int | HasObserver (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
int | HasObserver (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. More... | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More... | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More... | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
Allow user to set the AbortFlagOn() with the return value of the callback method. More... | |
int | InvokeEvent (unsigned long event, void *callData) |
This method invokes an event and return whether the event was aborted or not. More... | |
int | InvokeEvent (const char *event, void *callData) |
This method invokes an event and return whether the event was aborted or not. More... | |
Public Member Functions inherited from vtkObjectBase | |
const char * | GetClassName () const |
Return the class name as a string. More... | |
virtual void | Delete () |
Delete a VTK object. More... | |
virtual void | FastDelete () |
Delete a reference to this object. More... | |
void | InitializeObjectBase () |
void | Print (ostream &os) |
Print an object to an ostream. More... | |
virtual void | Register (vtkObjectBase *o) |
Increase the reference count (mark as used by another object). More... | |
virtual void | UnRegister (vtkObjectBase *o) |
Decrease the reference count (release by another object). More... | |
int | GetReferenceCount () |
Return the current reference count of this object. More... | |
void | SetReferenceCount (int) |
Sets the reference count. More... | |
void | PrintRevisions (ostream &) |
Legacy. More... | |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. More... | |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. More... | |
Static Public Member Functions | |
static vtkShaderProgram2 * | New () |
static int | IsTypeOf (const char *type) |
static vtkShaderProgram2 * | SafeDownCast (vtkObjectBase *o) |
static bool | IsSupported (vtkRenderWindow *context) |
Returns if the context supports the required extensions. More... | |
Static Public Member Functions inherited from vtkObject | |
static vtkObject * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More... | |
static void | BreakOnError () |
This method is called when vtkErrorMacro executes. More... | |
static void | SetGlobalWarningDisplay (int val) |
This is a global flag that controls whether any debug, warning or error messages are displayed. More... | |
static void | GlobalWarningDisplayOn () |
This is a global flag that controls whether any debug, warning or error messages are displayed. More... | |
static void | GlobalWarningDisplayOff () |
This is a global flag that controls whether any debug, warning or error messages are displayed. More... | |
static int | GetGlobalWarningDisplay () |
This is a global flag that controls whether any debug, warning or error messages are displayed. More... | |
Static Public Member Functions inherited from vtkObjectBase | |
static vtkTypeBool | IsTypeOf (const char *name) |
Return 1 if this class type is the same type of (or a subclass of) the named class. More... | |
static vtkObjectBase * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More... | |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkShaderProgram2 () | |
virtual | ~vtkShaderProgram2 () |
bool | LoadRequiredExtensions (vtkRenderWindow *context) |
Load the required OpenGL extentions. More... | |
int | GetUniformLocationInternal (const char *name) |
Get the location of a uniform, without caring if it really exists. More... | |
Protected Member Functions inherited from vtkObject | |
vtkObject () | |
~vtkObject () override | |
void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
These methods allow a command to exclusively grab all events. More... | |
void | InternalReleaseFocus () |
These methods allow a command to exclusively grab all events. More... | |
Protected Member Functions inherited from vtkObjectBase | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Protected Attributes | |
unsigned int | Id |
unsigned int | SavedId |
vtkTimeStamp | LastLinkTime |
vtkTimeStamp | LastSendUniformsTime |
vtkShader2Collection * | Shaders |
vtkUniformVariables * | UniformVariables |
int | LastBuildStatus |
char * | LastLinkLog |
size_t | LastLinkLogCapacity |
char * | LastValidateLog |
size_t | LastValidateLogCapacity |
bool | PrintErrors |
vtkWeakPointer< vtkRenderWindow > | Context |
bool | ExtensionsLoaded |
int | GeometryTypeIn |
int | GeometryTypeOut |
int | GeometryVerticesOut |
Protected Attributes inherited from vtkObject | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
Protected Attributes inherited from vtkObjectBase | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
GLSL Program.
vtkShaderProgram2 represents an implementation of the programmable OpenGL pipeline. It consists of a list of vtkShader2 object. Each vtkShader2 is a piece of source code associated with one of the shader units (vertex, fragment, geometry).
Definition at line 68 of file vtkShaderProgram2.h.
Definition at line 72 of file vtkShaderProgram2.h.
|
protected |
|
protectedvirtual |
|
static |
|
static |
|
virtual |
Return 1 if this class is the same type of (or a subclass of) the named class.
Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkObjectBase.
|
static |
|
protectedvirtual |
vtkShaderProgram2* vtkShaderProgram2::NewInstance | ( | ) | const |
|
virtual |
|
static |
Returns if the context supports the required extensions.
Extensions are loaded when the context is set.
|
virtual |
Tell if vtkErrorMacro should be called when there is a build error or not.
It is useful to switch it to false when building a shader is a way to test if some OpenGL implementation support it or not. Initial value is true. Build errors are always reported in the status flags and log whatever is the value of PrintErrors flag.
|
virtual |
Tell if vtkErrorMacro should be called when there is a build error or not.
It is useful to switch it to false when building a shader is a way to test if some OpenGL implementation support it or not. Initial value is true. Build errors are always reported in the status flags and log whatever is the value of PrintErrors flag.
void vtkShaderProgram2::SetContext | ( | vtkRenderWindow * | context | ) |
Get/Set the context.
This does not increase the reference count of the context to avoid reference loops. SetContext() may raise an error is the OpenGL context does not support the required OpenGL extensions.
vtkRenderWindow* vtkShaderProgram2::GetContext | ( | ) |
Get/Set the context.
This does not increase the reference count of the context to avoid reference loops. SetContext() may raise an error is the OpenGL context does not support the required OpenGL extensions.
|
virtual |
The list of shaders.
Initially, the list is empty.
bool vtkShaderProgram2::HasVertexShaders | ( | ) |
Tells if at least one of the shaders is a vertex shader.
If yes, it means the vertex processing of the fixed-pipeline is bypassed. If no, it means the vertex processing of the fixed-pipeline is used.
bool vtkShaderProgram2::HasTessellationControlShaders | ( | ) |
Tells if at least one of the shaders is a tessellation control shader.
bool vtkShaderProgram2::HasTessellationEvaluationShaders | ( | ) |
Tells if at least one of the shaders is a tessellation evaluation shader.
bool vtkShaderProgram2::HasGeometryShaders | ( | ) |
Tells if at least one of the shaders is a geometry shader.
bool vtkShaderProgram2::HasFragmentShaders | ( | ) |
Tells if at least one of the shaders is a fragment shader.
If yes, it means the fragment processing of the fixed-pipeline is bypassed. If no, it means the fragment processing of the fixed-pipeline is used.
bool vtkShaderProgram2::IsValid | ( | ) |
Tell if the shader program is valid with the current OpenGL state.
void vtkShaderProgram2::Build | ( | ) |
If not done yet, compile all the shaders and link the program.
The status of the build can then be query with GetLastBuildStatus() and GetLastLinkLog().
void vtkShaderProgram2::SendUniforms | ( | ) |
Send the uniform variables values to the program.
void vtkShaderProgram2::PrintActiveUniformVariables | ( | ostream & | os, |
vtkIndent | indent | ||
) |
Introspection.
Return the list of active uniform variables of the program.
void vtkShaderProgram2::PrintActiveUniformVariablesOnCout | ( | ) |
Call PrintActiveUniformVariables on cout.
Useful for calling inside gdb.
bool vtkShaderProgram2::IsUsed | ( | ) |
Tell if the program is the one currently used by OpenGL.
void vtkShaderProgram2::Use | ( | ) |
Use the shader program.
It saves the current shader program or fixed-pipeline in use. As a side affect it also set the uniform variables. If you don't want that then see UseProgram.
void vtkShaderProgram2::Restore | ( | ) |
Restore the previous shader program (or fixed-pipeline).
void vtkShaderProgram2::RestoreFixedPipeline | ( | ) |
Force the current shader program to be the fixed-pipeline.
Warning: this call will be compiled if called inside a display list creation.
void vtkShaderProgram2::UseProgram | ( | ) |
Simple direct use of the program without side affects and with error check.
The Unuse version restores the default program.
void vtkShaderProgram2::UnuseProgram | ( | ) |
Simple direct use of the program without side affects and with error check.
The Unuse version restores the default program.
int vtkShaderProgram2::GetLastBuildStatus | ( | ) |
Tells if the last build: failed during compilation of one of the shader, fails during link of the program or succeeded to link the program.
Initial value is VTK_SHADER_PROGRAM2_COMPILE_FAILED.
const char* vtkShaderProgram2::GetLastLinkLog | ( | ) |
Return the log of the last link as a string.
Initial value is the empty string ""='\0'.
const char* vtkShaderProgram2::GetLastValidateLog | ( | ) |
Return the log of the last call to IsValid as a string.
Initial value is the empty string ""='\0'.
|
virtual |
Release OpenGL resource (program id and sub-resources).
int vtkShaderProgram2::GetAttributeLocation | ( | const char * | name | ) |
Returns the generic attribute location.
The shader must be bound before calling this.
|
virtual |
Get/Set the list of uniform variables values.
Initial value is an empty list (not null pointer).
|
virtual |
Get/Set the list of uniform variables values.
Initial value is an empty list (not null pointer).
bool vtkShaderProgram2::DisplayListUnderCreationInCompileMode | ( | ) |
Tells if a display list is under construction with GL_COMPILE mode.
Return false if there is no display list under construction of if the mode is GL_COMPILE_AND_EXECUTE. Used internally and provided as a public method for whoever find it useful.
|
virtual |
Specific to the geometry shader part of the program.
Relevant only when HasGeometryShaders() is true. From OpenGL 3.2, it is replaced by an input layout qualifier in GLSL 1.50. The input primitive type on which the geometry shader operate. It can be VTK_GEOMETRY_SHADER_IN_TYPE_POINTS, VTK_GEOMETRY_SHADER_IN_TYPE_LINES, VTK_GEOMETRY_SHADER_IN_TYPE_LINES_ADJACENCY, VTK_GEOMETRY_SHADER_IN_TYPE_TRIANGLES or VTK_GEOMETRY_SHADER_IN_TYPE_TRIANGLES_ADJACENCY Initial value is VTK_GEOMETRY_SHADER_IN_TYPE_POINTS.
|
virtual |
Specific to the geometry shader part of the program.
Relevant only when HasGeometryShaders() is true. From OpenGL 3.2, it is replaced by an input layout qualifier in GLSL 1.50. The input primitive type on which the geometry shader operate. It can be VTK_GEOMETRY_SHADER_IN_TYPE_POINTS, VTK_GEOMETRY_SHADER_IN_TYPE_LINES, VTK_GEOMETRY_SHADER_IN_TYPE_LINES_ADJACENCY, VTK_GEOMETRY_SHADER_IN_TYPE_TRIANGLES or VTK_GEOMETRY_SHADER_IN_TYPE_TRIANGLES_ADJACENCY Initial value is VTK_GEOMETRY_SHADER_IN_TYPE_POINTS.
|
virtual |
Specific to the geometry shader part of the program.
Relevant only when HasGeometryShaders() is true. This is a pre OpenGL 3.2 geometry shader setting. From OpenGL 3.2, it is replaced by an output layout qualifier in GLSL 1.50. The maximum number of vertices the geometry shader will emit in one invocation. If a geometry shader, in one invocation, emits more vertices than this value, these emits may have no effect. Initial value is 1.
|
virtual |
Specific to the geometry shader part of the program.
Relevant only when HasGeometryShaders() is true. This is a pre OpenGL 3.2 geometry shader setting. From OpenGL 3.2, it is replaced by an output layout qualifier in GLSL 1.50. The maximum number of vertices the geometry shader will emit in one invocation. If a geometry shader, in one invocation, emits more vertices than this value, these emits may have no effect. Initial value is 1.
|
virtual |
Specific to the geometry shader part of the program.
Relevant only when HasGeometryShaders() is true. From OpenGL 3.2, it is replaced by an output layout qualifier in GLSL 1.50. The output primitive type generated by the geometry shader. It can be VTK_GEOMETRY_SHADER_OUT_TYPE_POINTS, VTK_GEOMETRY_SHADER_OUT_TYPE_LINE_STRIP or VTK_GEOMETRY_SHADER_OUT_TYPE_TRIANGLE_STRIP. Initial value is VTK_GEOMETRY_SHADER_OUT_TYPE_POINTS.
|
virtual |
Specific to the geometry shader part of the program.
Relevant only when HasGeometryShaders() is true. From OpenGL 3.2, it is replaced by an output layout qualifier in GLSL 1.50. The output primitive type generated by the geometry shader. It can be VTK_GEOMETRY_SHADER_OUT_TYPE_POINTS, VTK_GEOMETRY_SHADER_OUT_TYPE_LINE_STRIP or VTK_GEOMETRY_SHADER_OUT_TYPE_TRIANGLE_STRIP. Initial value is VTK_GEOMETRY_SHADER_OUT_TYPE_POINTS.
int vtkShaderProgram2::GetUniformLocation | ( | const char * | name | ) |
Get a uniform's location.
Low level API
|
inline |
Set a uniform value directly.
The driving use case for this api is modifying a uniform per-primative in a loop. In that case we need the minimal implementtion passing the value directly to the driver. It is an error to specify an invalid location. Low level API
Definition at line 360 of file vtkShaderProgram2.h.
|
inline |
Definition at line 362 of file vtkShaderProgram2.h.
|
inline |
Definition at line 364 of file vtkShaderProgram2.h.
|
inline |
Definition at line 366 of file vtkShaderProgram2.h.
|
inline |
Definition at line 368 of file vtkShaderProgram2.h.
|
inline |
Definition at line 371 of file vtkShaderProgram2.h.
|
inline |
Definition at line 373 of file vtkShaderProgram2.h.
|
inline |
Definition at line 375 of file vtkShaderProgram2.h.
|
inline |
Definition at line 377 of file vtkShaderProgram2.h.
|
inline |
Definition at line 379 of file vtkShaderProgram2.h.
Definition at line 382 of file vtkShaderProgram2.h.
Definition at line 389 of file vtkShaderProgram2.h.
void vtkShaderProgram2::SetUniform1it | ( | const char * | name, |
T * | value | ||
) |
Convenience methods for copy/convert to supported type.
Typically this arises because VTK stores data in an internal format (eg double) that's not supported.
void vtkShaderProgram2::SetUniform2it | ( | const char * | name, |
T * | value | ||
) |
Convenience methods for copy/convert to supported type.
Typically this arises because VTK stores data in an internal format (eg double) that's not supported.
void vtkShaderProgram2::SetUniform3it | ( | const char * | name, |
T * | value | ||
) |
Convenience methods for copy/convert to supported type.
Typically this arises because VTK stores data in an internal format (eg double) that's not supported.
void vtkShaderProgram2::SetUniform4it | ( | const char * | name, |
T * | value | ||
) |
Convenience methods for copy/convert to supported type.
Typically this arises because VTK stores data in an internal format (eg double) that's not supported.
void vtkShaderProgram2::SetUniform1ft | ( | const char * | name, |
T * | value | ||
) |
void vtkShaderProgram2::SetUniform2ft | ( | const char * | name, |
T * | value | ||
) |
void vtkShaderProgram2::SetUniform3ft | ( | const char * | name, |
T * | value | ||
) |
void vtkShaderProgram2::SetUniform4ft | ( | const char * | name, |
T * | value | ||
) |
void vtkShaderProgram2::SetUniform1it | ( | int | loc, |
T * | value | ||
) |
void vtkShaderProgram2::SetUniform2it | ( | int | loc, |
T * | value | ||
) |
void vtkShaderProgram2::SetUniform3it | ( | int | loc, |
T * | value | ||
) |
void vtkShaderProgram2::SetUniform4it | ( | int | loc, |
T * | value | ||
) |
void vtkShaderProgram2::SetUniform1ft | ( | int | loc, |
T * | value | ||
) |
void vtkShaderProgram2::SetUniform2ft | ( | int | loc, |
T * | value | ||
) |
void vtkShaderProgram2::SetUniform3ft | ( | int | loc, |
T * | value | ||
) |
void vtkShaderProgram2::SetUniform4ft | ( | int | loc, |
T * | value | ||
) |
|
protected |
Load the required OpenGL extentions.
|
protected |
Get the location of a uniform, without caring if it really exists.
This is used because this class will attempt to set all uniforms knows about via the associated vtkUniformVariables on all shaders it manages regardless of if a given uniform actually belongs to a given shader.
|
protected |
Definition at line 443 of file vtkShaderProgram2.h.
|
protected |
Definition at line 444 of file vtkShaderProgram2.h.
|
protected |
Definition at line 446 of file vtkShaderProgram2.h.
|
protected |
Definition at line 447 of file vtkShaderProgram2.h.
|
protected |
Definition at line 449 of file vtkShaderProgram2.h.
|
protected |
Definition at line 450 of file vtkShaderProgram2.h.
|
protected |
Definition at line 452 of file vtkShaderProgram2.h.
|
protected |
Definition at line 454 of file vtkShaderProgram2.h.
|
protected |
Definition at line 455 of file vtkShaderProgram2.h.
|
protected |
Definition at line 457 of file vtkShaderProgram2.h.
|
protected |
Definition at line 458 of file vtkShaderProgram2.h.
|
protected |
Definition at line 461 of file vtkShaderProgram2.h.
|
protected |
Definition at line 463 of file vtkShaderProgram2.h.
|
protected |
Definition at line 464 of file vtkShaderProgram2.h.
|
protected |
Definition at line 466 of file vtkShaderProgram2.h.
|
protected |
Definition at line 467 of file vtkShaderProgram2.h.
|
protected |
Definition at line 468 of file vtkShaderProgram2.h.