VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkShaderProgram2 Class Reference

GLSL Program. More...

#include <vtkShaderProgram2.h>

Inheritance diagram for vtkShaderProgram2:
[legend]
Collaboration diagram for vtkShaderProgram2:
[legend]

Public Types

typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkShaderProgram2NewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
bool HasVertexShaders ()
 
bool HasTessellationControlShaders ()
 
bool HasTessellationEvaluationShaders ()
 
bool HasGeometryShaders ()
 
bool HasFragmentShaders ()
 
bool IsValid ()
 
void Build ()
 
void SendUniforms ()
 
void PrintActiveUniformVariablesOnCout ()
 
bool IsUsed ()
 
void Use ()
 
void Restore ()
 
void RestoreFixedPipeline ()
 
int GetLastBuildStatus ()
 
const char * GetLastLinkLog ()
 
const char * GetLastValidateLog ()
 
virtual void ReleaseGraphicsResources ()
 
int GetAttributeLocation (const char *name)
 
bool DisplayListUnderCreationInCompileMode ()
 
int GetUniformLocation (const char *name)
 
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 ()
 
virtual void SetPrintErrors (bool)
 
void SetContext (vtkRenderWindow *context)
 
vtkRenderWindowGetContext ()
 
virtual vtkShader2CollectionGetShaders ()
 
void PrintActiveUniformVariables (ostream &os, vtkIndent indent)
 
void UseProgram ()
 
void UnuseProgram ()
 
virtual vtkUniformVariablesGetUniformVariables ()
 
virtual void SetUniformVariables (vtkUniformVariables *variables)
 
virtual void SetGeometryTypeIn (int)
 
virtual int GetGeometryTypeIn ()
 
virtual void SetGeometryVerticesOut (int)
 
virtual int GetGeometryVerticesOut ()
 
virtual void SetGeometryTypeOut (int)
 
virtual int GetGeometryTypeOut ()
 
void SetUniformf (const char *name, float val)
 
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)
 
template<typename T >
void SetUniform1it (const char *name, T *value)
 
template<typename T >
void SetUniform2it (const char *name, T *value)
 
template<typename T >
void SetUniform3it (const char *name, T *value)
 
template<typename T >
void SetUniform4it (const char *name, T *value)
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
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)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static vtkShaderProgram2New ()
 
static int IsTypeOf (const char *type)
 
static vtkShaderProgram2SafeDownCast (vtkObjectBase *o)
 
static bool IsSupported (vtkRenderWindow *context)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkShaderProgram2 ()
 
virtual ~vtkShaderProgram2 ()
 
bool LoadRequiredExtensions (vtkRenderWindow *context)
 
int GetUniformLocationInternal (const char *name)
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- 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
 
vtkShader2CollectionShaders
 
vtkUniformVariablesUniformVariables
 
int LastBuildStatus
 
char * LastLinkLog
 
size_t LastLinkLogCapacity
 
char * LastValidateLog
 
size_t LastValidateLogCapacity
 
bool PrintErrors
 
vtkWeakPointer< vtkRenderWindowContext
 
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
 

Detailed Description

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).

Tests:
vtkShaderProgram2 (Tests)

Definition at line 67 of file vtkShaderProgram2.h.

Member Typedef Documentation

Definition at line 71 of file vtkShaderProgram2.h.

Constructor & Destructor Documentation

vtkShaderProgram2::vtkShaderProgram2 ( )
protected
virtual vtkShaderProgram2::~vtkShaderProgram2 ( )
protectedvirtual

Member Function Documentation

static vtkShaderProgram2* vtkShaderProgram2::New ( )
static
static int vtkShaderProgram2::IsTypeOf ( const char *  type)
static
virtual int vtkShaderProgram2::IsA ( const char *  name)
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 vtkObject.

static vtkShaderProgram2* vtkShaderProgram2::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkShaderProgram2::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkObject.

vtkShaderProgram2* vtkShaderProgram2::NewInstance ( ) const
void vtkShaderProgram2::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

static bool vtkShaderProgram2::IsSupported ( vtkRenderWindow context)
static

Returns if the context supports the required extensions. Extensions are loaded when the context is set.

virtual bool vtkShaderProgram2::GetPrintErrors ( )
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 void vtkShaderProgram2::SetPrintErrors ( bool  )
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 vtkShader2Collection* vtkShaderProgram2::GetShaders ( )
virtual

The list of shaders. Initially, the list is empty.

Postcondition
result_exists: result!=0
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.

Precondition
context_is_set: this->GetContext()!=0
current_context_matches: this->Context()->IsCurrent()
built this->GetLastBuildStatus()==VTK_SHADER_PROGRAM2_LINK_SUCCEEDED
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().

Precondition
context_is_set: this->GetContext()!=0
current_context_matches: this->GetContext()->IsCurrent()
void vtkShaderProgram2::SendUniforms ( )

Send the uniform variables values to the program.

