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

OpenGL property. More...

#include <vtkOpenGLProperty.h>

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

Public Types

typedef vtkProperty Superclass
 
typedef vtkProperty Superclass
 
- Public Types inherited from vtkProperty
typedef vtkObject Superclass
 
enum  VTKTextureUnit {
  VTK_TEXTURE_UNIT_0 = 0, VTK_TEXTURE_UNIT_1, VTK_TEXTURE_UNIT_2, VTK_TEXTURE_UNIT_3,
  VTK_TEXTURE_UNIT_4, VTK_TEXTURE_UNIT_5, VTK_TEXTURE_UNIT_6, VTK_TEXTURE_UNIT_7
}
 
- Public Types inherited from vtkObject
typedef vtkObjectBase 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 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 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)
 
virtual void PostRender (vtkActor *a, vtkRenderer *r)
 
- Public Member Functions inherited from vtkProperty
vtkPropertyNewInstance () const
 
void DeepCopy (vtkProperty *p)
 
void RemoveTexture (const char *name)
 
void RemoveAllTextures ()
 
int GetNumberOfTextures ()
 
virtual bool GetLighting ()
 
virtual void SetLighting (bool)
 
virtual void LightingOn ()
 
virtual void LightingOff ()
 
virtual void SetInterpolation (int)
 
virtual int GetInterpolation ()
 
void SetInterpolationToFlat ()
 
void SetInterpolationToGouraud ()
 
void SetInterpolationToPhong ()
 
const char * GetInterpolationAsString ()
 
virtual void SetRepresentation (int)
 
virtual int GetRepresentation ()
 
void SetRepresentationToPoints ()
 
void SetRepresentationToWireframe ()
 
void SetRepresentationToSurface ()
 
const char * GetRepresentationAsString ()
 
virtual void SetColor (double r, double g, double b)
 
virtual void SetColor (double a[3])
 
doubleGetColor ()
 
void GetColor (double rgb[3])
 
void GetColor (double &r, double &g, double &b)
 
virtual void SetAmbient (double)
 
virtual double GetAmbient ()
 
virtual void SetDiffuse (double)
 
virtual double GetDiffuse ()
 
virtual void SetSpecular (double)
 
virtual double GetSpecular ()
 
virtual void SetSpecularPower (double)
 
virtual double GetSpecularPower ()
 
virtual void SetOpacity (double)
 
virtual double GetOpacity ()
 
virtual void SetAmbientColor (double, double, double)
 
virtual void SetAmbientColor (double[3])
 
virtual doubleGetAmbientColor ()
 
virtual void GetAmbientColor (double &, double &, double &)
 
virtual void GetAmbientColor (double[3])
 
virtual void SetDiffuseColor (double, double, double)
 
virtual void SetDiffuseColor (double[3])
 
virtual doubleGetDiffuseColor ()
 
virtual void GetDiffuseColor (double &, double &, double &)
 
virtual void GetDiffuseColor (double[3])
 
virtual void SetSpecularColor (double, double, double)
 
virtual void SetSpecularColor (double[3])
 
virtual doubleGetSpecularColor ()
 
virtual void GetSpecularColor (double &, double &, double &)
 
virtual void GetSpecularColor (double[3])
 
virtual int GetEdgeVisibility ()
 
virtual void SetEdgeVisibility (int)
 
virtual void EdgeVisibilityOn ()
 
virtual void EdgeVisibilityOff ()
 
virtual void SetEdgeColor (double, double, double)
 
virtual void SetEdgeColor (double[3])
 
virtual doubleGetEdgeColor ()
 
virtual void GetEdgeColor (double &, double &, double &)
 
virtual void GetEdgeColor (double[3])
 
virtual void SetLineWidth (float)
 
virtual float GetLineWidth ()
 
virtual void SetLineStipplePattern (int)
 
virtual int GetLineStipplePattern ()
 
virtual void SetLineStippleRepeatFactor (int)
 
virtual int GetLineStippleRepeatFactor ()
 
virtual void SetPointSize (float)
 
virtual float GetPointSize ()
 
