VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
vtkFrameBufferObject2 Class Reference

Interface to OpenGL framebuffer object. More...

#include <vtkFrameBufferObject2.h>

Inheritance diagram for vtkFrameBufferObject2:
[legend]
Collaboration diagram for vtkFrameBufferObject2:
[legend]

Public Types

typedef vtkObject Superclass
 
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkFrameBufferObject2NewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
void Bind (unsigned int mode)
 
void UnBind (unsigned int mode)
 
void SaveCurrentBindings ()
 
void AddTexColorAttachment (unsigned int mode, unsigned int attId, unsigned int handle)
 
void RemoveTexColorAttachments (unsigned int mode, unsigned int num)
 
void RemoveTexColorAttachment (unsigned int mode, unsigned int attId)
 
void AddRenColorAttachment (unsigned int mode, unsigned int attId, unsigned int handle)
 
void RemoveRenColorAttachments (unsigned int mode, unsigned int num)
 
void RemoveRenColorAttachment (unsigned int mode, unsigned int attId)
 
int CheckFrameBufferStatus (unsigned int mode)
 
vtkPixelBufferObjectDownloadColor3 (int extent[4], int vtkType)
 
vtkPixelBufferObjectDownloadColor4 (int extent[4], int vtkType)
 
virtual int IsA (const char *type)
 
vtkFrameBufferObject2NewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
void Bind (unsigned int mode)
 
void UnBind (unsigned int mode)
 
void SaveCurrentBindings ()
 
void AddTexColorAttachment (unsigned int mode, unsigned int attId, unsigned int handle)
 
void RemoveTexColorAttachments (unsigned int mode, unsigned int num)
 
void RemoveTexColorAttachment (unsigned int mode, unsigned int attId)
 
void AddRenColorAttachment (unsigned int mode, unsigned int attId, unsigned int handle)
 
void RemoveRenColorAttachments (unsigned int mode, unsigned int num)
 
void RemoveRenColorAttachment (unsigned int mode, unsigned int attId)
 
int CheckFrameBufferStatus (unsigned int mode)
 
vtkPixelBufferObjectDownloadColor3 (int extent[4], int vtkType)
 
vtkPixelBufferObjectDownloadColor4 (int extent[4], int vtkType)
 
void SetContext (vtkRenderWindow *context)
 
vtkRenderWindowGetContext ()
 
void SaveCurrentBuffers ()
 
void RestorePreviousBuffers (unsigned int mode)
 
void AddColorAttachment (unsigned int mode, unsigned int attId, vtkTextureObject *tex)
 
void AddColorAttachment (unsigned int mode, unsigned int attId, vtkRenderbuffer *tex)
 
void AddDepthAttachment (unsigned int mode, vtkTextureObject *tex)
 
void AddTexDepthAttachment (unsigned int mode, unsigned int handle)
 
void RemoveTexDepthAttachment (unsigned int mode)
 
void AddDepthAttachment (unsigned int mode, vtkRenderbuffer *tex)
 
void AddRenDepthAttachment (unsigned int mode, unsigned int handle)
 
void RemoveRenDepthAttachment (unsigned int mode)
 
void ActivateDrawBuffer (unsigned int id)
 
void ActivateReadBuffer (unsigned int id)
 
void DeactivateReadBuffer ()
 
void ActivateDrawBuffers (unsigned int n)
 
void ActivateDrawBuffers (unsigned int *ids, int n)
 
void DeactivateDrawBuffers ()
 
vtkPixelBufferObjectDownloadColor1 (int extent[4], int vtkType, int channel)
 
vtkPixelBufferObjectDownloadDepth (int extent[4], int vtkType)
 
vtkPixelBufferObjectDownload (int extent[4], int vtkType, int nComps, int oglType, int oglFormat)
 
void SetContext (vtkRenderWindow *context)
 
vtkRenderWindowGetContext ()
 
void SaveCurrentBuffers ()
 
void RestorePreviousBuffers (unsigned int mode)
 
void AddColorAttachment (unsigned int mode, unsigned int attId, vtkTextureObject *tex)
 
