VTK
|
GLSL Shader. More...
#include <vtkShader2.h>
Public Types | |
typedef vtkObject | Superclass |
Public Types inherited from vtkObject | |
typedef vtkObjectBase | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkShader2 * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
const char * | GetTypeAsString () |
void | Compile () |
bool | GetLastCompileStatus () |
const char * | GetLastCompileLog () |
virtual void | ReleaseGraphicsResources () |
virtual char * | GetSourceCode () |
virtual void | SetSourceCode (const char *) |
virtual int | GetType () |
virtual void | SetType (int) |
void | SetContext (vtkRenderWindow *context) |
vtkRenderWindow * | GetContext () |
virtual unsigned int | GetId () |
virtual vtkUniformVariables * | GetUniformVariables () |
virtual void | SetUniformVariables (vtkUniformVariables *variables) |
Public Member Functions inherited from vtkObject | |
vtkObject * | NewInstance () 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) |
vtkCommand * | GetCommand (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 vtkShader2 * | New () |
static int | IsTypeOf (const char *type) |
static vtkShader2 * | SafeDownCast (vtkObjectBase *o) |
static bool | IsSupported (vtkRenderWindow *context) |
Static Public Member Functions inherited from vtkObject | |
static int | IsTypeOf (const char *type) |
static vtkObject * | SafeDownCast (vtkObjectBase *o) |
static vtkObject * | New () |
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 vtkObjectBase * | New () |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkShader2 () | |
virtual | ~vtkShader2 () |
bool | LoadRequiredExtensions (vtkRenderWindow *context) |
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 | |
char * | SourceCode |
int | Type |
unsigned int | Id |
bool | LastCompileStatus |
char * | LastCompileLog |
size_t | LastCompileLogCapacity |
vtkTimeStamp | LastCompileTime |
vtkUniformVariables * | UniformVariables |
vtkWeakPointer< vtkRenderWindow > | Context |
bool | ExtensionsLoaded |
bool | SupportGeometryShader |
Protected Attributes inherited from vtkObject | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
Protected Attributes inherited from vtkObjectBase | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
GLSL Shader.
A vtkShader2 object is made of a source code encoded into a string and a type, identifying the hardware programmable stage it is attached to. Hardware programmable stages are (or will be)
Note: tessellation control shader is called hull shader in DirectX11 Note: tessellation evaluation shader is called domain shader in DirectX11 Ref: OpenGL spec 4.0 http://www.opengl.org/registry/doc/glspec40.core.20100311.withchanges.pdf Ref: "Introducing DirectX 11" http://www.gamasutra.com/view/feature/3759/sponsored_feature_introducing_.php
Definition at line 61 of file vtkShader2.h.
typedef vtkObject vtkShader2::Superclass |
Definition at line 65 of file vtkShader2.h.
|
protected |
Default constructor. SourceCode is NULL. Type is vertex.
|
protectedvirtual |
Destructor. Delete SourceCode and LastCompileLog if any.
|
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 vtkObject.
|
static |
|
protectedvirtual |
Reimplemented from vtkObject.
vtkShader2* vtkShader2::NewInstance | ( | ) | const |
|
virtual |
|
static |
Returns if the context supports the required extensions. Extensions are load when the context is set.
|
virtual |
String containing the shader source code. Reminder SetString makes a copy of its argument.
|
virtual |
String containing the shader source code. Reminder SetString makes a copy of its argument.
|
virtual |
Return the shader type, .
|
virtual |
Set the shader type, .
const char* vtkShader2::GetTypeAsString | ( | ) |
Return the shader type as a string.
void vtkShader2::Compile | ( | ) |
Compile the shader code. The result of compilation can be query with GetLastCompileStatus() The log of compilation can be query with GetLastCompileLog()
bool vtkShader2::GetLastCompileStatus | ( | ) |
Tells if the last call to compile succeeded (true) or not (false). Initial value is false.
const char* vtkShader2::GetLastCompileLog | ( | ) |
Return the log of the last call to compile as a string. Initial value is the empty string ""='\0'.
void vtkShader2::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* vtkShader2::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 |
Release OpenGL resource (shader id).
|
virtual |
Return the OpenGL shader object id.
|
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).
|
protected |
Load the required OpenGL extensions.
|
protected |
Definition at line 147 of file vtkShader2.h.
|
protected |
Definition at line 148 of file vtkShader2.h.
|
protected |
Definition at line 150 of file vtkShader2.h.
|
protected |
Definition at line 152 of file vtkShader2.h.
|
protected |
Definition at line 153 of file vtkShader2.h.
|
protected |
Definition at line 154 of file vtkShader2.h.
|
protected |
Definition at line 156 of file vtkShader2.h.
|
protected |
Definition at line 157 of file vtkShader2.h.
|
protected |
Definition at line 159 of file vtkShader2.h.
|
protected |
Definition at line 161 of file vtkShader2.h.
|
protected |
Definition at line 162 of file vtkShader2.h.