44 #ifndef vtkFrameBufferObject2_h
45 #define vtkFrameBufferObject2_h
48 #include "vtkRenderingOpenGL2Module.h"
58 # define vtkCheckFrameBufferStatusMacro(mode)
59 # define vtkStaticCheckFrameBufferStatusMacro(mode)
61 # define vtkCheckFrameBufferStatusMacroImpl(macro, mode) \
64 bool ok = vtkFrameBufferObject2::GetFrameBufferStatus(mode, eStr); \
68 << "OpenGL ERROR. The FBO is incomplete : " << eStr); \
71 # define vtkCheckFrameBufferStatusMacro(mode) \
72 vtkCheckFrameBufferStatusMacroImpl(vtkErrorMacro, mode)
73 # define vtkStaticCheckFrameBufferStatusMacro(mode) \
74 vtkCheckFrameBufferStatusMacroImpl(vtkGenericWarningMacro, mode)
108 void Bind(
unsigned int mode);
113 void UnBind(
unsigned int mode);
119 void SaveCurrentBindings();
125 void SaveCurrentBuffers();
126 void RestorePreviousBuffers(
unsigned int mode);
131 void AddColorAttachment(
137 void AddTexColorAttachment(
140 unsigned int handle);
142 void RemoveTexColorAttachments(
unsigned int mode,
unsigned int num);
144 { this->AddTexColorAttachment(mode, attId, 0U); }
148 void AddColorAttachment(
154 void AddRenColorAttachment(
157 unsigned int handle);
159 void RemoveRenColorAttachments(
unsigned int mode,
unsigned int num);
161 { this->AddRenColorAttachment(mode, attId, 0U); }
166 void AddTexDepthAttachment(
unsigned int mode,
unsigned int handle);
168 { this->AddTexDepthAttachment(mode, 0U); }
174 void AddRenDepthAttachment(
unsigned int mode,
unsigned int handle);
176 { this->AddRenDepthAttachment(mode, 0U); }
181 void ActivateDrawBuffer(
unsigned int id);
182 void ActivateReadBuffer(
unsigned int id);
183 void DeactivateReadBuffer();
188 void ActivateDrawBuffers(
unsigned int n);
189 void ActivateDrawBuffers(
unsigned int *ids,
int n);
190 void DeactivateDrawBuffers();
199 void InitializeViewport(
int width,
int height);
204 int CheckFrameBufferStatus(
unsigned int mode);
211 bool GetFrameBufferStatus(
225 unsigned int mapping);
296 int GetOpenGLType(
int vtkType);
303 unsigned int FBOIndex;
304 unsigned int PreviousDrawFBO;
305 unsigned int PreviousReadFBO;
306 unsigned int DepthBuffer;
307 unsigned int PreviousDrawBuffer;
308 unsigned int PreviousReadBuffer;
void RemoveRenColorAttachment(unsigned int mode, unsigned int attId)
void RemoveRenDepthAttachment(unsigned int mode)
abstract base class for most VTK objects
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
abstracts an OpenGL pixel buffer object.
abstracts an OpenGL texture object.
create a window for renderers to draw into
void RemoveTexColorAttachment(unsigned int mode, unsigned int attId)
void RemoveTexDepthAttachment(unsigned int mode)
Interface to OpenGL framebuffer object.