vtkExternalOpenGLRenderer.h 2.71 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/*=========================================================================

  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.

=========================================================================*/
// .NAME vtkExternalOpenGLRenderer - OpenGL renderer
// .SECTION Description
// vtkExternalOpenGLRenderer is a secondary implementation of the class
// vtkOpenGLRenderer. vtkExternalOpenGLRenderer interfaces to the
19 20 21 22 23 24 25 26 27 28
// 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
29

30 31
#ifndef vtkExternalOpenGLRenderer_h
#define vtkExternalOpenGLRenderer_h
32 33 34 35

#include "vtkRenderingExternalModule.h" // For export macro
#include "vtkOpenGLRenderer.h"

36 37 38 39
// Forward declarations
class vtkLightCollection;
class vtkExternalLight;

40 41 42 43 44 45 46 47
class VTKRENDERINGEXTERNAL_EXPORT vtkExternalOpenGLRenderer :
  public vtkOpenGLRenderer
{
public:
  static vtkExternalOpenGLRenderer *New();
  vtkTypeMacro(vtkExternalOpenGLRenderer, vtkOpenGLRenderer);
  void PrintSelf(ostream& os, vtkIndent indent);

48 49 50 51
  // Description:
  // Synchronize camera and light parameters
  void Render(void);

52
  // Description:
53 54 55
  // Create a new Camera sutible for use with this type of Renderer.
  // This function creates the vtkExternalOpenGLCamera.
  vtkCamera* MakeCamera();
56

57 58 59 60 61 62 63 64 65 66 67 68 69 70
  // Description:
  // Add an external light to the list of external lights.
  virtual void AddExternalLight(vtkExternalLight *);

  // Description:
  // Remove an external light from the list of external lights.
  virtual void RemoveExternalLight(vtkExternalLight *);

  // Description:
  // Remove all external lights
  virtual void RemoveAllExternalLights();

  // Description:

71 72 73 74
protected:
  vtkExternalOpenGLRenderer();
  ~vtkExternalOpenGLRenderer();

75 76
  vtkLightCollection *ExternalLights;

77 78 79 80 81
private:
  vtkExternalOpenGLRenderer(const vtkExternalOpenGLRenderer&);  // Not implemented.
  void operator=(const vtkExternalOpenGLRenderer&);  // Not implemented.
};

82
#endif //vtkExternalOpenGLRenderer_h