VTK
|
Vertex or Fragment shader, combined into a ShaderProgram. More...
#include <vtkShader.h>
Public Types | |
enum | Type { Vertex, Fragment, Geometry, Unknown } |
Available shader types. More... | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkShader * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | SetType (Type type) |
Set the shader type. | |
Type | GetType () const |
Get the shader type, typically Vertex or Fragment. | |
void | SetSource (const std::string &source) |
Set the shader source to the supplied string. | |
std::string | GetSource () const |
Get the source for the shader. | |
std::string | GetError () const |
Get the error message (empty if none) for the shader. | |
int | GetHandle () const |
Get the handle of the shader. | |
bool | Compile () |
Compile the shader. | |
void | Cleanup () |
Delete the shader. | |
Static Public Member Functions | |
static vtkShader * | New () |
static int | IsTypeOf (const char *type) |
static vtkShader * | SafeDownCast (vtkObjectBase *o) |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkShader () | |
~vtkShader () | |
Protected Attributes | |
Type | ShaderType |
int | Handle |
bool | Dirty |
std::string | Source |
std::string | Error |
Vertex or Fragment shader, combined into a ShaderProgram.
encapsulate a glsl shader
This class creates a Vertex, Fragment or Geometry shader, that can be attached to a ShaderProgram in order to render geometry etc.
vtkShader represents a shader, vertex, fragment, geometry etc
Definition at line 35 of file vtkShader.h.
typedef vtkObject vtkShader::Superclass |
Reimplemented from vtkObject.
Definition at line 39 of file vtkShader.h.
enum vtkShader::Type |
Available shader types.
Vertex |
Vertex shader. |
Fragment |
Fragment shader. |
Geometry |
Geometry shader. |
Unknown |
Unknown (default) |
Definition at line 44 of file vtkShader.h.
vtkShader::vtkShader | ( | ) | [protected] |
vtkShader::~vtkShader | ( | ) | [protected] |
static vtkShader* vtkShader::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkObject.
static int vtkShader::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type 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.
virtual int vtkShader::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 vtkShader* vtkShader::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkObject.
virtual vtkObjectBase* vtkShader::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkObject.
vtkShader* vtkShader::NewInstance | ( | ) | const |
Reimplemented from vtkObject.
void vtkShader::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
void vtkShader::SetType | ( | Type | type | ) |
Set the shader type.
Type vtkShader::GetType | ( | ) | const [inline] |
Get the shader type, typically Vertex or Fragment.
Definition at line 55 of file vtkShader.h.
void vtkShader::SetSource | ( | const std::string & | source | ) |
Set the shader source to the supplied string.
std::string vtkShader::GetSource | ( | ) | const [inline] |
Get the source for the shader.
Definition at line 61 of file vtkShader.h.
std::string vtkShader::GetError | ( | void | ) | const [inline] |
Get the error message (empty if none) for the shader.
Definition at line 64 of file vtkShader.h.
int vtkShader::GetHandle | ( | ) | const [inline] |
Get the handle of the shader.
Definition at line 67 of file vtkShader.h.
bool vtkShader::Compile | ( | ) |
Compile the shader.
void vtkShader::Cleanup | ( | ) |
Delete the shader.
Type vtkShader::ShaderType [protected] |
Definition at line 84 of file vtkShader.h.
int vtkShader::Handle [protected] |
Definition at line 85 of file vtkShader.h.
bool vtkShader::Dirty [protected] |
Definition at line 86 of file vtkShader.h.
std::string vtkShader::Source [protected] |
Definition at line 88 of file vtkShader.h.
std::string vtkShader::Error [protected] |
Definition at line 89 of file vtkShader.h.