ActiViz .NET  5.8.0
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Private Member Functions | Static Private Member Functions
Kitware.VTK.vtkShader Class Reference

vtkShader More...

Inheritance diagram for Kitware.VTK.vtkShader:
[legend]
Collaboration diagram for Kitware.VTK.vtkShader:
[legend]

List of all members.

Public Member Functions

 vtkShader (IntPtr rawCppThis, bool callDisposalMethod, bool strong)
 Automatically generated constructor - called from generated code. DO NOT call directly.
void AddShaderVariable (string name, int num_of_elements, IntPtr values)
 Methods to add shader variables to this shader. The shader variable type must match with that declared in the Material xml, otherwise, the variable is not made available to the shader.
virtual void Bind ()
 In this method the shader can enable/bind itself. This is applicable only to Cg, since in GLSL, individual shaders in a program can't be enabled/bound.
virtual int Compile ()
 Called to compile the shader code. The subclasses must only compile the code in this method. Returns if the compile was successful. Subclasses should compile the code only if it was not already compiled.
int GetScope ()
 Returns the scope of the shader i.e. if it's a vertex or fragment shader. (vtkXMLShader::SCOPE_VERTEX or vtkXMLShader::SCOPE_FRAGMENT).
int GetShaderVariable (string name, IntPtr values)
 Methods to get the value of shader variables with the given name. Values must be at least the size of the shader variable (obtained by GetShaderVariableSize(). Returns if the operation was successful.
int GetShaderVariableSize (string name)
 Get number of elements in a Shader variable. Return 0 if failed to find the shader variable.
int GetShaderVariableType (string name)
 Returns the type of a Shader variable with the given name. Return 0 on error.
virtual vtkXMLShader GetXMLShader ()
 Get/Set the XMLShader representation for this shader. A shader is not valid without a XMLShader.
int HasShaderVariable (string name)
 Indicates if a variable by the given name exists.
override int IsA (string type)
 Undocumented Block.
new vtkShader NewInstance ()
 Undocumented Block.
virtual void PassShaderVariables (vtkActor actor, vtkRenderer ren)
 Called to pass VTK actor/property/light values and other Shader variables over to the shader. This is called by the ShaderProgram during each render.
virtual void ReleaseGraphicsResources (vtkWindow arg0)
 Release any graphics resources that are being consumed by this actor. The parameter window could be used to determine which graphic resources to release.
void SetXMLShader (vtkXMLShader arg0)
 Get/Set the XMLShader representation for this shader. A shader is not valid without a XMLShader.
virtual void Unbind ()
 Called to unbind the shader. As with Bind(), this is only applicable to Cg.

Static Public Member Functions

static new int IsTypeOf (string type)
 Undocumented Block.
static new vtkShader SafeDownCast (vtkObjectBase o)
 Undocumented Block.

Public Attributes

new const string MRFullTypeName = "Kitware.VTK.vtkShader"
 Automatically generated type registration mechanics.

Static Public Attributes

static new readonly string MRClassNameKey = "9vtkShader"
 Automatically generated type registration mechanics.

Protected Member Functions

override void Dispose (bool disposing)
 Automatically generated protected Dispose method - called from public Dispose or the C# destructor. DO NOT call directly.

Private Member Functions

static internal void vtkShader_AddShaderVariable_01 (HandleRef pThis, string name, int num_of_elements, IntPtr values)
static internal void vtkShader_Bind_02 (HandleRef pThis)
static internal int vtkShader_Compile_03 (HandleRef pThis)
static internal int vtkShader_GetScope_04 (HandleRef pThis)
static internal int vtkShader_GetShaderVariable_05 (HandleRef pThis, string name, IntPtr values)
static internal int vtkShader_GetShaderVariableSize_06 (HandleRef pThis, string name)
static internal int vtkShader_GetShaderVariableType_07 (HandleRef pThis, string name)
static internal IntPtr vtkShader_GetXMLShader_08 (HandleRef pThis, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount)
static internal int vtkShader_HasShaderVariable_09 (HandleRef pThis, string name)
static internal int vtkShader_IsA_10 (HandleRef pThis, string type)
static internal int vtkShader_IsTypeOf_11 (string type)
static internal IntPtr vtkShader_NewInstance_12 (HandleRef pThis, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount)
static internal void vtkShader_PassShaderVariables_13 (HandleRef pThis, HandleRef actor, HandleRef ren)
static internal void vtkShader_ReleaseGraphicsResources_14 (HandleRef pThis, HandleRef arg0)
static internal IntPtr vtkShader_SafeDownCast_15 (HandleRef o, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount)
static internal void vtkShader_SetXMLShader_16 (HandleRef pThis, HandleRef arg0)
static internal void vtkShader_Unbind_17 (HandleRef pThis)

Static Private Member Functions

static vtkShader ()
 Automatically generated type registration mechanics.

Detailed Description

vtkShader

Description vtkShader is a base class for interfacing VTK to hardware shader libraries. vtkShader interprets a vtkXMLDataElement that describes a particular shader. Descendants of this class inherit this functionality and additionally interface to specific shader libraries like NVidia's Cg and OpenGL2.0 (GLSL) to perform operations, on individual shaders.

During each render, the vtkShaderProgram calls Compile(), PassShaderVariables(), Bind() and after the actor has been rendered, calls Unbind(), in that order. Thanks Shader support in VTK includes key contributions by Gary Templet at Sandia National Labs.

vtkCgShader vtkGLSLShader


Constructor & Destructor Documentation

static Kitware.VTK.vtkShader.vtkShader ( ) [static, private]

Automatically generated type registration mechanics.

Kitware.VTK.vtkShader.vtkShader ( IntPtr  rawCppThis,
bool  callDisposalMethod,
bool  strong 
)

Automatically generated constructor - called from generated code. DO NOT call directly.


Member Function Documentation

void Kitware.VTK.vtkShader.AddShaderVariable ( string  name,
int  num_of_elements,
IntPtr  values 
)

Methods to add shader variables to this shader. The shader variable type must match with that declared in the Material xml, otherwise, the variable is not made available to the shader.

virtual void Kitware.VTK.vtkShader.Bind ( ) [virtual]

In this method the shader can enable/bind itself. This is applicable only to Cg, since in GLSL, individual shaders in a program can't be enabled/bound.

virtual int Kitware.VTK.vtkShader.Compile ( ) [virtual]

Called to compile the shader code. The subclasses must only compile the code in this method. Returns if the compile was successful. Subclasses should compile the code only if it was not already compiled.

Reimplemented in Kitware.VTK.vtkGLSLShader.

override void Kitware.VTK.vtkShader.Dispose ( bool  disposing) [protected]

Automatically generated protected Dispose method - called from public Dispose or the C# destructor. DO NOT call directly.

Reimplemented from Kitware.VTK.vtkObject.

Reimplemented in Kitware.VTK.vtkGLSLShader.

Returns the scope of the shader i.e. if it's a vertex or fragment shader. (vtkXMLShader::SCOPE_VERTEX or vtkXMLShader::SCOPE_FRAGMENT).

int Kitware.VTK.vtkShader.GetShaderVariable ( string  name,
IntPtr  values 
)

Methods to get the value of shader variables with the given name. Values must be at least the size of the shader variable (obtained by GetShaderVariableSize(). Returns if the operation was successful.

Get number of elements in a Shader variable. Return 0 if failed to find the shader variable.

Returns the type of a Shader variable with the given name. Return 0 on error.

Get/Set the XMLShader representation for this shader. A shader is not valid without a XMLShader.

Here is the call graph for this function:

Indicates if a variable by the given name exists.

override int Kitware.VTK.vtkShader.IsA ( string  type) [virtual]

Undocumented Block.

Reimplemented from Kitware.VTK.vtkObject.

Reimplemented in Kitware.VTK.vtkGLSLShader.

static new int Kitware.VTK.vtkShader.IsTypeOf ( string  type) [static]

Undocumented Block.

Reimplemented from Kitware.VTK.vtkObject.

Reimplemented in Kitware.VTK.vtkGLSLShader.

Undocumented Block.

Reimplemented from Kitware.VTK.vtkObject.

Reimplemented in Kitware.VTK.vtkGLSLShader.

virtual void Kitware.VTK.vtkShader.PassShaderVariables ( vtkActor  actor,
vtkRenderer  ren 
) [virtual]

Called to pass VTK actor/property/light values and other Shader variables over to the shader. This is called by the ShaderProgram during each render.

Release any graphics resources that are being consumed by this actor. The parameter window could be used to determine which graphic resources to release.

Reimplemented in Kitware.VTK.vtkGLSLShader.

Undocumented Block.

Reimplemented from Kitware.VTK.vtkObject.

Reimplemented in Kitware.VTK.vtkGLSLShader.

Here is the call graph for this function:

Get/Set the XMLShader representation for this shader. A shader is not valid without a XMLShader.

virtual void Kitware.VTK.vtkShader.Unbind ( ) [virtual]

Called to unbind the shader. As with Bind(), this is only applicable to Cg.

static internal void Kitware.VTK.vtkShader.vtkShader_AddShaderVariable_01 ( HandleRef  pThis,
string  name,
int  num_of_elements,
IntPtr  values 
) [private]
static internal void Kitware.VTK.vtkShader.vtkShader_Bind_02 ( HandleRef  pThis) [private]
static internal int Kitware.VTK.vtkShader.vtkShader_Compile_03 ( HandleRef  pThis) [private]
static internal int Kitware.VTK.vtkShader.vtkShader_GetScope_04 ( HandleRef  pThis) [private]
static internal int Kitware.VTK.vtkShader.vtkShader_GetShaderVariable_05 ( HandleRef  pThis,
string  name,
IntPtr  values 
) [private]
static internal int Kitware.VTK.vtkShader.vtkShader_GetShaderVariableSize_06 ( HandleRef  pThis,
string  name 
) [private]
static internal int Kitware.VTK.vtkShader.vtkShader_GetShaderVariableType_07 ( HandleRef  pThis,
string  name 
) [private]
static internal IntPtr Kitware.VTK.vtkShader.vtkShader_GetXMLShader_08 ( HandleRef  pThis,
ref uint  mteStatus,
ref uint  mteIndex,
ref uint  rawRefCount 
) [private]
static internal int Kitware.VTK.vtkShader.vtkShader_HasShaderVariable_09 ( HandleRef  pThis,
string  name 
) [private]
static internal int Kitware.VTK.vtkShader.vtkShader_IsA_10 ( HandleRef  pThis,
string  type 
) [private]
static internal int Kitware.VTK.vtkShader.vtkShader_IsTypeOf_11 ( string  type) [private]
static internal IntPtr Kitware.VTK.vtkShader.vtkShader_NewInstance_12 ( HandleRef  pThis,
ref uint  mteStatus,
ref uint  mteIndex,
ref uint  rawRefCount 
) [private]
static internal void Kitware.VTK.vtkShader.vtkShader_PassShaderVariables_13 ( HandleRef  pThis,
HandleRef  actor,
HandleRef  ren 
) [private]
static internal void Kitware.VTK.vtkShader.vtkShader_ReleaseGraphicsResources_14 ( HandleRef  pThis,
HandleRef  arg0 
) [private]
static internal IntPtr Kitware.VTK.vtkShader.vtkShader_SafeDownCast_15 ( HandleRef  o,
ref uint  mteStatus,
ref uint  mteIndex,
ref uint  rawRefCount 
) [private]
static internal void Kitware.VTK.vtkShader.vtkShader_SetXMLShader_16 ( HandleRef  pThis,
HandleRef  arg0 
) [private]
static internal void Kitware.VTK.vtkShader.vtkShader_Unbind_17 ( HandleRef  pThis) [private]

Member Data Documentation

new readonly string Kitware.VTK.vtkShader.MRClassNameKey = "9vtkShader" [static]

Automatically generated type registration mechanics.

Reimplemented from Kitware.VTK.vtkObject.

Reimplemented in Kitware.VTK.vtkGLSLShader.

new const string Kitware.VTK.vtkShader.MRFullTypeName = "Kitware.VTK.vtkShader"

Automatically generated type registration mechanics.

Reimplemented from Kitware.VTK.vtkObject.

Reimplemented in Kitware.VTK.vtkGLSLShader.


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