VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends
vtkOpenGLRenderer Class Reference

OpenGL renderer. More...

#include <vtkOpenGLRenderer.h>

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

List of all members.

Public Types

typedef vtkRenderer Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkOpenGLRendererNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
void DeviceRender (void)
virtual void DeviceRenderTranslucentPolygonalGeometry ()
void ClearLights (void)
void Clear (void)
int UpdateLights (void)
int GetDepthPeelingHigherLayer ()
*virtual vtkShaderProgram2GetShaderProgram ()
virtual void SetShaderProgram (vtkShaderProgram2 *program)
void SetPass (vtkRenderPass *p)
virtual vtkRenderPassGetPass ()

Static Public Member Functions

static vtkOpenGLRendererNew ()
static int IsTypeOf (const char *type)
static vtkOpenGLRendererSafeDownCast (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkOpenGLRenderer ()
 ~vtkOpenGLRenderer ()
void CheckCompilation (unsigned int fragmentShader)
virtual void ReleaseGraphicsResources (vtkWindow *w)
virtual void DevicePickRender ()
virtual void StartPick (unsigned int pickFromSize)
virtual void UpdatePickId ()
virtual void DonePick ()
virtual unsigned int GetPickedId ()
virtual unsigned int GetNumPickedIds ()
virtual int GetPickedIds (unsigned int atMost, unsigned int *callerBuffer)
virtual double GetPickedZ ()
int RenderPeel (int layer)
int GetUseTextureUniformVariable ()
int GetTextureUniformVariable ()

Protected Attributes

class vtkGLPickInfo * PickInfo
double PickedZ
int NumberOfLightsBound
int DepthPeelingIsSupported
int DepthPeelingIsSupportedChecked
vtkOpenGLRendererLayerList * LayerList
unsigned int OpaqueLayerZ
unsigned int TransparentLayerZ
unsigned int ProgramShader
unsigned int DepthFormat
int DepthPeelingHigherLayer
vtkShaderProgram2ShaderProgram
vtkRenderPassPass
int ViewportX
int ViewportY
int ViewportWidth
int ViewportHeight

Friends

class vtkOpenGLProperty
class vtkOpenGLTexture
class vtkOpenGLImageSliceMapper
class vtkOpenGLImageResliceMapper
class vtkRenderPass

Detailed Description

OpenGL renderer.

vtkOpenGLRenderer is a concrete implementation of the abstract class vtkRenderer. vtkOpenGLRenderer interfaces to the OpenGL graphics library.

Tests:
vtkOpenGLRenderer (Tests)

Definition at line 35 of file vtkOpenGLRenderer.h.


Member Typedef Documentation

Reimplemented from vtkRenderer.

Definition at line 39 of file vtkOpenGLRenderer.h.


Constructor & Destructor Documentation


Member Function Documentation

Create a vtkRenderer with a black background, a white ambient light, two-sided lighting turned on, a viewport of (0,0,1,1), and backface culling turned off.

Reimplemented from vtkRenderer.

static int vtkOpenGLRenderer::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 vtkRenderer.

virtual int vtkOpenGLRenderer::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 vtkRenderer.

Reimplemented from vtkRenderer.

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

Reimplemented from vtkRenderer.

Reimplemented from vtkRenderer.

void vtkOpenGLRenderer::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 vtkRenderer.

void vtkOpenGLRenderer::DeviceRender ( void  ) [virtual]

Concrete open gl render method.

Implements vtkRenderer.

Render translucent polygonal geometry. Default implementation just call UpdateTranslucentPolygonalGeometry(). Subclasses of vtkRenderer that can deal with depth peeling must override this method.

Reimplemented from vtkRenderer.

Internal method temporarily removes lights before reloading them into graphics pipeline.

void vtkOpenGLRenderer::Clear ( void  ) [virtual]

Clear the image to the background color.

Reimplemented from vtkRenderer.

int vtkOpenGLRenderer::UpdateLights ( void  ) [virtual]

Ask lights to load themselves into graphics pipeline.

Reimplemented from vtkRenderer.

Is rendering at translucent geometry stage using depth peeling and rendering a layer other than the first one? (Boolean value) If so, the uniform variables UseTexture and Texture can be set. (Used by vtkOpenGLProperty or vtkOpenGLTexture)

virtual void vtkOpenGLRenderer::SetShaderProgram ( vtkShaderProgram2 program) [virtual]

Set/Get a custom render pass. Initial value is NULL.

virtual vtkRenderPass* vtkOpenGLRenderer::GetPass ( ) [virtual]

Set/Get a custom render pass. Initial value is NULL.

void vtkOpenGLRenderer::CheckCompilation ( unsigned int  fragmentShader) [protected]

Check the compilation status of some fragment shader source.

virtual void vtkOpenGLRenderer::ReleaseGraphicsResources ( vtkWindow w) [protected, virtual]

Reimplemented from vtkRenderer.

virtual void vtkOpenGLRenderer::DevicePickRender ( ) [protected, virtual]

Implements vtkViewport.

virtual void vtkOpenGLRenderer::StartPick ( unsigned int  pickFromSize) [protected, virtual]

Implements vtkViewport.

virtual void vtkOpenGLRenderer::UpdatePickId ( ) [protected, virtual]

Implements vtkViewport.

virtual void vtkOpenGLRenderer::DonePick ( ) [protected, virtual]

Implements vtkViewport.

virtual unsigned int vtkOpenGLRenderer::GetPickedId ( ) [protected, virtual]

Implements vtkViewport.

virtual unsigned int vtkOpenGLRenderer::GetNumPickedIds ( ) [protected, virtual]

Implements vtkViewport.

virtual int vtkOpenGLRenderer::GetPickedIds ( unsigned int  atMost,
unsigned int callerBuffer 
) [protected, virtual]

Implements vtkViewport.

virtual double vtkOpenGLRenderer::GetPickedZ ( ) [protected, virtual]

Return the Z value for the last picked Prop.

Implements vtkViewport.

int vtkOpenGLRenderer::RenderPeel ( int  layer) [protected]

Render a peel layer. If there is no more GPU RAM to save the texture, return false otherwise returns true. Also if layer==0 and no prop have been rendered (there is no translucent geometry), it returns false.

Precondition:
positive_layer: layer>=0

Access to the OpenGL program shader uniform variable "useTexture" from the vtkOpenGLProperty or vtkOpenGLTexture.

Access to the OpenGL program shader uniform variable "texture" from the vtkOpenGLProperty or vtkOpenGLTexture.


Friends And Related Function Documentation

friend class vtkOpenGLProperty [friend]

Definition at line 114 of file vtkOpenGLRenderer.h.

friend class vtkOpenGLTexture [friend]

Definition at line 115 of file vtkOpenGLRenderer.h.

friend class vtkOpenGLImageSliceMapper [friend]

Definition at line 116 of file vtkOpenGLRenderer.h.

friend class vtkOpenGLImageResliceMapper [friend]

Definition at line 117 of file vtkOpenGLRenderer.h.

friend class vtkRenderPass [friend]

Reimplemented from vtkRenderer.

Definition at line 163 of file vtkOpenGLRenderer.h.


Member Data Documentation

class vtkGLPickInfo* vtkOpenGLRenderer::PickInfo [protected]

Definition at line 101 of file vtkOpenGLRenderer.h.

Definition at line 104 of file vtkOpenGLRenderer.h.

Definition at line 106 of file vtkOpenGLRenderer.h.

This flag is on if the current OpenGL context supports extensions required by the depth peeling technique.

Definition at line 130 of file vtkOpenGLRenderer.h.

This flag is on once the OpenGL extensions required by the depth peeling technique have been checked.

Definition at line 134 of file vtkOpenGLRenderer.h.

vtkOpenGLRendererLayerList* vtkOpenGLRenderer::LayerList [protected]

Used by the depth peeling technique to store the transparency layers.

Definition at line 137 of file vtkOpenGLRenderer.h.

unsigned int vtkOpenGLRenderer::OpaqueLayerZ [protected]

Definition at line 139 of file vtkOpenGLRenderer.h.

Definition at line 140 of file vtkOpenGLRenderer.h.

unsigned int vtkOpenGLRenderer::ProgramShader [protected]

Definition at line 141 of file vtkOpenGLRenderer.h.

Cache viewport values for depth peeling.

Definition at line 145 of file vtkOpenGLRenderer.h.

Cache viewport values for depth peeling.

Definition at line 146 of file vtkOpenGLRenderer.h.

Cache viewport values for depth peeling.

Definition at line 147 of file vtkOpenGLRenderer.h.

Cache viewport values for depth peeling.

Definition at line 148 of file vtkOpenGLRenderer.h.

unsigned int vtkOpenGLRenderer::DepthFormat [protected]

Actual depth format: vtkgl::DEPTH_COMPONENT16_ARB or vtkgl::DEPTH_COMPONENT24_ARB

Definition at line 153 of file vtkOpenGLRenderer.h.

Definition at line 159 of file vtkOpenGLRenderer.h.

Definition at line 161 of file vtkOpenGLRenderer.h.

Definition at line 164 of file vtkOpenGLRenderer.h.


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