void AddColorAttachment (unsigned int mode, unsigned int attId, vtkRenderbuffer *tex)
 
void AddDepthAttachment (unsigned int mode, vtkTextureObject *tex)
 
void AddTexDepthAttachment (unsigned int mode, unsigned int handle)
 
void RemoveTexDepthAttachment (unsigned int mode)
 
void AddDepthAttachment (unsigned int mode, vtkRenderbuffer *tex)
 
void AddRenDepthAttachment (unsigned int mode, unsigned int handle)
 
void RemoveRenDepthAttachment (unsigned int mode)
 
void ActivateDrawBuffer (unsigned int id)
 
void ActivateReadBuffer (unsigned int id)
 
void DeactivateReadBuffer ()
 
void ActivateDrawBuffers (unsigned int n)
 
void ActivateDrawBuffers (unsigned int *ids, int n)
 
void DeactivateDrawBuffers ()
 
vtkPixelBufferObjectDownloadColor1 (int extent[4], int vtkType, int channel)
 
vtkPixelBufferObjectDownloadDepth (int extent[4], int vtkType)
 
vtkPixelBufferObjectDownload (int extent[4], int vtkType, int nComps, int oglType, int oglFormat)
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static vtkFrameBufferObject2New ()
 
static int IsTypeOf (const char *type)
 
static vtkFrameBufferObject2SafeDownCast (vtkObjectBase *o)
 
static bool IsSupported (vtkRenderWindow *renWin)
 
static void Download (int extent[4], int vtkType, int nComps, int oglType, int oglFormat, vtkPixelBufferObject *pbo)
 
static vtkFrameBufferObject2New ()
 
static int IsTypeOf (const char *type)
 
static vtkFrameBufferObject2SafeDownCast (vtkObjectBase *o)
 
static bool IsSupported (vtkRenderWindow *renWin)
 
static void Download (int extent[4], int vtkType, int nComps, int oglType, int oglFormat, vtkPixelBufferObject *pbo)
 
static void InitializeViewport (int width, int height)
 
static bool GetFrameBufferStatus (unsigned int mode, const char *&desc)
 
static int Blit (int srcExt[4], int destExt[4], unsigned int bits, unsigned int mapping)
 
static void InitializeViewport (int width, int height)
 
static bool GetFrameBufferStatus (unsigned int mode, const char *&desc)
 
static int Blit (int srcExt[4], int destExt[4], unsigned int bits, unsigned int mapping)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
void CreateFBO ()
 
void DestroyFBO ()
 
int GetOpenGLType (int vtkType)
 
 vtkFrameBufferObject2 ()
 
 ~vtkFrameBufferObject2 ()
 
virtual vtkObjectBaseNewInstanceInternal () const
 
void CreateFBO ()
 
void DestroyFBO ()
 
int GetOpenGLType (int vtkType)
 
 vtkFrameBufferObject2 ()
 
 ~vtkFrameBufferObject2 ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Static Protected Member Functions

static bool LoadRequiredExtensions (vtkRenderWindow *renWin)
 
static bool LoadRequiredExtensions (vtkRenderWindow *renWin)
 

Protected Attributes

vtkWeakPointer< vtkRenderWindowContext
 
unsigned int FBOIndex
 
unsigned int PreviousDrawFBO
 
unsigned int PreviousReadFBO
 
unsigned int DepthBuffer
 
unsigned int PreviousDrawBuffer
 
unsigned int PreviousReadBuffer
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Friends

class vtkRenderbuffer
 

Detailed Description

Interface to OpenGL framebuffer object.

A light and efficient interface to an OpenGL Frame Buffer Object. Use is very simillalry to directly calling OpenGL, but as vtkObject it may safely stored, shared, or passed around. It supports FBO Blit and transfer to Pixel Buffer Object.

Typical use case:

vtkFrameBufferObject2 *fbo = this->Internals->FBO;
fbo->Bind(vtkgl::FRAMEBUFFER_EXT);
fbo->AddDepthAttachment(vtkgl::DRAW_FRAMEBUFFER_EXT, depthBuffer);
fbo->AddColorAttachment(vtkgl::DRAW_FRAMEBUFFER_EXT, 0U, colorTex1);
fbo->AddColorAttachment(vtkgl::DRAW_FRAMEBUFFER_EXT, 1U, colorTex2);
fbo->AddColorAttachment(vtkgl::DRAW_FRAMEBUFFER_EXT, 2U, colorTex3);
vtkCheckFrameBufferStatusMacro(vtkgl::FRAMEBUFFER_EXT);
...
fbo->UnBind(vtkgl::FRAMEBUFFER_EXT);
@sa

vtkRenderbuffer, vtkPixelBufferObject

Definition at line 85 of file vtkFrameBufferObject2.h.

Member Typedef Documentation

Definition at line 89 of file vtkFrameBufferObject2.h.

Definition at line 88 of file vtkFrameBufferObject2.h.

Constructor & Destructor Documentation

vtkFrameBufferObject2::vtkFrameBufferObject2 ( )
protected
vtkFrameBufferObject2::~vtkFrameBufferObject2 ( )
protected
vtkFrameBufferObject2::vtkFrameBufferObject2 ( )
protected
vtkFrameBufferObject2::~vtkFrameBufferObject2 ( )
protected

Member Function Documentation

static vtkFrameBufferObject2* vtkFrameBufferObject2::New ( )
static
static int vtkFrameBufferObject2::IsTypeOf ( const char *  type)
static
virtual int vtkFrameBufferObject2::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

static vtkFrameBufferObject2* vtkFrameBufferObject2::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkFrameBufferObject2::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkObject.

vtkFrameBufferObject2* vtkFrameBufferObject2::NewInstance ( ) const
void vtkFrameBufferObject2::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

void vtkFrameBufferObject2::SetContext ( vtkRenderWindow context)

Get/Set the context. Context must be a vtkOpenGLRenderWindow. This does not increase the reference count of the context to avoid reference loops. SetContext() may raise an error is the OpenGL context does not support the required OpenGL extensions.

vtkRenderWindow* vtkFrameBufferObject2::GetContext ( )

Get/Set the context. Context must be a vtkOpenGLRenderWindow. This does not increase the reference count of the context to avoid reference loops. SetContext() may raise an error is the OpenGL context does not support the required OpenGL extensions.

static bool vtkFrameBufferObject2::IsSupported ( vtkRenderWindow renWin)
static

Returns if the context supports the required extensions. Extension will be loaded when the conetxt is set.

void vtkFrameBufferObject2::Bind ( unsigned int  mode)

Bind FBO to FRAMEBUFFER, DRAW_FRAMEBUFFER or READ_FRAMEBUFFER The current binding is not saved, nor restored. (see glBindFramebuffer) This method can be used to prepare for FBO Blit or buffer ping-pong. Low level api.

void vtkFrameBufferObject2::UnBind ( unsigned int  mode)

Bind saved FBO (see SaveCurrentBindings) for DRAW or READ (see glBindFramebuffer) If no bindings were saved bind to default FBO. Low level api.

void vtkFrameBufferObject2::SaveCurrentBindings ( )

Store the current framebuffer bindings. If this method is called then UnBind will restore the saved value accoring to its mode (DRAW_FRAMEBUFFER,READ_FRAMEBUFFER,FRAMEBUFFER) Restoration occurs in UnBind. Low level api

void vtkFrameBufferObject2::SaveCurrentBuffers ( )

Store the current draw and read buffers. When restored only the buffers matching mode are modified. DRAW_FRAMEBUFFER -> glDrawBuffer READ_FRAMEBUFFER -> glReadBuffer FRAMEBUFFER -> both

void vtkFrameBufferObject2::RestorePreviousBuffers ( unsigned int  mode)

Store the current draw and read buffers. When restored only the buffers matching mode are modified. DRAW_FRAMEBUFFER -> glDrawBuffer READ_FRAMEBUFFER -> glReadBuffer FRAMEBUFFER -> both

void vtkFrameBufferObject2::AddColorAttachment ( unsigned int  mode,
unsigned int  attId,
vtkTextureObject tex 
)

Directly assign/remove a texture to color attachments.

