VTK
vtkOpenGLFramebufferObject.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLFramebufferObject.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 =========================================================================*/
135 #ifndef vtkOpenGLFramebufferObject_h
136 #define vtkOpenGLFramebufferObject_h
137 
144 #ifdef NDEBUG
145 # define vtkCheckFrameBufferStatusMacro(mode)
146 # define vtkStaticCheckFrameBufferStatusMacro(mode)
147 #else
148 # define vtkCheckFrameBufferStatusMacroImpl(macro, mode) \
149 { \
150 const char *eStr; \
151 bool ok = vtkOpenGLFramebufferObject::GetFrameBufferStatus(mode, eStr); \
152 if (!ok) \
153 { \
154  macro( \
155  << "OpenGL ERROR. The FBO is incomplete : " << eStr); \
156 } \
157  }
158 # define vtkCheckFrameBufferStatusMacro(mode) \
159  vtkCheckFrameBufferStatusMacroImpl(vtkErrorMacro, mode)
160 # define vtkStaticCheckFrameBufferStatusMacro(mode) \
161  vtkCheckFrameBufferStatusMacroImpl(vtkGenericWarningMacro, mode)
162 #endif
163 
164 
166 #include "vtkRenderingOpenGL2Module.h" // For export macro
167 #include "vtkWeakPointer.h" // needed for vtkWeakPointer.
168 #include <vector> // for the lists of logical buffers.
169 #include <map> // for the maps
170 
171 class vtkFOInfo;
176 class vtkRenderWindow;
177 class vtkRenderbuffer;
178 class vtkShaderProgram;
179 class vtkTextureObject;
180 class vtkWindow;
181 
182 class VTKRENDERINGOPENGL2_EXPORT vtkOpenGLFramebufferObject : public vtkFrameBufferObjectBase
183 {
184 public:
187  void PrintSelf(ostream& os, vtkIndent indent) override;
188 
190 
197  void SetContext(vtkRenderWindow *context);
200 
204  void Bind();
205  void Bind(unsigned int mode);
206 
210  void UnBind();
211  void UnBind(unsigned int mode);
212 
214 
218  void SaveCurrentBindings(unsigned int mode);
220  this->SaveCurrentBuffers();
221  this->SaveCurrentBindings();
222  }
223  void SaveCurrentBindingsAndBuffers(unsigned int mode) {
224  this->SaveCurrentBuffers(mode);
225  this->SaveCurrentBindings(mode);
226  }
228  void RestorePreviousBindings(unsigned int mode);
230  this->RestorePreviousBindings();
231  this->RestorePreviousBuffers();
232  }
234  this->RestorePreviousBindings(mode);
235  this->RestorePreviousBuffers(mode);
236  }
238 
240 
248  void SaveCurrentBuffers(unsigned int mode);
250  void RestorePreviousBuffers(unsigned int mode);
252 
254 
263  bool Start(int width, int height);
264  bool StartNonOrtho(int width, int height);
266 
271  void InitializeViewport(int width, int height);
272 
274  // activate deactivate draw/read buffers (color buffers)
275  void ActivateDrawBuffers(unsigned int n);
276  void ActivateDrawBuffers(unsigned int *ids, int n);
277  void ActivateDrawBuffer(unsigned int id);
278  void ActivateReadBuffer(unsigned int id);
279  void ActivateBuffer(unsigned int id) {
280  this->ActivateDrawBuffer(id);
281  this->ActivateReadBuffer(id); }
285 
296  void RenderQuad(int minX, int maxX, int minY, int maxY,
298 
300 
306  unsigned int mode,
307  unsigned int attId,
308  vtkTextureObject* tex,
309  unsigned int zslice = 0,
310  unsigned int format = 0,
311  unsigned int mipmapLevel = 0);
313  unsigned int mode,
314  unsigned int attId,
315  vtkRenderbuffer* tex);
316  void RemoveColorAttachment(unsigned int mode, unsigned int index);
317  void RemoveColorAttachments(unsigned int mode, unsigned int num);
319 
324 
326 
330  this->AddDepthAttachment(this->GetBothMode()); }
331  void AddDepthAttachment(unsigned int mode);
332  void AddDepthAttachment(unsigned int mode, vtkTextureObject* tex);
333  void AddDepthAttachment(unsigned int mode, vtkRenderbuffer* tex);
334  void RemoveDepthAttachment(unsigned int mode);
336 
338 
343  bool PopulateFramebuffer(int width, int height);
345  int width,
346  int height,
347  bool useTextures,
348  int numberOfColorAttachments,
349  int colorDataType,
350  bool wantDepthAttachment,
351  int depthBitplanes,
352  int multisamples);
354 
361 
368 
370 
373  int *GetLastSize() override
374  {
375  vtkDebugMacro(<< this->GetClassName() << " (" << this << "): returning LastSize pointer " << this->LastSize);
376  return this->LastSize;
377  }
378  void GetLastSize(int &_arg1, int &_arg2) override
379  {
380  _arg1 = this->LastSize[0];
381  _arg2 = this->LastSize[1];
382  vtkDebugMacro(<< this->GetClassName() << " (" << this << "): returning LastSize (" << _arg1 << "," << _arg2 << ")");
383  }
384  void GetLastSize (int _arg[2]) override
385  {
386  this->GetLastSize (_arg[0], _arg[1]);
387  }
389 
395  return true; }
396 
401  int CheckFrameBufferStatus(unsigned int mode);
402 
407 
414  static
416  unsigned int mode,
417  const char *&desc);
418 
425  static int Blit(
426  const int srcExt[4], const int destExt[4], unsigned int bits, unsigned int mapping);
427 
437  int extent[4],
438  int vtkType,
439  int channel);
440 
442  int extent[4],
443  int vtkType);
444 
446  int extent[4],
447  int vtkType);
448 
455  int extent[4],
456  int vtkType);
457 
466  int extent[4],
467  int vtkType,
468  int nComps,
469  int oglType,
470  int oglFormat);
471 
472  static
473  void Download(
474  int extent[4],
475  int vtkType,
476  int nComps,
477  int oglType,
478  int oglFormat,
479  vtkPixelBufferObject *pbo);
480 
481  // returns the mode values for draw/read/both
482  // Can be used in cases where you do not
483  // want to have OpenGL code mixed in.
484  static unsigned int GetDrawMode();
485  static unsigned int GetReadMode();
486  static unsigned int GetBothMode();
487 
491  void Resize(int width, int height);
492 
493  // Deprecated
494  void RemoveTexColorAttachments(unsigned int mode, unsigned int num)
495  { this->RemoveColorAttachments(mode, num); }
496  void RemoveTexColorAttachment(unsigned int mode, unsigned int attId)
497  { this->RemoveColorAttachment(mode, attId); }
498  void RemoveRenDepthAttachment(unsigned int mode)
499  { this->RemoveDepthAttachment(mode); }
500  void RemoveTexDepthAttachment(unsigned int mode)
501  { this->RemoveDepthAttachment(mode); }
502 
503 protected:
504  void SetColorBuffer(unsigned int mode,
505  unsigned int index, vtkTextureObject *texture,
506  unsigned int zslice=0, unsigned int format=0, unsigned int mipmapLevel=0);
507  void SetColorBuffer(unsigned int mode,
508  unsigned int index, vtkRenderbuffer *rb);
509  void SetDepthBuffer(unsigned int mode, vtkTextureObject *depthTexture);
510  void SetDepthBuffer(unsigned int mode, vtkRenderbuffer *depthBuffer);
511 
515  void Attach();
516 
520  void AttachColorBuffer(unsigned int mode, unsigned int index);
521  void AttachDepthBuffer(unsigned int mode);
522 
526  static
528  return true; };
529 
531 
532  // gen buffer (occurs when context is set)
533  void CreateFBO();
534 
535  // delete buffer (occurs during destruction or context swicth)
536  void DestroyFBO();
537 
538  // detach and delete our reference(s)
541 
542  // glDrawBuffers
544 
545  // examine attachments to see if they have the same size
546  void UpdateSize();
547 
552 
556  void DisplayFrameBufferAttachment(unsigned int uattachment);
557 
562 
567 
571  void DisplayBuffer(int value);
572 
576  int GetOpenGLType(int vtkType);
577 
580 
582 
583  unsigned int FBOIndex;
584 
585  unsigned int PreviousDrawFBO;
586  unsigned int PreviousReadFBO;
589  unsigned int PreviousDrawBuffer;
590  unsigned int PreviousReadBuffer;
593 
594  int LastSize[2];
595  std::vector<unsigned int> ActiveBuffers;
596 
597  vtkFOInfo *DrawDepthBuffer;
598  vtkFOInfo *ReadDepthBuffer;
599  std::map<unsigned int, vtkFOInfo *> DrawColorBuffers;
600  std::map<unsigned int, vtkFOInfo *> ReadColorBuffers;
601 
602 private:
604  void operator=(const vtkOpenGLFramebufferObject&) = delete;
605 };
606 
607 #endif
vtkOpenGLFramebufferObject::GetLastSize
int * GetLastSize() override
Dimensions in pixels of the framebuffer.
Definition: vtkOpenGLFramebufferObject.h:373
vtkOpenGLFramebufferObject::GetDrawMode
static unsigned int GetDrawMode()
vtkOpenGLFramebufferObject::DisplayReadBuffer
void DisplayReadBuffer()
Display the read buffer.
vtkOpenGLFramebufferObject::UnBind
void UnBind(unsigned int mode)
vtkOpenGLFramebufferObject::AddDepthAttachment
void AddDepthAttachment(unsigned int mode, vtkTextureObject *tex)
vtkOpenGLFramebufferObject::SaveCurrentBindingsAndBuffers
void SaveCurrentBindingsAndBuffers(unsigned int mode)
Definition: vtkOpenGLFramebufferObject.h:223
vtkOpenGLFramebufferObject::DrawBufferSaved
bool DrawBufferSaved
Definition: vtkOpenGLFramebufferObject.h:591
vtkOpenGLFramebufferObject::UpdateSize
void UpdateSize()
vtkX3D::value
@ value
Definition: vtkX3D.h:220
vtkOpenGLFramebufferObject::DeactivateDrawBuffers
void DeactivateDrawBuffers()
vtkOpenGLFramebufferObject::PopulateFramebuffer
bool PopulateFramebuffer(int width, int height, bool useTextures, int numberOfColorAttachments, int colorDataType, bool wantDepthAttachment, int depthBitplanes, int multisamples)
vtkOpenGLFramebufferObject::RestorePreviousBindingsAndBuffers
void RestorePreviousBindingsAndBuffers()
Definition: vtkOpenGLFramebufferObject.h:229
vtkOpenGLFramebufferObject::DrawBindingSaved
bool DrawBindingSaved
Definition: vtkOpenGLFramebufferObject.h:587
vtkOpenGLFramebufferObject::StartNonOrtho
bool StartNonOrtho(int width, int height)
vtkOpenGLFramebufferObject::SaveCurrentBindings
void SaveCurrentBindings(unsigned int mode)
vtkOpenGLFramebufferObject::GetNumberOfColorAttachments
int GetNumberOfColorAttachments(unsigned int mode)
Return the number of color attachments for the given mode.
vtkOpenGLFramebufferObject::vtkOpenGLFramebufferObject
vtkOpenGLFramebufferObject()
vtkOpenGLFramebufferObject::PreviousReadBuffer
unsigned int PreviousReadBuffer
Definition: vtkOpenGLFramebufferObject.h:590
vtkOpenGLFramebufferObject::PopulateFramebuffer
bool PopulateFramebuffer(int width, int height)
Convenience method to populate a framebuffer with attachments created as well.
vtkOpenGLFramebufferObject::SetDepthBuffer
void SetDepthBuffer(unsigned int mode, vtkTextureObject *depthTexture)
vtkOpenGLFramebufferObject
Internal class which encapsulates OpenGL FramebufferObject.
Definition: vtkOpenGLFramebufferObject.h:183
vtkOpenGLFramebufferObject::GetMaximumNumberOfRenderTargets
unsigned int GetMaximumNumberOfRenderTargets()
Returns the maximum number of render targets available.
vtkOpenGLFramebufferObject::SetDepthBuffer
void SetDepthBuffer(unsigned int mode, vtkRenderbuffer *depthBuffer)
vtkOpenGLFramebufferObject::GetLastSize
void GetLastSize(int _arg[2]) override
Definition: vtkOpenGLFramebufferObject.h:384
vtkOpenGLFramebufferObject::RemoveTexDepthAttachment
void RemoveTexDepthAttachment(unsigned int mode)
Definition: vtkOpenGLFramebufferObject.h:500
vtkOpenGLFramebufferObject::PreviousDrawBuffer
unsigned int PreviousDrawBuffer
Definition: vtkOpenGLFramebufferObject.h:589
vtkOpenGLFramebufferObject::RestorePreviousBuffers
void RestorePreviousBuffers()
vtkOpenGLFramebufferObject::ActivateReadBuffer
void ActivateReadBuffer(unsigned int id)
vtkOpenGLFramebufferObject::Context
vtkWeakPointer< vtkOpenGLRenderWindow > Context
Definition: vtkOpenGLFramebufferObject.h:581
vtkOpenGLFramebufferObject::RemoveDepthAttachment
void RemoveDepthAttachment(unsigned int mode)
vtkOpenGLFramebufferObject::DownloadColor3
vtkPixelBufferObject * DownloadColor3(int extent[4], int vtkType)
vtkOpenGLFramebufferObject::DisplayDrawBuffers
void DisplayDrawBuffers()
Display the draw buffers.
vtkOpenGLFramebufferObject::DownloadDepth
vtkPixelBufferObject * DownloadDepth(int extent[4], int vtkType)
Download data from the depth attachment of the currently bound FBO.
vtkOpenGLFramebufferObject::RemoveColorAttachment
void RemoveColorAttachment(unsigned int mode, unsigned int index)
vtkOpenGLFramebufferObject::LoadRequiredExtensions
static bool LoadRequiredExtensions(vtkOpenGLRenderWindow *)
Load all necessary extensions.
Definition: vtkOpenGLFramebufferObject.h:527
vtkOpenGLFramebufferObject::DownloadColor4
vtkPixelBufferObject * DownloadColor4(int extent[4], int vtkType)
vtkFrameBufferObjectBase
abstract interface to OpenGL FBOs
Definition: vtkFrameBufferObjectBase.h:33
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
vtkOpenGLFramebufferObject::ActivateDrawBuffers
void ActivateDrawBuffers(unsigned int n)
vtkOpenGLFramebufferObject::Start
bool Start(int width, int height)
User must take care that width/height match the dimensions of the user defined texture attachments.
vtkOpenGLFramebufferObject::GetContext
vtkOpenGLRenderWindow * GetContext()
vtkOpenGLFramebufferObject::DisplayBuffer
void DisplayBuffer(int value)
Display any buffer (convert value into string).
vtkOpenGLFramebufferObject::ActivateDrawBuffers
void ActivateDrawBuffers(unsigned int *ids, int n)
vtkOpenGLFramebufferObject::CreateFBO
void CreateFBO()
vtkOpenGLFramebufferObject::Attach
void Attach()
Attach all buffers to the FO if not already done so.
vtkOpenGLFramebufferObject::SaveCurrentBuffers
void SaveCurrentBuffers(unsigned int mode)
vtkObjectBase::GetClassName
const char * GetClassName() const
Return the class name as a string.
vtkOpenGLFramebufferObject::Download
vtkPixelBufferObject * Download(int extent[4], int vtkType, int nComps, int oglType, int oglFormat)
Download data from the read buffer of the current FBO.
vtkOpenGLFramebufferObject::New
static vtkOpenGLFramebufferObject * New()
vtkOpenGLFramebufferObject::PreviousDrawFBO
unsigned int PreviousDrawFBO
Definition: vtkOpenGLFramebufferObject.h:585
vtkOpenGLFramebufferObject::CheckFrameBufferStatus
int CheckFrameBufferStatus(unsigned int mode)
Validate the current FBO configuration (attachments, formats, etc) prints detected errors to vtkError...
vtkOpenGLFramebufferObject::DrawColorBuffers
std::map< unsigned int, vtkFOInfo * > DrawColorBuffers
Definition: vtkOpenGLFramebufferObject.h:599
vtkOpenGLFramebufferObject::AttachColorBuffer
void AttachColorBuffer(unsigned int mode, unsigned int index)
Attach a specific buffer.
vtkX3D::height
@ height
Definition: vtkX3D.h:254
vtkOpenGLFramebufferObject::RemoveColorAttachments
void RemoveColorAttachments(unsigned int mode, unsigned int num)
vtkOpenGLFramebufferObject::ReadColorBuffers
std::map< unsigned int, vtkFOInfo * > ReadColorBuffers
Definition: vtkOpenGLFramebufferObject.h:600
vtkOpenGLFramebufferObject::InitializeViewport
void InitializeViewport(int width, int height)
Set up ortho viewport with scissor, lighting, blend, and depth disabled.
vtkOpenGLFramebufferObject::ReadBufferSaved
bool ReadBufferSaved
Definition: vtkOpenGLFramebufferObject.h:592
vtkShaderProgram
The ShaderProgram uses one or more Shader objects.
Definition: vtkShaderProgram.h:48
vtkGenericOpenGLResourceFreeCallback
Definition: vtkOpenGLResourceFreeCallback.h:26
vtkOpenGLFramebufferObject::Resize
void Resize(int width, int height)
Resize all FO attachments.
vtkOpenGLFramebufferObject::RemoveTexColorAttachments
void RemoveTexColorAttachments(unsigned int mode, unsigned int num)
Definition: vtkOpenGLFramebufferObject.h:494
vtkOpenGLFramebufferObject::DestroyDepthBuffer
void DestroyDepthBuffer(vtkWindow *win)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkTextureObject
abstracts an OpenGL texture object.
Definition: vtkTextureObject.h:45
vtkOpenGLFramebufferObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkOpenGLFramebufferObject::IsSupported
static bool IsSupported(vtkOpenGLRenderWindow *)
Returns if the context supports the required extensions.
Definition: vtkOpenGLFramebufferObject.h:394
vtkOpenGLFramebufferObject::Bind
void Bind()
Make the draw frame buffer active.
vtkOpenGLFramebufferObject::RemoveRenDepthAttachment
void RemoveRenDepthAttachment(unsigned int mode)
Definition: vtkOpenGLFramebufferObject.h:498
vtkOpenGLFramebufferObject::DeactivateReadBuffer
void DeactivateReadBuffer()
vtkOpenGLFramebufferObject::ResourceCallback
vtkGenericOpenGLResourceFreeCallback * ResourceCallback
Definition: vtkOpenGLFramebufferObject.h:528
vtkOpenGLFramebufferObject::Blit
static int Blit(const int srcExt[4], const int destExt[4], unsigned int bits, unsigned int mapping)
Copy from the currently bound READ FBO to the currently bound DRAW FBO.
vtkWeakPointer.h
vtkOpenGLFramebufferObject::ReadBindingSaved
bool ReadBindingSaved
Definition: vtkOpenGLFramebufferObject.h:588
vtkOpenGLFramebufferObject::RestorePreviousBindings
void RestorePreviousBindings()
vtkOpenGLFramebufferObject::ActivateBuffers
void ActivateBuffers()
vtkOpenGLFramebufferObject::AddDepthAttachment
void AddDepthAttachment(unsigned int mode, vtkRenderbuffer *tex)
vtkOpenGLFramebufferObject::GetOpenGLType
int GetOpenGLType(int vtkType)
Given a vtk type get a compatible open gl type.
vtkOpenGLFramebufferObject::AddDepthAttachment
void AddDepthAttachment()
Directly assign/remove a texture/renderbuffer to depth attachments.
Definition: vtkOpenGLFramebufferObject.h:329
vtkOpenGLFramebufferObject::DisplayFrameBufferAttachment
void DisplayFrameBufferAttachment(unsigned int uattachment)
Display a given attachment for the current framebuffer object.
vtkOpenGLFramebufferObject::FBOIndex
unsigned int FBOIndex
Definition: vtkOpenGLFramebufferObject.h:583
vtkOpenGLFramebufferObject::RenderQuad
void RenderQuad(int minX, int maxX, int minY, int maxY, vtkShaderProgram *program, vtkOpenGLVertexArrayObject *vao)
Renders a quad at the given location with pixel coordinates.
vtkOpenGLFramebufferObject::DestroyColorBuffers
void DestroyColorBuffers(vtkWindow *win)
vtkOpenGLFramebufferObject::PreviousReadFBO
unsigned int PreviousReadFBO
Definition: vtkOpenGLFramebufferObject.h:586
vtkOpenGLFramebufferObject::SetContext
void SetContext(vtkRenderWindow *context)
Get/Set the context.
vtkOpenGLFramebufferObject::~vtkOpenGLFramebufferObject
~vtkOpenGLFramebufferObject() override
vtkOpenGLFramebufferObject::Download
static void Download(int extent[4], int vtkType, int nComps, int oglType, int oglFormat, vtkPixelBufferObject *pbo)
vtkOpenGLFramebufferObject::Bind
void Bind(unsigned int mode)
vtkOpenGLFramebufferObject::SetColorBuffer
void SetColorBuffer(unsigned int mode, unsigned int index, vtkTextureObject *texture, unsigned int zslice=0, unsigned int format=0, unsigned int mipmapLevel=0)
vtkOpenGLFramebufferObject::SaveCurrentBuffers
void SaveCurrentBuffers()
Store the current draw and read buffers.
vtkOpenGLFramebufferObject::RestorePreviousBindingsAndBuffers
void RestorePreviousBindingsAndBuffers(unsigned int mode)
Definition: vtkOpenGLFramebufferObject.h:233
vtkOpenGLFramebufferObject::AddDepthAttachment
void AddDepthAttachment(unsigned int mode)
vtkFrameBufferObjectBase.h
vtkOpenGLFramebufferObject::RestorePreviousBindings
void RestorePreviousBindings(unsigned int mode)
vtkOpenGLFramebufferObject::ReadDepthBuffer
vtkFOInfo * ReadDepthBuffer
Definition: vtkOpenGLFramebufferObject.h:598
vtkOpenGLFramebufferObject::RemoveTexColorAttachment
void RemoveTexColorAttachment(unsigned int mode, unsigned int attId)
Definition: vtkOpenGLFramebufferObject.h:496
vtkOpenGLFramebufferObject::GetBothMode
static unsigned int GetBothMode()
vtkOpenGLFramebufferObject::DownloadColor1
vtkPixelBufferObject * DownloadColor1(int extent[4], int vtkType, int channel)
Download data from the read color attachment of the currently bound FBO into the returned PBO.
vtkOpenGLFramebufferObject::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *win)
Deactivate and UnBind.
vtkX3D::mode
@ mode
Definition: vtkX3D.h:247
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition: vtkOpenGLRenderWindow.h:54
vtkX3D::extent
@ extent
Definition: vtkX3D.h:345
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:88
vtkOpenGLFramebufferObject::GetLastSize
void GetLastSize(int &_arg1, int &_arg2) override
Definition: vtkOpenGLFramebufferObject.h:378
vtkOpenGLFramebufferObject::RestorePreviousBuffers
void RestorePreviousBuffers(unsigned int mode)
vtkOpenGLFramebufferObject::ActiveBuffers
std::vector< unsigned int > ActiveBuffers
Definition: vtkOpenGLFramebufferObject.h:595
vtkOpenGLFramebufferObject::DrawDepthBuffer
vtkFOInfo * DrawDepthBuffer
Definition: vtkOpenGLFramebufferObject.h:597
vtkOpenGLFramebufferObject::GetFrameBufferStatus
static bool GetFrameBufferStatus(unsigned int mode, const char *&desc)
Validate the current FBO configuration (attachments, formats, etc) return false if the FBO is incompl...
vtkOpenGLFramebufferObject::UnBind
void UnBind()
Unbind this buffer.
vtkOpenGLFramebufferObject::GetMaximumNumberOfActiveTargets
unsigned int GetMaximumNumberOfActiveTargets()
Returns the maximum number of targets that can be rendered to at one time.
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkOpenGLFramebufferObject::SaveCurrentBindingsAndBuffers
void SaveCurrentBindingsAndBuffers()
Definition: vtkOpenGLFramebufferObject.h:219
vtkOpenGLFramebufferObject::DisplayFrameBufferAttachments
void DisplayFrameBufferAttachments()
Display all the attachments of the current framebuffer object.
vtkOpenGLFramebufferObject::AttachDepthBuffer
void AttachDepthBuffer(unsigned int mode)
vtkOpenGLVertexArrayObject
The VertexArrayObject class uses, or emulates, vertex array objects.
Definition: vtkOpenGLVertexArrayObject.h:37
vtkOpenGLFramebufferObject::ActivateDrawBuffer
void ActivateDrawBuffer(unsigned int id)
vtkFrameBufferObjectBase::GetLastSize
virtual int * GetLastSize()=0
Dimensions in pixels of the framebuffer.
vtkOpenGLFramebufferObject::GetReadMode
static unsigned int GetReadMode()
vtkPixelBufferObject
abstracts an OpenGL pixel buffer object.
Definition: vtkPixelBufferObject.h:44
vtkWeakPointer< vtkOpenGLRenderWindow >
vtkOpenGLFramebufferObject::DestroyFBO
void DestroyFBO()
vtkOpenGLFramebufferObject::SetColorBuffer
void SetColorBuffer(unsigned int mode, unsigned int index, vtkRenderbuffer *rb)
vtkOpenGLFramebufferObject::AddColorAttachment
void AddColorAttachment(unsigned int mode, unsigned int attId, vtkTextureObject *tex, unsigned int zslice=0, unsigned int format=0, unsigned int mipmapLevel=0)
Directly assign/remove a texture to color attachments.
vtkOpenGLFramebufferObject::AddColorAttachment
void AddColorAttachment(unsigned int mode, unsigned int attId, vtkRenderbuffer *tex)
vtkRenderbuffer
Storage for FBO's.
Definition: vtkRenderbuffer.h:33
vtkOpenGLFramebufferObject::ActivateBuffer
void ActivateBuffer(unsigned int id)
Definition: vtkOpenGLFramebufferObject.h:279
vtkOpenGLFramebufferObject::SaveCurrentBindings
void SaveCurrentBindings()
Store/Restore the current framebuffer bindings and buffers.