Precondition
context_is_set: this->GetContext()!=0
current_context_matches: this->GetContext()->IsCurrent()
built this->GetLastBuildStatus()==VTK_SHADER_PROGRAM2_LINK_SUCCEEDED
void vtkShaderProgram2::PrintActiveUniformVariables ( ostream &  os,
vtkIndent  indent 
)

Introspection. Return the list of active uniform variables of the program.

Precondition
context_is_set: this->GetContext()!=0
current_context_matches: this->Context()->IsCurrent()
built this->GetLastBuildStatus()==VTK_SHADER_PROGRAM2_LINK_SUCCEEDED
void vtkShaderProgram2::PrintActiveUniformVariablesOnCout ( )

Call PrintActiveUniformVariables on cout. Useful for calling inside gdb.

Precondition
context_is_set: this->GetContext()!=0
current_context_matches: this->Context()->IsCurrent()
built this->GetLastBuildStatus()==VTK_SHADER_PROGRAM2_LINK_SUCCEEDED
bool vtkShaderProgram2::IsUsed ( )

Tell if the program is the one currently used by OpenGL.

Precondition
context_is_set: this->GetContext()!=0
current_context_matches: this->GetContext()->IsCurrent()
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.

Precondition
context_is_set: this->GetContext()!=0
current_context_matches: this->GetContext()->IsCurrent()
void vtkShaderProgram2::Restore ( )

Restore the previous shader program (or fixed-pipeline).

Precondition
context_is_set: this->GetContext()!=0
current_context_matches: this->GetContext()->IsCurrent()
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.

Precondition
context_is_set: this->GetContext()!=0
current_context_matches: this->GetContext()->IsCurrent()
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.

Postcondition
valid_value: result== VTK_SHADER_PROGRAM2_COMPILE_FAILED || result==VTK_SHADER_PROGRAM2_LINK_FAILED || result==VTK_SHADER_PROGRAM2_LINK_SUCCEEDED
const char* vtkShaderProgram2::GetLastLinkLog ( )

Return the log of the last link as a string. Initial value is the empty string ""='\0'.

Postcondition
result_exists: result!=0
const char* vtkShaderProgram2::GetLastValidateLog ( )

Return the log of the last call to IsValid as a string. Initial value is the empty string ""='\0'.

Postcondition
result_exists: result!=0
virtual void vtkShaderProgram2::ReleaseGraphicsResources ( )
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.

Precondition
context_is_set: this->GetContext()!=0
current_context_matches: this->GetContext()->IsCurrent()
name_exists: name!=0
built: this->GetLastBuildStatus()==VTK_SHADER_PROGRAM2_LINK_SUCCEEDED
virtual vtkUniformVariables* vtkShaderProgram2::GetUniformVariables ( )
virtual

Get/Set the list of uniform variables values. Initial value is an empty list (not null pointer).

virtual void vtkShaderProgram2::SetUniformVariables ( vtkUniformVariables variables)
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.

Precondition
context_is_set: this->GetContext()!=0
current_context_matches: this->GetContext()->IsCurrent()
virtual void vtkShaderProgram2::SetGeometryTypeIn ( int  )
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 int vtkShaderProgram2::GetGeometryTypeIn ( )
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 void vtkShaderProgram2::SetGeometryVerticesOut ( int  )
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 int vtkShaderProgram2::GetGeometryVerticesOut ( )
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 void vtkShaderProgram2::SetGeometryTypeOut ( int  )
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 int vtkShaderProgram2::GetGeometryTypeOut ( )
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

void vtkShaderProgram2::SetUniformf ( const char *  name,
float  val 
)
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 285 of file vtkShaderProgram2.h.

void vtkShaderProgram2::SetUniform1f ( const char *  name,
float val 
)
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 287 of file vtkShaderProgram2.h.

void vtkShaderProgram2::SetUniform2f ( const char *  name,
float val 
)
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 289 of file vtkShaderProgram2.h.

void vtkShaderProgram2::SetUniform3f ( const char *  name,
float val 
)
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 291 of file vtkShaderProgram2.h.

void vtkShaderProgram2::SetUniform4f ( const char *  name,
float val 
)
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 293 of file vtkShaderProgram2.h.

void vtkShaderProgram2::SetUniformi ( const char *  name,
int  val 
)
inline

Definition at line 297 of file vtkShaderProgram2.h.

void vtkShaderProgram2::SetUniform1i ( const char *  name,
int val 
)
inline

Definition at line 299 of file vtkShaderProgram2.h.

void vtkShaderProgram2::SetUniform2i ( const char *  name,
int val 
)
inline

Definition at line 301 of file vtkShaderProgram2.h.

void vtkShaderProgram2::SetUniform3i ( const char *  name,
int val 
)
inline

Definition at line 303 of file vtkShaderProgram2.h.

void vtkShaderProgram2::SetUniform4i ( const char *  name,
int val 
)
inline