void vtkFrameBufferObject2::AddTexColorAttachment ( unsigned int  mode,
unsigned int  attId,
unsigned int  handle 
)
void vtkFrameBufferObject2::RemoveTexColorAttachments ( unsigned int  mode,
unsigned int  num 
)
void vtkFrameBufferObject2::RemoveTexColorAttachment ( unsigned int  mode,
unsigned int  attId 
)
inline

Definition at line 144 of file vtkFrameBufferObject2.h.

void vtkFrameBufferObject2::AddColorAttachment ( unsigned int  mode,
unsigned int  attId,
vtkRenderbuffer tex 
)

Directly assign/remove a renderbuffer to color attachments.

void vtkFrameBufferObject2::AddRenColorAttachment ( unsigned int  mode,
unsigned int  attId,
unsigned int  handle 
)
void vtkFrameBufferObject2::RemoveRenColorAttachments ( unsigned int  mode,
unsigned int  num 
)
void vtkFrameBufferObject2::RemoveRenColorAttachment ( unsigned int  mode,
unsigned int  attId 
)
inline

Definition at line 161 of file vtkFrameBufferObject2.h.

void vtkFrameBufferObject2::AddDepthAttachment ( unsigned int  mode,
vtkTextureObject tex 
)

Directly assign/remove a texture/renderbuffer to depth attachments.

void vtkFrameBufferObject2::AddTexDepthAttachment ( unsigned int  mode,
unsigned int  handle 
)

Directly assign/remove a texture/renderbuffer to depth attachments.

void vtkFrameBufferObject2::RemoveTexDepthAttachment ( unsigned int  mode)
inline

Directly assign/remove a texture/renderbuffer to depth attachments.

Definition at line 168 of file vtkFrameBufferObject2.h.

void vtkFrameBufferObject2::AddDepthAttachment ( unsigned int  mode,
vtkRenderbuffer tex 
)

Directly assign/remove a renderbuffer to depth attachments.

void vtkFrameBufferObject2::AddRenDepthAttachment ( unsigned int  mode,
unsigned int  handle 
)

Directly assign/remove a renderbuffer to depth attachments.

void vtkFrameBufferObject2::RemoveRenDepthAttachment ( unsigned int  mode)
inline

Directly assign/remove a renderbuffer to depth attachments.

Definition at line 176 of file vtkFrameBufferObject2.h.

void vtkFrameBufferObject2::ActivateDrawBuffer ( unsigned int  id)

Select a single specific draw or read buffer (zero based)

void vtkFrameBufferObject2::ActivateReadBuffer ( unsigned int  id)

Select a single specific draw or read buffer (zero based)

void vtkFrameBufferObject2::DeactivateReadBuffer ( )

Select a single specific draw or read buffer (zero based)

void vtkFrameBufferObject2::ActivateDrawBuffers ( unsigned int  n)

Select n consecutive write attachments. Low level api.

void vtkFrameBufferObject2::ActivateDrawBuffers ( unsigned int ids,
int  n 
)

Select n consecutive write attachments. Low level api.

void vtkFrameBufferObject2::DeactivateDrawBuffers ( )

Select n consecutive write attachments. Low level api.

static void vtkFrameBufferObject2::InitializeViewport ( int  width,
int  height 
)
static

Set up ortho viewport with scissor, lighting, blend, and depth disabled. The method affects the current bound FBO. The method is static so that it may be used on the default FBO without an instance. Low level api.

int vtkFrameBufferObject2::CheckFrameBufferStatus ( unsigned int  mode)

Validate the current FBO configuration (attachments, formats, etc) prints detected errors to vtkErrorMacro. Low level api.

static bool vtkFrameBufferObject2::GetFrameBufferStatus ( unsigned int  mode,
const char *&  desc 
)
static

Validate the current FBO configuration (attachments, formats, etc) return false if the FBO is incomplete. Assigns description a literal containing a description of the status. Low level api.

static int vtkFrameBufferObject2::Blit ( int  srcExt[4],
int  destExt[4],
unsigned int  bits,
unsigned int  mapping 
)
static

Copy from the currently bound READ FBO to the currently bound DRAW FBO. The method is static so that one doesn't need to ccreate an instance when transfering between attachments in the default FBO.

vtkPixelBufferObject* vtkFrameBufferObject2::DownloadColor1 ( int  extent[4],
int  vtkType,
int  channel 
)

Download data from the read color attachment of the currently bound FBO into the retruned PBO. The PBO must be free'd when you are finished with it. The number of components in the PBO is the same as in the name of the specific download fucntion. When downloading a single color channel, the channel must be identified by index, 1->red, 2->green, 3-> blue.

vtkPixelBufferObject* vtkFrameBufferObject2::DownloadColor3 ( int  extent[4],
int  vtkType 
)
vtkPixelBufferObject* vtkFrameBufferObject2::DownloadColor4 ( int  extent[4],
int  vtkType 
)
vtkPixelBufferObject* vtkFrameBufferObject2::DownloadDepth ( int  extent[4],
int  vtkType 
)

Download data from the depth attachment of the currently bound FBO. The returned PBO must be Delete'd by the caller. The retruned PBO has one component.

vtkPixelBufferObject* vtkFrameBufferObject2::Download ( int  extent[4],
int  vtkType,
int  nComps,
int  oglType,
int  oglFormat 
)

Download data from the read buffer of the current FBO. These are low level meothds. In the static variant a PBO must be passed in since we don't have access to a context. The static method is provided so that one may download from the default FBO.

static void vtkFrameBufferObject2::Download ( int  extent[4],
int  vtkType,
int  nComps,
int  oglType,
int  oglFormat,
vtkPixelBufferObject pbo 
)
static
static bool vtkFrameBufferObject2::LoadRequiredExtensions ( vtkRenderWindow renWin)
staticprotected

Load all necessary extensions.

void vtkFrameBufferObject2::CreateFBO ( )
protected
void vtkFrameBufferObject2::DestroyFBO ( )
protected
int vtkFrameBufferObject2::GetOpenGLType ( int  vtkType)
protected

Given a vtk type get a compatible open gl type.

static vtkFrameBufferObject2* vtkFrameBufferObject2::New ( )
static
static int vtkFrameBufferObject2::IsTypeOf ( const char *  type)
static
virtual int vtkFrameBufferObject2::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObject.

static vtkFrameBufferObject2* vtkFrameBufferObject2::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkFrameBufferObject2::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkObject.

vtkFrameBufferObject2* vtkFrameBufferObject2::NewInstance ( ) const
void vtkFrameBufferObject2::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

void vtkFrameBufferObject2::SetContext ( vtkRenderWindow context)

Get/Set the context. Context must be a vtkOpenGLRenderWindow. This does not increase the reference count of the context to avoid reference loops. SetContext() may raise an error is the OpenGL context does not support the required OpenGL extensions.

vtkRenderWindow* vtkFrameBufferObject2::GetContext ( )

Get/Set the context. Context must be a vtkOpenGLRenderWindow. This does not increase the reference count of the context to avoid reference loops. SetContext() may raise an error is the OpenGL context does not support the required OpenGL extensions.

static bool vtkFrameBufferObject2::IsSupported ( vtkRenderWindow renWin)
static

Returns if the context supports the required extensions. Extension will be loaded when the conetxt is set.

void vtkFrameBufferObject2::Bind ( unsigned int  mode)

Bind FBO to FRAMEBUFFER, DRAW_FRAMEBUFFER or READ_FRAMEBUFFER The current binding is not saved, nor restored. (see glBindFramebuffer) This method can be used to prepare for FBO Blit or buffer ping-pong. Low level api.

void vtkFrameBufferObject2::UnBind ( unsigned int  mode)

Bind saved FBO (see SaveCurrentBindings) for DRAW or READ (see glBindFramebuffer) If no bindings were saved bind to default FBO. Low level api.

void vtkFrameBufferObject2::SaveCurrentBindings ( )

Store the current framebuffer bindings. If this method is called then UnBind will restore the saved value accoring to its mode (DRAW_FRAMEBUFFER,READ_FRAMEBUFFER,FRAMEBUFFER) Restoration occurs in UnBind. Low level api

void vtkFrameBufferObject2::SaveCurrentBuffers ( )

Store the current draw and read buffers. When restored only the buffers matching mode are modified. DRAW_FRAMEBUFFER -> glDrawBuffer READ_FRAMEBUFFER -> glReadBuffer FRAMEBUFFER -> both

void vtkFrameBufferObject2::RestorePreviousBuffers ( unsigned int  mode)

Store the current draw and read buffers. When restored only the buffers matching mode are modified. DRAW_FRAMEBUFFER -> glDrawBuffer READ_FRAMEBUFFER -> glReadBuffer FRAMEBUFFER -> both

void vtkFrameBufferObject2::AddColorAttachment ( unsigned int  mode,
unsigned int  attId,
vtkTextureObject tex 
)

Directly assign/remove a texture to color attachments.

void vtkFrameBufferObject2::AddTexColorAttachment ( unsigned int  mode,
unsigned int  attId,
unsigned int  handle 
)
void vtkFrameBufferObject2::RemoveTexColorAttachments ( unsigned int  mode,
unsigned int  num 
)
void vtkFrameBufferObject2::RemoveTexColorAttachment ( unsigned int  mode,
unsigned int  attId 
)
inline

Definition at line 143 of file vtkFrameBufferObject2.h.

void vtkFrameBufferObject2::AddColorAttachment ( unsigned int  mode,
unsigned int  attId,
vtkRenderbuffer tex 
)

Directly assign/remove a renderbuffer to color attachments.

void vtkFrameBufferObject2::AddRenColorAttachment ( unsigned int  mode,
unsigned int  attId,
unsigned int  handle 
)
void vtkFrameBufferObject2::RemoveRenColorAttachments ( unsigned int  mode,
unsigned int  num 
)
void vtkFrameBufferObject2::RemoveRenColorAttachment ( unsigned int  mode,
unsigned int  attId 
)
inline

Definition at line 160 of file vtkFrameBufferObject2.h.

void vtkFrameBufferObject2::AddDepthAttachment ( unsigned int  mode,
vtkTextureObject tex 
)

Directly assign/remove a texture/renderbuffer to depth attachments.

void vtkFrameBufferObject2::AddTexDepthAttachment ( unsigned int  mode,
unsigned int  handle 
)

Directly assign/remove a texture/renderbuffer to depth attachments.

void vtkFrameBufferObject2::RemoveTexDepthAttachment ( unsigned int  mode)
inline

Directly assign/remove a texture/renderbuffer to depth attachments.

Definition at line 167 of file vtkFrameBufferObject2.h.

void vtkFrameBufferObject2::AddDepthAttachment ( unsigned int  mode,
vtkRenderbuffer tex 
)

Directly assign/remove a renderbuffer to depth attachments.

void vtkFrameBufferObject2::AddRenDepthAttachment ( unsigned int  mode,
unsigned int  handle 
)

Directly assign/remove a renderbuffer to depth attachments.

void vtkFrameBufferObject2::RemoveRenDepthAttachment ( unsigned int  mode)
inline

Directly assign/remove a renderbuffer to depth attachments.

Definition at line 175 of file vtkFrameBufferObject2.h.

void vtkFrameBufferObject2::ActivateDrawBuffer ( unsigned int  id)

Select a single specific draw or read buffer (zero based)

void vtkFrameBufferObject2::ActivateReadBuffer ( unsigned int  id)

Select a single specific draw or read buffer (zero based)

void vtkFrameBufferObject2::DeactivateReadBuffer ( )

Select a single specific draw or read buffer (zero based)

void vtkFrameBufferObject2::ActivateDrawBuffers ( unsigned int  n)

Select n consecutive write attachments. Low level api.

void vtkFrameBufferObject2::ActivateDrawBuffers ( unsigned int ids,
int  n 
)

Select n consecutive write attachments. Low level api.

void vtkFrameBufferObject2::DeactivateDrawBuffers ( )

Select n consecutive write attachments. Low level api.

static void vtkFrameBufferObject2::InitializeViewport ( int  width,
int  height 
)
static

Set up ortho viewport with scissor, lighting, blend, and depth disabled. The method affects the current bound FBO. The method is static so that it may be used on the default FBO without an instance. Low level api.

int vtkFrameBufferObject2::CheckFrameBufferStatus ( unsigned int  mode)

Validate the current FBO configuration (attachments, formats, etc) prints detected errors to vtkErrorMacro. Low level api.

static bool vtkFrameBufferObject2::GetFrameBufferStatus ( unsigned int  mode,
const char *&  desc 
)
static

Validate the current FBO configuration (attachments, formats, etc) return false if the FBO is incomplete. Assigns description a literal containing a description of the status. Low level api.

static int vtkFrameBufferObject2::Blit ( int  srcExt[4],
int  destExt[4],
unsigned int  bits,
unsigned int  mapping 
)
static

Copy from the currently bound READ FBO to the currently bound DRAW FBO. The method is static so that one doesn't need to ccreate an instance when transfering between attachments in the default FBO.

vtkPixelBufferObject* vtkFrameBufferObject2::DownloadColor1 ( int  extent[4],
int  vtkType,
int  channel 
)

Download data from the read color attachment of the currently bound FBO into the retruned PBO. The PBO must be free'd when you are finished with it. The number of components in the PBO is the same as in the name of the specific download fucntion. When downloading a single color channel, the channel must be identified by index, 1->red, 2->green, 3-> blue.

vtkPixelBufferObject* vtkFrameBufferObject2::DownloadColor3 ( int  extent[4],
int  vtkType 
)
vtkPixelBufferObject* vtkFrameBufferObject2::DownloadColor4 ( int  extent[4],
int  vtkType 
)
vtkPixelBufferObject* vtkFrameBufferObject2::DownloadDepth ( int  extent[4],
int  vtkType 
)

Download data from the depth attachment of the currently bound FBO. The returned PBO must be Delete'd by the caller. The retruned PBO has one component.

vtkPixelBufferObject* vtkFrameBufferObject2::Download ( int  extent[4],
int  vtkType,
int  nComps,
int  oglType,
int  oglFormat 
)

Download data from the read buffer of the current FBO. These are low level meothds. In the static variant a PBO must be passed in since we don't have access to a context. The static method is provided so that one may download from the default FBO.

static void vtkFrameBufferObject2::Download ( int  extent[4],
int  vtkType,
int  nComps,
int  oglType,
int  oglFormat,
vtkPixelBufferObject pbo 
)
static
static bool vtkFrameBufferObject2::LoadRequiredExtensions ( vtkRenderWindow renWin)
staticprotected

Load all necessary extensions.

void vtkFrameBufferObject2::CreateFBO ( )
protected
void vtkFrameBufferObject2::DestroyFBO ( )
protected
int vtkFrameBufferObject2::GetOpenGLType ( int  vtkType)
protected

Given a vtk type get a compatible open gl type.

Friends And Related Function Documentation

Definition at line 315 of file vtkFrameBufferObject2.h.

Member Data Documentation

vtkWeakPointer< vtkRenderWindow > vtkFrameBufferObject2::Context
protected

Definition at line 302 of file vtkFrameBufferObject2.h.

unsigned int vtkFrameBufferObject2::FBOIndex
protected

Definition at line 304 of file vtkFrameBufferObject2.h.

unsigned int vtkFrameBufferObject2::PreviousDrawFBO
protected

Definition at line 305 of file vtkFrameBufferObject2.h.

unsigned int vtkFrameBufferObject2::PreviousReadFBO
protected

Definition at line 306 of file vtkFrameBufferObject2.h.

unsigned int vtkFrameBufferObject2::DepthBuffer
protected

Definition at line 307 of file vtkFrameBufferObject2.h.

unsigned int vtkFrameBufferObject2::PreviousDrawBuffer
protected

Definition at line 308 of file vtkFrameBufferObject2.h.

unsigned int vtkFrameBufferObject2::PreviousReadBuffer
protected

Definition at line 309 of file vtkFrameBufferObject2.h.


The documentation for this class was generated from the following file: