VTK
vtkOpenGLRenderer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLRenderer.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkOpenGLRenderer_h
27 #define vtkOpenGLRenderer_h
28 
29 #include "vtkRenderingOpenGL2Module.h" // For export macro
30 #include "vtkRenderer.h"
31 #include <vector> // STL Header
32 
34 class vtkRenderPass;
35 class vtkOpenGLTexture;
36 class vtkTextureObject;
38 class vtkShadowMapPass;
39 
40 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLRenderer : public vtkRenderer
41 {
42 public:
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
50  void DeviceRender(void);
51 
56 
64 
65  void Clear(void);
66 
70  int UpdateLights(void);
71 
79 
85 
86 protected:
89 
93  void CheckCompilation(unsigned int fragmentShader);
94 
95  // Internal method to release graphics resources in any derived renderers.
97 
103  virtual int UpdateGeometry();
104 
105  // Picking functions to be implemented by sub-classes
106  virtual void DevicePickRender();
107  virtual void StartPick(unsigned int pickFromSize);
108  virtual void UpdatePickId();
109  virtual void DonePick();
110  virtual unsigned int GetPickedId();
111  virtual unsigned int GetNumPickedIds();
112  virtual int GetPickedIds(unsigned int atMost, unsigned int *callerBuffer);
113  virtual double GetPickedZ();
114 
115  // Ivars used in picking
116  class vtkGLPickInfo* PickInfo;
117 
118  double PickedZ;
119 
120  friend class vtkOpenGLProperty;
121  friend class vtkOpenGLTexture;
122  friend class vtkOpenGLImageSliceMapper;
123  friend class vtkOpenGLImageResliceMapper;
124 
129 
134 
139 
140  // Is rendering at translucent geometry stage using depth peeling and
141  // rendering a layer other than the first one? (Boolean value)
142  // If so, the uniform variables UseTexture and Texture can be set.
143  // (Used by vtkOpenGLProperty or vtkOpenGLTexture)
144  int DepthPeelingHigherLayer;
145 
146  friend class vtkRenderPass;
147 
150 
151 private:
152  vtkOpenGLRenderer(const vtkOpenGLRenderer&) VTK_DELETE_FUNCTION;
153  void operator=(const vtkOpenGLRenderer&) VTK_DELETE_FUNCTION;
154 };
155 
156 #endif
Implement an Order Independent Transparency render pass.
a simple class to control print indentation
Definition: vtkIndent.h:40
Perform FXAA antialiasing on the current framebuffer.
OpenGL mapper for image slice display.
OpenGL property.
OpenGL renderer.
virtual void ReleaseGraphicsResources(vtkWindow *w)
virtual void DeviceRenderOpaqueGeometry()
Overridden to support hidden line removal.
vtkShadowMapPass * ShadowMapPass
Shadows are delegated to an instance of vtkShadowMapPass.
void DeviceRender(void)
Concrete open gl render method.
virtual void DevicePickRender()
vtkDepthPeelingPass * DepthPeelingPass
Depth peeling is delegated to an instance of vtkDepthPeelingPass.
virtual int UpdateGeometry()
Ask all props to update and draw any opaque and translucent geometry.
virtual void UpdatePickId()
virtual int GetPickedIds(unsigned int atMost, unsigned int *callerBuffer)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual double GetPickedZ()
Return the Z value for the last picked Prop.
virtual void DonePick()
void Clear(void)
Clear the image to the background color.
static vtkOpenGLRenderer * New()
vtkOpenGLFXAAFilter * FXAAFilter
FXAA is delegated to an instance of vtkOpenGLFXAAFilter.
virtual unsigned int GetNumPickedIds()
int UpdateLights(void)
Ask lights to load themselves into graphics pipeline.
bool HaveApplePrimitiveIdBug()
Indicate if this system is subject to the apple/amd bug of not having a working glPrimitiveId.
virtual unsigned int GetPickedId()
virtual void StartPick(unsigned int pickFromSize)
virtual void DeviceRenderTranslucentPolygonalGeometry()
Render translucent polygonal geometry.
void CheckCompilation(unsigned int fragmentShader)
Check the compilation status of some fragment shader source.
int GetDepthPeelingHigherLayer()
Is rendering at translucent geometry stage using depth peeling and rendering a layer other than the f...
OpenGL texture map.
Perform part of the rendering of a vtkRenderer.
Definition: vtkRenderPass.h:59
abstract specification for renderers
Definition: vtkRenderer.h:64
Implement a shadow mapping render pass.
abstracts an OpenGL texture object.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35