forked from Kitware/VTK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vtkExternalOpenGLRenderer.h
89 lines (71 loc) · 2.66 KB
/
vtkExternalOpenGLRenderer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*=========================================================================
Program: Visualization Toolkit
Module: vtkExternalOpenGLRenderer.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkExternalOpenGLRenderer
* @brief OpenGL renderer
*
* vtkExternalOpenGLRenderer is a secondary implementation of the class
* vtkOpenGLRenderer. vtkExternalOpenGLRenderer interfaces to the
* OpenGL graphics library. This class provides API to preserve the color and
* depth buffers, thereby allowing external applications to manage the OpenGL
* buffers. This becomes very useful when there are multiple OpenGL applications
* sharing the same OpenGL context.
*
* vtkExternalOpenGLRenderer makes sure that the camera used in the scene if of
* type vtkExternalOpenGLCamera. It manages light and camera transformations for
* VTK objects in the OpenGL context.
*
* \sa vtkExternalOpenGLCamera
*/
#ifndef vtkExternalOpenGLRenderer_h
#define vtkExternalOpenGLRenderer_h
#include "vtkRenderingExternalModule.h" // For export macro
#include "vtkOpenGLRenderer.h"
// Forward declarations
class vtkLightCollection;
class vtkExternalLight;
class VTKRENDERINGEXTERNAL_EXPORT vtkExternalOpenGLRenderer :
public vtkOpenGLRenderer
{
public:
static vtkExternalOpenGLRenderer *New();
vtkTypeMacro(vtkExternalOpenGLRenderer, vtkOpenGLRenderer);
void PrintSelf(ostream& os, vtkIndent indent);
/**
* Synchronize camera and light parameters
*/
void Render(void);
/**
* Create a new Camera sutible for use with this type of Renderer.
* This function creates the vtkExternalOpenGLCamera.
*/
vtkCamera* MakeCamera();
/**
* Add an external light to the list of external lights.
*/
virtual void AddExternalLight(vtkExternalLight *);
/**
* Remove an external light from the list of external lights.
*/
virtual void RemoveExternalLight(vtkExternalLight *);
/**
* Remove all external lights
*/
virtual void RemoveAllExternalLights();
protected:
vtkExternalOpenGLRenderer();
~vtkExternalOpenGLRenderer();
vtkLightCollection *ExternalLights;
private:
vtkExternalOpenGLRenderer(const vtkExternalOpenGLRenderer&) VTK_DELETE_FUNCTION;
void operator=(const vtkExternalOpenGLRenderer&) VTK_DELETE_FUNCTION;
};
#endif //vtkExternalOpenGLRenderer_h