1 /*=========================================================================
2 
3   Program:   Visualization Toolkit
4   Module:    vtkDisplayListPainter.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 =========================================================================*/
15 // .NAME vtkDisplayListPainter - abstract superclass for painter that
16 // builds/uses display lists.
17 
18 #ifndef vtkDisplayListPainter_h
19 #define vtkDisplayListPainter_h
20 
21 #include "vtkRenderingOpenGLModule.h" // For export macro
22 #include "vtkPainter.h"
23 
24 class vtkInformationIntegerKey;
25 
26 class VTKRENDERINGOPENGL_EXPORT vtkDisplayListPainter : public vtkPainter
27 {
28 public:
29   static vtkDisplayListPainter* New();
30   vtkTypeMacro(vtkDisplayListPainter, vtkPainter);
31   void PrintSelf(ostream& os, vtkIndent indent);
32 
33   // Description:
34   // Turn on/off flag to control whether data is rendered using
35   // immediate mode or note. Immediate mode rendering
36   // tends to be slower but it can handle larger datasets.
37   // The default value is immediate mode off. If you are
38   // having problems rendering a large dataset you might
39   // want to consider using immediate more rendering.
40   static vtkInformationIntegerKey* IMMEDIATE_MODE_RENDERING();
41 
42   // Description:
43   // Get the time required to draw the geometry last time it was rendered.
44   // Overridden to avoid adding of delegate rendering time
45   // when Display Lists are used.
46   virtual double GetTimeToDraw();
47 
48 protected:
49   vtkDisplayListPainter();
50   ~vtkDisplayListPainter();
51 
52   // Description:
53   // Called before RenderInternal() if the Information has been changed
54   // since the last time this method was called.
55   virtual void ProcessInformation(vtkInformation*);
56 
57 
58   // These methods set the ivars. These are purposefully protected.
59   // The only means to affect them should be using information object.
60   vtkSetMacro(ImmediateModeRendering,int);
61 
62   int ImmediateModeRendering;
63 
64 private:
65   vtkDisplayListPainter(const vtkDisplayListPainter&); // Not implemented.
66   void operator=(const vtkDisplayListPainter&); // Not implemented.
67 };
68 
69 #endif
70