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 =========================================================================*/
22 #ifndef vtkOpenGLRenderer_h
23 #define vtkOpenGLRenderer_h
24 
25 #include "vtkRenderingOpenGL2Module.h" // For export macro
26 #include "vtkRenderer.h"
27 #include <vector> // STL Header
28 
29 class vtkRenderPass;
30 class vtkOpenGLTexture;
31 class vtkTextureObject;
33 
34 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLRenderer : public vtkRenderer
35 {
36 public:
37  static vtkOpenGLRenderer *New();
39  void PrintSelf(ostream& os, vtkIndent indent);
40 
42  void DeviceRender(void);
43 
48 
49  void Clear(void);
50 
52  int UpdateLights(void);
53 
58  int GetDepthPeelingHigherLayer();
59 
61 
62  void SetPass(vtkRenderPass *p);
65 
66 protected:
69 
71  void CheckCompilation(unsigned int fragmentShader);
72 
73  // Internal method to release graphics resources in any derived renderers.
74  virtual void ReleaseGraphicsResources(vtkWindow *w);
75 
76  // Picking functions to be implemented by sub-classes
77  virtual void DevicePickRender();
78  virtual void StartPick(unsigned int pickFromSize);
79  virtual void UpdatePickId();
80  virtual void DonePick();
81  virtual unsigned int GetPickedId();
82  virtual unsigned int GetNumPickedIds();
83  virtual int GetPickedIds(unsigned int atMost, unsigned int *callerBuffer);
84  virtual double GetPickedZ();
85 
86  // Ivars used in picking
87  class vtkGLPickInfo* PickInfo;
88 
89  double PickedZ;
90 
91  friend class vtkOpenGLProperty;
92  friend class vtkOpenGLTexture;
93  friend class vtkOpenGLImageSliceMapper;
94  friend class vtkOpenGLImageResliceMapper;
95 
98 
99  // Is rendering at translucent geometry stage using depth peeling and
100  // rendering a layer other than the first one? (Boolean value)
101  // If so, the uniform variables UseTexture and Texture can be set.
102  // (Used by vtkOpenGLProperty or vtkOpenGLTexture)
103  int DepthPeelingHigherLayer;
104 
105  friend class vtkRenderPass;
106  vtkRenderPass *Pass;
107 
108 private:
109  vtkOpenGLRenderer(const vtkOpenGLRenderer&); // Not implemented.
110  void operator=(const vtkOpenGLRenderer&); // Not implemented.
111 };
112 
113 #endif
virtual double GetPickedZ()=0
Implement an Order Independent Transparency render pass.
virtual void ReleaseGraphicsResources(vtkWindow *)
Definition: vtkRenderer.h:508
virtual int UpdateLights(void)
Definition: vtkRenderer.h:625
abstract specification for renderers
Definition: vtkRenderer.h:63
virtual int GetPickedIds(unsigned int atMost, unsigned int *callerBuffer)=0
OpenGL property.
OpenGL mapper for image slice display.
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
OpenGL texture map.
virtual void UpdatePickId()=0
window superclass for vtkRenderWindow
Definition: vtkWindow.h:33
GLubyte GLubyte GLubyte GLubyte w
Definition: vtkgl.h:12054
virtual void DeviceRender()=0
void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void DeviceRenderTranslucentPolygonalGeometry()
vtkDepthPeelingPass * DepthPeelingPass
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
virtual unsigned int GetPickedId()=0
abstracts an OpenGL texture object.
virtual void StartPick(unsigned int pickFromSize)=0
virtual unsigned int GetNumPickedIds()=0
static vtkRenderer * New()
virtual void DevicePickRender()=0
Perform part of the rendering of a vtkRenderer.
Definition: vtkRenderPass.h:57
OpenGL renderer.
virtual void DonePick()=0
virtual void Clear()
Definition: vtkRenderer.h:245
GLfloat GLfloat p
Definition: vtkgl.h:15717