virtual int GetBackfaceCulling ()
 
virtual void SetBackfaceCulling (int)
 
virtual void BackfaceCullingOn ()
 
virtual void BackfaceCullingOff ()
 
virtual int GetFrontfaceCulling ()
 
virtual void SetFrontfaceCulling (int)
 
virtual void FrontfaceCullingOn ()
 
virtual void FrontfaceCullingOff ()
 
virtual char * GetMaterialName ()
 
virtual void SetShading (int)
 
virtual int GetShading ()
 
virtual void ShadingOn ()
 
virtual void ShadingOff ()
 
void AddShaderVariable (const char *name, int v)
 
void AddShaderVariable (const char *name, float v)
 
void AddShaderVariable (const char *name, double v)
 
void AddShaderVariable (const char *name, int v1, int v2)
 
void AddShaderVariable (const char *name, float v1, float v2)
 
void AddShaderVariable (const char *name, double v1, double v2)
 
void AddShaderVariable (const char *name, int v1, int v2, int v3)
 
void AddShaderVariable (const char *name, float v1, float v2, float v3)
 
void AddShaderVariable (const char *name, double v1, double v2, double v3)
 
void SetTexture (const char *name, vtkTexture *texture)
 
vtkTextureGetTexture (const char *name)
 
void SetTexture (int unit, vtkTexture *texture)
 
vtkTextureGetTexture (int unit)
 
void RemoveTexture (int unit)
 
- 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 vtkOpenGLPropertyNew ()
 
static int IsTypeOf (const char *type)
 
static vtkOpenGLPropertySafeDownCast (vtkObjectBase *o)
 
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)
 
- Static Public Member Functions inherited from vtkProperty
static int IsTypeOf (const char *type)
 
static vtkPropertySafeDownCast (vtkObjectBase *o)
 
static vtkPropertyNew ()
 
- 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
 
 vtkOpenGLProperty ()
 
 ~vtkOpenGLProperty ()
 
bool RenderShaders (vtkActor *actor, vtkRenderer *renderer)
 
void LoadMultiTexturingExtensions (vtkRenderer *ren)
 
virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkOpenGLProperty ()
 
 ~vtkOpenGLProperty ()
 
bool RenderTextures (vtkActor *actor, vtkRenderer *renderer)
 
bool RenderTextures (vtkActor *actor, vtkRenderer *renderer, bool using_shader_program2)
 
- Protected Member Functions inherited from vtkProperty
 vtkProperty ()
 
 ~vtkProperty ()
 
virtual void SetMaterialName (const char *)
 
vtkTextureGetTextureAtIndex (int index)
 
int GetTextureUnitAtIndex (int index)
 
int GetTextureUnit (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

vtkShaderProgram2CachedShaderProgram2
 
vtkShaderProgram2LastRendererShaderProgram2
 
vtkShaderProgram2LastPropProgram
 
vtkShaderProgram2PropProgram
 
vtkShaderProgram2CurrentShaderProgram2
 
vtkShader2DefaultMainVS
 
vtkShader2DefaultMainFS
 
vtkShader2DefaultPropVS
 
vtkShader2DefaultPropFS
 
bool UseDefaultMainVS
 
bool UseDefaultMainFS
 
bool UseDefaultPropVS
 
bool UseDefaultPropFS
 
vtkGLSLShaderDeviceAdapter2ShaderDeviceAdapter2
 
- Protected Attributes inherited from vtkProperty
double Color [3]
 
double AmbientColor [3]
 
double DiffuseColor [3]
 
double SpecularColor [3]
 
double EdgeColor [3]
 
double Ambient
 
double Diffuse
 
double Specular
 
double SpecularPower
 
double Opacity
 
float PointSize
 
float LineWidth
 
int LineStipplePattern
 
int LineStippleRepeatFactor
 
int Interpolation
 
int Representation
 
int EdgeVisibility
 
int BackfaceCulling
 
int FrontfaceCulling
 
bool Lighting
 
int Shading
 
char * MaterialName
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Additional Inherited Members

- Static Protected Member Functions inherited from vtkProperty
static void ComputeCompositeColor (double result[3], double ambient, const double ambient_color[3], double diffuse, const double diffuse_color[3], double specular, const double specular_color[3])
 

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

Definition at line 40 of file vtkOpenGLProperty.h.

Definition at line 32 of file vtkOpenGLProperty.h.

Constructor & Destructor Documentation

vtkOpenGLProperty::vtkOpenGLProperty ( )
protected
vtkOpenGLProperty::~vtkOpenGLProperty ( )
protected
vtkOpenGLProperty::vtkOpenGLProperty ( )
protected
vtkOpenGLProperty::~vtkOpenGLProperty ( )
protected

Member Function Documentation

static vtkOpenGLProperty* vtkOpenGLProperty::New ( )
static
static int vtkOpenGLProperty::IsTypeOf ( const char *  type)
static
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.

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

Reimplemented from vtkProperty.

vtkOpenGLProperty* vtkOpenGLProperty::NewInstance ( ) const
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.

virtual vtkShaderProgram2* vtkOpenGLProperty::GetPropProgram ( )
virtual

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

void vtkOpenGLProperty::SetPropProgram ( vtkShaderProgram2 )

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

virtual vtkShaderDeviceAdapter2* vtkOpenGLProperty::GetShaderDeviceAdapter2 ( )
virtual

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

Reimplemented from vtkProperty.

virtual vtkShaderProgram2* vtkOpenGLProperty::GetCurrentShaderProgram2 ( )
virtual

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.

void vtkOpenGLProperty::LoadMultiTexturingExtensions ( vtkRenderer ren)
protected

Load OpenGL extensions for multi texturing.

static vtkOpenGLProperty* vtkOpenGLProperty::New ( )
static
static int vtkOpenGLProperty::IsTypeOf ( const char *  type)
static
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.

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

Reimplemented from vtkProperty.

vtkOpenGLProperty* vtkOpenGLProperty::NewInstance ( ) const
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.

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

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

Member Data Documentation

vtkShaderProgram2* vtkOpenGLProperty::CachedShaderProgram2
protected

Definition at line 118 of file vtkOpenGLProperty.h.

vtkShaderProgram2* vtkOpenGLProperty::LastRendererShaderProgram2
protected

Definition at line 120 of file vtkOpenGLProperty.h.

vtkShaderProgram2* vtkOpenGLProperty::LastPropProgram
protected

Definition at line 121 of file vtkOpenGLProperty.h.

vtkShaderProgram2* vtkOpenGLProperty::PropProgram
protected

Definition at line 122 of file vtkOpenGLProperty.h.

vtkShaderProgram2* vtkOpenGLProperty::CurrentShaderProgram2
protected

Definition at line 126 of file vtkOpenGLProperty.h.

vtkShader2* vtkOpenGLProperty::DefaultMainVS
protected

Definition at line 128 of file vtkOpenGLProperty.h.

vtkShader2* vtkOpenGLProperty::DefaultMainFS
protected

Definition at line 129 of file vtkOpenGLProperty.h.

vtkShader2* vtkOpenGLProperty::DefaultPropVS
protected

Definition at line 130 of file vtkOpenGLProperty.h.

vtkShader2* vtkOpenGLProperty::DefaultPropFS
protected

Definition at line 131 of file vtkOpenGLProperty.h.

bool vtkOpenGLProperty::UseDefaultMainVS
protected

Definition at line 132 of file vtkOpenGLProperty.h.

bool vtkOpenGLProperty::UseDefaultMainFS
protected

Definition at line 133 of file vtkOpenGLProperty.h.

bool vtkOpenGLProperty::UseDefaultPropVS
protected

Definition at line 134 of file vtkOpenGLProperty.h.

bool vtkOpenGLProperty::UseDefaultPropFS
protected

Definition at line 135 of file vtkOpenGLProperty.h.

vtkGLSLShaderDeviceAdapter2* vtkOpenGLProperty::ShaderDeviceAdapter2
protected

Definition at line 136 of file vtkOpenGLProperty.h.


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