VTK
vtkRenderbuffer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkRenderbuffer.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 =========================================================================*/
21 #ifndef vtkRenderbuffer_h
22 #define vtkRenderbuffer_h
23 
24 #include "vtkObject.h"
25 #include "vtkRenderingOpenGL2Module.h" // for export macro
26 #include "vtkWeakPointer.h" // for render context
27 
28 class vtkRenderWindow;
29 
30 class VTKRENDERINGOPENGL2_EXPORT vtkRenderbuffer : public vtkObject
31 {
32 public:
33  static vtkRenderbuffer* New();
34  vtkTypeMacro(vtkRenderbuffer, vtkObject);
35  void PrintSelf(ostream& os, vtkIndent indent);
36 
39  static bool IsSupported(vtkRenderWindow *renWin);
40 
42 
43  vtkGetMacro(Handle, unsigned int);
45 
47 
52  void SetContext(vtkRenderWindow *win);
53  vtkRenderWindow* GetContext();
55 
57 
59  int CreateColorAttachment(
60  unsigned int width,
61  unsigned int height);
63 
65 
67  int CreateDepthAttachment(
68  unsigned int width,
69  unsigned int height);
71 
73 
76  int Create(
77  unsigned int format,
78  unsigned int width,
79  unsigned int height);
81 
82 protected:
84  ~vtkRenderbuffer();
85 
86  bool LoadRequiredExtensions(vtkRenderWindow *renWin);
87  void Alloc();
88  void Free();
89 
90  int DepthBufferFloat;
91 
92 private:
93  unsigned int Handle;
95 
96 private:
97  vtkRenderbuffer(const vtkRenderbuffer&); // Not implemented.
98  void operator=(const vtkRenderbuffer&); // Not implemented.
99 };
100 
101 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
create a window for renderers to draw into
Storage for FBO's.
static vtkObject * New()