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 "vtkRenderingOpenGLModule.h" // for export macro
26 #include "vtkWeakPointer.h" // for render context
27 
28 class vtkRenderWindow;
29 class vtkTextureObject;
30 
31 class VTKRENDERINGOPENGL_EXPORT vtkRenderbuffer : public vtkObject
32 {
33 public:
34  static vtkRenderbuffer* New();
35  vtkTypeMacro(vtkRenderbuffer, vtkObject);
36  void PrintSelf(ostream& os, vtkIndent indent);
37 
40  static bool IsSupported(vtkRenderWindow *renWin);
41 
43 
44  vtkGetMacro(Handle, unsigned int);
46 
48 
53  void SetContext(vtkRenderWindow *win);
54  vtkRenderWindow* GetContext();
56 
58 
60  int CreateColorAttachment(
61  unsigned int width,
62  unsigned int height);
64 
66 
68  int CreateDepthAttachment(
69  unsigned int width,
70  unsigned int height);
72 
74 
77  int Create(
78  unsigned int format,
79  unsigned int width,
80  unsigned int height);
82 
83 protected:
85  ~vtkRenderbuffer();
86 
87  bool LoadRequiredExtensions(vtkRenderWindow *renWin);
88  void Alloc();
89  void Free();
90 
92 
93 private:
94  unsigned int Handle;
96 
97 private:
98  vtkRenderbuffer(const vtkRenderbuffer&); // Not implemented.
99  void operator=(const vtkRenderbuffer&); // Not implemented.
100 };
101 
102 #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
abstracts an OpenGL texture object.
create a window for renderers to draw into
Storage for FBO's.
static vtkObject * New()