VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkOpenGLProperty Class Reference

OpenGL property. More...

#include <vtkOpenGLProperty.h>

Inheritance diagram for vtkOpenGLProperty:
Inheritance graph
[legend]
Collaboration diagram for vtkOpenGLProperty:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkProperty Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkOpenGLPropertyNewInstance () const
virtual void PrintSelf (ostream &os, vtkIndent indent)
void Render (vtkActor *a, vtkRenderer *ren)
void BackfaceRender (vtkActor *a, vtkRenderer *ren)
virtual void ReleaseGraphicsResources (vtkWindow *win)
virtual vtkShaderDeviceAdapter2GetShaderDeviceAdapter2 ()
virtual void PostRender (vtkActor *a, vtkRenderer *r)
virtual vtkShaderProgram2GetPropProgram ()
void SetPropProgram (vtkShaderProgram2 *)
virtual vtkShaderProgram2GetCurrentShaderProgram2 ()
virtual void AddShaderVariable (const char *name, int numVars, int *x)
virtual void AddShaderVariable (const char *name, int numVars, float *x)
virtual void AddShaderVariable (const char *name, int numVars, double *x)

Static Public Member Functions

static vtkOpenGLPropertyNew ()
static int IsTypeOf (const char *type)
static vtkOpenGLPropertySafeDownCast (vtkObjectBase *o)
static void SetMaterialProperties (unsigned int face, double ambient, const double ambient_color[3], double diffuse, const double diffuse_color[3], double specular, const double specular_color[3], double specular_power, double opacity, vtkOpenGLRenderWindow *context)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkOpenGLProperty ()
 ~vtkOpenGLProperty ()
bool RenderShaders (vtkActor *actor, vtkRenderer *renderer)
void LoadMultiTexturingExtensions (vtkRenderer *ren)
bool RenderTextures (vtkActor *actor, vtkRenderer *renderer, bool using_shader_program2)

Protected Attributes

vtkShaderProgram2CachedShaderProgram2
vtkShaderProgram2LastRendererShaderProgram2
vtkShaderProgram2LastPropProgram
vtkShaderProgram2PropProgram
vtkShaderProgram2CurrentShaderProgram2
vtkShader2DefaultMainVS
vtkShader2DefaultMainFS
vtkShader2DefaultPropVS
vtkShader2DefaultPropFS
bool UseDefaultMainVS
bool UseDefaultMainFS
bool UseDefaultPropVS
bool UseDefaultPropFS
vtkGLSLShaderDeviceAdapter2ShaderDeviceAdapter2

Detailed Description

OpenGL property.

vtkOpenGLProperty is a concrete implementation of the abstract class vtkProperty. vtkOpenGLProperty interfaces to the OpenGL rendering library.

Definition at line 36 of file vtkOpenGLProperty.h.


Member Typedef Documentation

Reimplemented from vtkProperty.

Definition at line 40 of file vtkOpenGLProperty.h.


Constructor & Destructor Documentation


Member Function Documentation

Construct object with object color, ambient color, diffuse color, specular color, and edge color white; ambient coefficient=0; diffuse coefficient=0; specular coefficient=0; specular power=1; Gouraud shading; and surface representation. Backface and frontface culling are off.

Reimplemented from vtkProperty.

static int vtkOpenGLProperty::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 vtkProperty.

virtual int vtkOpenGLProperty::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 vtkProperty.

Reimplemented from vtkProperty.

virtual vtkObjectBase* vtkOpenGLProperty::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkProperty.

Reimplemented from vtkProperty.

virtual void vtkOpenGLProperty::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 vtkProperty.

void vtkOpenGLProperty::Render ( vtkActor a,
vtkRenderer ren 
) [virtual]

Implement base class method.

Reimplemented from vtkProperty.

void vtkOpenGLProperty::BackfaceRender ( vtkActor a,
vtkRenderer ren 
) [virtual]

Implement base class method.

Reimplemented from vtkProperty.

virtual void vtkOpenGLProperty::PostRender ( vtkActor a,
vtkRenderer r 
) [virtual]

This method is called after the actor has been rendered. Don't call this directly. This method cleans up any shaders allocated.

Reimplemented from vtkProperty.

virtual void vtkOpenGLProperty::ReleaseGraphicsResources ( vtkWindow win) [virtual]

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

Reimplemented from vtkProperty.

Set/Get the shader program of the vtkProp. It can be set directly or by defining a Material.

Set/Get the shader program of the vtkProp. It can be set directly or by defining a Material.

Get the object that can pass vertex attribute to a vtkShaderProgram2.

Reimplemented from vtkProperty.

Get the vtkShaderProgram2 object in use.

virtual void vtkOpenGLProperty::AddShaderVariable ( const char *  name,
int  numVars,
int x 
) [virtual]

Provide values to initialize shader variables. Useful to initialize shader variables that change over time (animation, GUI widgets inputs, etc. ) - name - hardware name of the uniform variable - numVars - number of variables being set - x - values

Reimplemented from vtkProperty.

virtual void vtkOpenGLProperty::AddShaderVariable ( const char *  name,
int  numVars,
float x 
) [virtual]

Provide values to initialize shader variables. Useful to initialize shader variables that change over time (animation, GUI widgets inputs, etc. ) - name - hardware name of the uniform variable - numVars - number of variables being set - x - values

Reimplemented from vtkProperty.

virtual void vtkOpenGLProperty::AddShaderVariable ( const char *  name,
int  numVars,
double x 
) [virtual]

Provide values to initialize shader variables. Useful to initialize shader variables that change over time (animation, GUI widgets inputs, etc. ) - name - hardware name of the uniform variable - numVars - number of variables being set - x - values

Reimplemented from vtkProperty.

static void vtkOpenGLProperty::SetMaterialProperties ( unsigned int  face,
double  ambient,
const double  ambient_color[3],
double  diffuse,
const double  diffuse_color[3],
double  specular,
const double  specular_color[3],
double  specular_power,
double  opacity,
vtkOpenGLRenderWindow context 
) [static]

Helper method to set OpenGL material properties.

bool vtkOpenGLProperty::RenderShaders ( vtkActor actor,
vtkRenderer renderer 
) [protected]

Method called in vtkOpenGLProperty::Render() to render shaders and/or related entities like shader variables. Returns true if any shaders were rendered.

bool vtkOpenGLProperty::RenderTextures ( vtkActor actor,
vtkRenderer renderer,
bool  using_shader_program2 
) [protected]

Method called in vtkOpenGLProperty::Render() to render textures. Last argument is the value returned from RenderShaders() call.

Load OpenGL extensions for multi texturing.


Member Data Documentation

Definition at line 118 of file vtkOpenGLProperty.h.

Definition at line 120 of file vtkOpenGLProperty.h.

Definition at line 121 of file vtkOpenGLProperty.h.

Definition at line 122 of file vtkOpenGLProperty.h.

Definition at line 126 of file vtkOpenGLProperty.h.

Definition at line 128 of file vtkOpenGLProperty.h.

Definition at line 129 of file vtkOpenGLProperty.h.

Definition at line 130 of file vtkOpenGLProperty.h.

Definition at line 131 of file vtkOpenGLProperty.h.

Definition at line 132 of file vtkOpenGLProperty.h.

Definition at line 133 of file vtkOpenGLProperty.h.

Definition at line 134 of file vtkOpenGLProperty.h.

Definition at line 135 of file vtkOpenGLProperty.h.

Definition at line 136 of file vtkOpenGLProperty.h.


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