Definition at line 305 of file vtkShaderProgram2.h.

void vtkShaderProgram2::SetUniformf ( int  loc,
float  val 
)
inline

Definition at line 308 of file vtkShaderProgram2.h.

void vtkShaderProgram2::SetUniform1f ( int  loc,
float val 
)
void vtkShaderProgram2::SetUniform2f ( int  loc,
float val 
)
void vtkShaderProgram2::SetUniform3f ( int  loc,
float val 
)
void vtkShaderProgram2::SetUniform4f ( int  loc,
float val 
)
void vtkShaderProgram2::SetUniformi ( int  loc,
int  val 
)
inline

Definition at line 315 of file vtkShaderProgram2.h.

void vtkShaderProgram2::SetUniform1i ( int  loc,
int val 
)
void vtkShaderProgram2::SetUniform2i ( int  loc,
int val 
)
void vtkShaderProgram2::SetUniform3i ( int  loc,
int val 
)
void vtkShaderProgram2::SetUniform4i ( int  loc,
int val 
)
template<typename T >
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.

template<typename T >
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.

template<typename T >
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.

template<typename T >
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.

template<typename T >
void vtkShaderProgram2::SetUniform1ft ( const char *  name,
T *  value 
)
template<typename T >
void vtkShaderProgram2::SetUniform2ft ( const char *  name,
T *  value 
)
template<typename T >
void vtkShaderProgram2::SetUniform3ft ( const char *  name,
T *  value 
)
template<typename T >
void vtkShaderProgram2::SetUniform4ft ( const char *  name,
T *  value 
)
template<typename T >
void vtkShaderProgram2::SetUniform1it ( int  loc,
T *  value 
)
template<typename T >
void vtkShaderProgram2::SetUniform2it ( int  loc,
T *  value 
)
template<typename T >
void vtkShaderProgram2::SetUniform3it ( int  loc,
T *  value 
)
template<typename T >
void vtkShaderProgram2::SetUniform4it ( int  loc,
T *  value 
)
template<typename T >
void vtkShaderProgram2::SetUniform1ft ( int  loc,
T *  value 
)
template<typename T >
void vtkShaderProgram2::SetUniform2ft ( int  loc,
T *  value 
)
template<typename T >
void vtkShaderProgram2::SetUniform3ft ( int  loc,
T *  value 
)
template<typename T >
void vtkShaderProgram2::SetUniform4ft ( int  loc,
T *  value 
)
bool vtkShaderProgram2::LoadRequiredExtensions ( vtkRenderWindow context)
protected

Load the required OpenGL extentions.

int vtkShaderProgram2::GetUniformLocationInternal ( const char *  name)
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.

Member Data Documentation

unsigned int vtkShaderProgram2::Id
protected

Definition at line 361 of file vtkShaderProgram2.h.

unsigned int vtkShaderProgram2::SavedId
protected

Definition at line 362 of file vtkShaderProgram2.h.

vtkTimeStamp vtkShaderProgram2::LastLinkTime
protected

Definition at line 364 of file vtkShaderProgram2.h.

vtkTimeStamp vtkShaderProgram2::LastSendUniformsTime
protected

Definition at line 365 of file vtkShaderProgram2.h.

vtkShader2Collection* vtkShaderProgram2::Shaders
protected

Definition at line 367 of file vtkShaderProgram2.h.

vtkUniformVariables* vtkShaderProgram2::UniformVariables
protected

Definition at line 368 of file vtkShaderProgram2.h.

int vtkShaderProgram2::LastBuildStatus
protected

Definition at line 370 of file vtkShaderProgram2.h.

char* vtkShaderProgram2::LastLinkLog
protected

Definition at line 372 of file vtkShaderProgram2.h.

size_t vtkShaderProgram2::LastLinkLogCapacity
protected

Definition at line 373 of file vtkShaderProgram2.h.

char* vtkShaderProgram2::LastValidateLog
protected

Definition at line 375 of file vtkShaderProgram2.h.

size_t vtkShaderProgram2::LastValidateLogCapacity
protected

Definition at line 376 of file vtkShaderProgram2.h.

bool vtkShaderProgram2::PrintErrors
protected

Definition at line 379 of file vtkShaderProgram2.h.

vtkWeakPointer<vtkRenderWindow> vtkShaderProgram2::Context
protected

Definition at line 381 of file vtkShaderProgram2.h.

bool vtkShaderProgram2::ExtensionsLoaded
protected

Definition at line 382 of file vtkShaderProgram2.h.

int vtkShaderProgram2::GeometryTypeIn
protected

Definition at line 384 of file vtkShaderProgram2.h.

int vtkShaderProgram2::GeometryTypeOut
protected

Definition at line 385 of file vtkShaderProgram2.h.

int vtkShaderProgram2::GeometryVerticesOut
protected

Definition at line 386 of file vtkShaderProgram2.h.


The documentation for this class was generated from the following file: