45 #ifndef vtkFrameBufferObject2_h
46 #define vtkFrameBufferObject2_h
49 #include "vtkRenderingOpenGL2Module.h"
60 # define vtkCheckFrameBufferStatusMacro(mode)
61 # define vtkStaticCheckFrameBufferStatusMacro(mode)
63 # define vtkCheckFrameBufferStatusMacroImpl(macro, mode) \
66 bool ok = vtkFrameBufferObject2::GetFrameBufferStatus(mode, eStr); \
70 << "OpenGL ERROR. The FBO is incomplete : " << eStr); \
73 # define vtkCheckFrameBufferStatusMacro(mode) \
74 vtkCheckFrameBufferStatusMacroImpl(vtkErrorMacro, mode)
75 # define vtkStaticCheckFrameBufferStatusMacro(mode) \
76 vtkCheckFrameBufferStatusMacroImpl(vtkGenericWarningMacro, mode)
116 void Bind(
unsigned int mode);
123 void UnBind(
unsigned int mode);
132 void SaveCurrentBindings();
142 void SaveCurrentBuffers();
143 void RestorePreviousBuffers(
unsigned int mode);
149 void AddColorAttachment(
154 void AddTexColorAttachment(
157 unsigned int handle);
159 void RemoveTexColorAttachments(
unsigned int mode,
unsigned int num);
161 { this->AddTexColorAttachment(mode, attId, 0U); }
166 void AddColorAttachment(
171 void AddRenColorAttachment(
174 unsigned int handle);
176 void RemoveRenColorAttachments(
unsigned int mode,
unsigned int num);
178 { this->AddRenColorAttachment(mode, attId, 0U); }
185 void AddTexDepthAttachment(
unsigned int mode,
unsigned int handle);
187 { this->AddTexDepthAttachment(mode, 0U); }
195 void AddRenDepthAttachment(
unsigned int mode,
unsigned int handle);
197 { this->AddRenDepthAttachment(mode, 0U); }
204 void ActivateDrawBuffer(
unsigned int id);
205 void ActivateReadBuffer(
unsigned int id);
206 void DeactivateReadBuffer();
214 void ActivateDrawBuffers(
unsigned int n);
215 void ActivateDrawBuffers(
unsigned int *ids,
int n);
216 void DeactivateDrawBuffers();
226 void InitializeViewport(
int width,
int height);
233 int CheckFrameBufferStatus(
unsigned int mode);
242 bool GetFrameBufferStatus(
257 unsigned int mapping);
349 int GetOpenGLType(
int vtkType);
356 unsigned int FBOIndex;
357 unsigned int PreviousDrawFBO;
358 unsigned int PreviousReadFBO;
359 unsigned int PreviousDrawBuffer;
360 unsigned int PreviousReadBuffer;
361 int LastViewportSize[2];
367 inline void QueryViewportSize();
void RemoveRenColorAttachment(unsigned int mode, unsigned int attId)
virtual int * GetLastSize()=0
Dimensions in pixels of the framebuffer.
void RemoveRenDepthAttachment(unsigned int mode)
Directly assign/remove a renderbuffer to depth attachments.
abstract interface to OpenGL FBOs
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
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void RemoveTexColorAttachment(unsigned int mode, unsigned int attId)
void RemoveTexDepthAttachment(unsigned int mode)
Directly assign/remove a texture/renderbuffer to depth attachments.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
Interface to OpenGL framebuffer object.