VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static 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 vtkFrameBufferObjectBase Superclass
 
- Public Types inherited from vtkFrameBufferObjectBase
typedef vtkObject Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class. More...
 
vtkFrameBufferObject2NewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 
void Bind (unsigned int mode)
 Bind FBO to FRAMEBUFFER, DRAW_FRAMEBUFFER or READ_FRAMEBUFFER The current binding is not saved, nor restored. More...
 
void UnBind (unsigned int mode)
 Bind saved FBO (see SaveCurrentBindings) for DRAW or READ (see glBindFramebuffer) If no bindings were saved bind to default FBO. More...
 
void SaveCurrentBindings ()
 Store the current framebuffer bindings. More...
 
void AddColorAttachment (unsigned int mode, unsigned int attId, vtkTextureObject *tex)
 Directly assign/remove a texture to color attachments. More...
 
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 AddColorAttachment (unsigned int mode, unsigned int attId, vtkRenderbuffer *tex)
 Directly assign/remove a renderbuffer to color attachments. More...
 
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)
 Validate the current FBO configuration (attachments, formats, etc) prints detected errors to vtkErrorMacro. More...
 
vtkPixelBufferObjectDownloadColor1 (int extent[4], int vtkType, int channel)
 Download data from the read color attachment of the currently bound FBO into the retruned PBO. More...
 
vtkPixelBufferObjectDownloadColor3 (int extent[4], int vtkType)
 
vtkPixelBufferObjectDownloadColor4 (int extent[4], int vtkType)
 
vtkPixelBufferObjectDownloadDepth (int extent[4], int vtkType)
 Download data from the depth attachment of the currently bound FBO. More...
 
vtkPixelBufferObjectDownload (int extent[4], int vtkType, int nComps, int oglType, int oglFormat)
 Download data from the read buffer of the current FBO. More...
 
virtual int IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class. More...
 
vtkFrameBufferObject2NewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 
void Bind (unsigned int mode)
 Bind FBO to FRAMEBUFFER, DRAW_FRAMEBUFFER or READ_FRAMEBUFFER The current binding is not saved, nor restored. More...
 
void UnBind (unsigned int mode)
 Bind saved FBO (see SaveCurrentBindings) for DRAW or READ (see glBindFramebuffer) If no bindings were saved bind to default FBO. More...
 
void SaveCurrentBindings ()
 Store the current framebuffer bindings. More...
 
void AddColorAttachment (unsigned int mode, unsigned int attId, vtkTextureObject *tex)
 Directly assign/remove a texture to color attachments. More...
 
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 AddColorAttachment (unsigned int mode, unsigned int attId, vtkRenderbuffer *tex)
 Directly assign/remove a renderbuffer to color attachments. More...
 
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)
 Validate the current FBO configuration (attachments, formats, etc) prints detected errors to vtkErrorMacro. More...
 
vtkPixelBufferObjectDownloadColor1 (int extent[4], int vtkType, int channel)
 Download data from the read color attachment of the currently bound FBO into the retruned PBO. More...
 
vtkPixelBufferObjectDownloadColor3 (int extent[4], int vtkType)
 
vtkPixelBufferObjectDownloadColor4 (int extent[4], int vtkType)
 
vtkPixelBufferObjectDownloadDepth (int extent[4], int vtkType)
 Download data from the depth attachment of the currently bound FBO. More...
 
vtkPixelBufferObjectDownload (int extent[4], int vtkType, int nComps, int oglType, int oglFormat)
 Download data from the read buffer of the current FBO. More...
 
intGetLastSize (bool forceUpdate)
 Additional overload which lets the user decide whether the returned size should be the currently cached value or first be updated from GL. More...
 
void SetContext (vtkRenderWindow *context)
 Get/Set the context. More...
 
vtkRenderWindowGetContext ()
 Get/Set the context. More...
 
void SaveCurrentBuffers ()
 Store the current draw and read buffers. More...
 
void RestorePreviousBuffers (unsigned int mode)
 Store the current draw and read buffers. More...
 
void AddDepthAttachment (unsigned int mode, vtkTextureObject *tex)
 Directly assign/remove a texture/renderbuffer to depth attachments. More...
 
void AddTexDepthAttachment (unsigned int mode, unsigned int handle)
 Directly assign/remove a texture/renderbuffer to depth attachments. More...
 
void RemoveTexDepthAttachment (unsigned int mode)
 Directly assign/remove a texture/renderbuffer to depth attachments. More...
 
void AddDepthAttachment (unsigned int mode, vtkRenderbuffer *tex)
 Directly assign/remove a renderbuffer to depth attachments. More...
 
void AddRenDepthAttachment (unsigned int mode, unsigned int handle)
 Directly assign/remove a renderbuffer to depth attachments. More...
 
void RemoveRenDepthAttachment (unsigned int mode)
 Directly assign/remove a renderbuffer to depth attachments. More...
 
void ActivateDrawBuffer (unsigned int id)
 Select a single specific draw or read buffer (zero based) More...
 
void ActivateReadBuffer (unsigned int id)
 Select a single specific draw or read buffer (zero based) More...
 
void DeactivateReadBuffer ()
 Select a single specific draw or read buffer (zero based) More...
 
void ActivateDrawBuffers (unsigned int n)
 Select n consecutive write attachments. More...
 
void ActivateDrawBuffers (unsigned int *ids, int n)
 Select n consecutive write attachments. More...
 
void DeactivateDrawBuffers ()
 Select n consecutive write attachments. More...
 
void SetContext (vtkRenderWindow *context)
 Get/Set the context. More...
 
vtkRenderWindowGetContext ()
 Get/Set the context. More...
 
void SaveCurrentBuffers ()
 Store the current draw and read buffers. More...
 
void RestorePreviousBuffers (unsigned int mode)
 Store the current draw and read buffers. More...
 
void AddDepthAttachment (unsigned int mode, vtkTextureObject *tex)
 Directly assign/remove a texture/renderbuffer to depth attachments. More...
 
void AddTexDepthAttachment (unsigned int mode, unsigned int handle)
 Directly assign/remove a texture/renderbuffer to depth attachments. More...
 
void RemoveTexDepthAttachment (unsigned int mode)
 Directly assign/remove a texture/renderbuffer to depth attachments. More...
 
void AddDepthAttachment (unsigned int mode, vtkRenderbuffer *tex)
 Directly assign/remove a renderbuffer to depth attachments. More...
 
void AddRenDepthAttachment (unsigned int mode, unsigned int handle)
 Directly assign/remove a renderbuffer to depth attachments. More...
 
void RemoveRenDepthAttachment (unsigned int mode)
 Directly assign/remove a renderbuffer to depth attachments. More...
 
void ActivateDrawBuffer (unsigned int id)
 Select a single specific draw or read buffer (zero based) More...
 
void ActivateReadBuffer (unsigned int id)
 Select a single specific draw or read buffer (zero based) More...
 
void DeactivateReadBuffer ()
 Select a single specific draw or read buffer (zero based) More...
 
void ActivateDrawBuffers (unsigned int n)
 Select n consecutive write attachments. More...
 
void ActivateDrawBuffers (unsigned int *ids, int n)
 Select n consecutive write attachments. More...
 
void DeactivateDrawBuffers ()
 Select n consecutive write attachments. More...
 
virtual intGetLastSize ()
 Dimensions in pixels of the framebuffer. More...
 
virtual void GetLastSize (int &width, int &height)
 Dimensions in pixels of the framebuffer. More...
 
virtual void GetLastSize (int size[2])
 Dimensions in pixels of the framebuffer. More...
 
- Public Member Functions inherited from vtkFrameBufferObjectBase
vtkFrameBufferObjectBaseNewInstance () const
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 Turn debugging output on. More...
 
virtual void DebugOff ()
 Turn debugging output off. More...
 
bool GetDebug ()
 Get the value of the debug flag. More...
 
void SetDebug (bool debugFlag)
 Set the value of the debug flag. More...
 
virtual void Modified ()
 Update the modification time for this object. More...
 
virtual vtkMTimeType GetMTime ()
 Return this object's modified time. More...
 
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)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkCommandGetCommand (unsigned long tag)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObserver (vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
int HasObserver (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
int HasObserver (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Allow user to set the AbortFlagOn() with the return value of the callback method. More...
 
int InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
int InvokeEvent (const char *event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string. More...
 
virtual void Delete ()
 Delete a VTK object. More...
 
virtual void FastDelete ()
 Delete a reference to this object. More...
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream. More...
 
virtual void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object). More...
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object). More...
 
int GetReferenceCount ()
 Return the current reference count of this object. More...
 
void SetReferenceCount (int)
 Sets the reference count. More...
 
void PrintRevisions (ostream &)
 Legacy. More...
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 

Static Public Member Functions

static vtkFrameBufferObject2New ()
 
static int IsTypeOf (const char *type)
 
static vtkFrameBufferObject2SafeDownCast (vtkObjectBase *o)
 
static bool IsSupported (vtkRenderWindow *renWin)
 Returns if the context supports the required extensions. More...
 
static void InitializeViewport (int width, int height)
 Set up ortho viewport with scissor, lighting, blend, and depth disabled. More...
 
static bool GetFrameBufferStatus (unsigned int mode, const char *&desc)
 Validate the current FBO configuration (attachments, formats, etc) return false if the FBO is incomplete. More...
 
static int Blit (int srcExt[4], int destExt[4], unsigned int bits, unsigned int mapping)
 Copy from the currently bound READ FBO to the currently bound DRAW FBO. More...
 
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)
 Returns if the context supports the required extensions. More...
 
static void InitializeViewport (int width, int height)
 Set up ortho viewport with scissor, lighting, blend, and depth disabled. More...
 
static bool GetFrameBufferStatus (unsigned int mode, const char *&desc)
 Validate the current FBO configuration (attachments, formats, etc) return false if the FBO is incomplete. More...
 
static int Blit (int srcExt[4], int destExt[4], unsigned int bits, unsigned int mapping)
 Copy from the currently bound READ FBO to the currently bound DRAW FBO. More...
 
static void Download (int extent[4], int vtkType, int nComps, int oglType, int oglFormat, vtkPixelBufferObject *pbo)
 
- Static Public Member Functions inherited from vtkFrameBufferObjectBase
static int IsTypeOf (const char *type)
 
static vtkFrameBufferObjectBaseSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes. More...
 
static void SetGlobalWarningDisplay (int val)
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOn ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOff ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static int GetGlobalWarningDisplay ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class. More...
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
void CreateFBO ()
 
void DestroyFBO ()
 
int GetOpenGLType (int vtkType)
 Given a vtk type get a compatible open gl type. More...
 
 vtkFrameBufferObject2 ()
 
 ~vtkFrameBufferObject2 ()
 
virtual vtkObjectBaseNewInstanceInternal () const
 
void CreateFBO ()
 
void DestroyFBO ()
 
int GetOpenGLType (int vtkType)
 Given a vtk type get a compatible open gl type. More...
 
 vtkFrameBufferObject2 ()
 
 ~vtkFrameBufferObject2 ()
 
- Protected Member Functions inherited from vtkFrameBufferObjectBase
 vtkFrameBufferObjectBase ()
 
 ~vtkFrameBufferObjectBase ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
 ~vtkObject () override
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 These methods allow a command to exclusively grab all events. More...
 
void InternalReleaseFocus ()
 These methods allow a command to exclusively grab all events. More...
 
- 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)
 Load all necessary extensions. More...
 
static bool LoadRequiredExtensions (vtkRenderWindow *renWin)
 Load all necessary extensions. More...
 

Protected Attributes

vtkWeakPointer< vtkRenderWindowContext
 
unsigned int FBOIndex
 
unsigned int PreviousDrawFBO
 
unsigned int PreviousReadFBO
 
unsigned int DepthBuffer
 
unsigned int PreviousDrawBuffer
 
unsigned int PreviousReadBuffer
 
int LastViewportSize [2]
 
- 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);
See also
vtkRenderbuffer, vtkPixelBufferObject

Definition at line 86 of file vtkFrameBufferObject2.h.

Member Typedef Documentation

Definition at line 90 of file vtkFrameBufferObject2.h.

Definition at line 89 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 vtkFrameBufferObjectBase.

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

Reimplemented from vtkFrameBufferObjectBase.

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 161 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 178 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 187 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 197 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 vtkFrameBufferObjectBase.

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

Reimplemented from vtkFrameBufferObjectBase.

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 160 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 177 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 186 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 196 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
virtual int* vtkFrameBufferObject2::GetLastSize ( )
virtual

Dimensions in pixels of the framebuffer.

Given that InitializeViewport is static, these methods query the viewport size directly from GL. The cached size (LastViewportSize) will appear uninitialized (-1) until one one of these methods has been called. As with InitializeViewport, the methods affect the currently bound FBO (user must bind first).

Implements vtkFrameBufferObjectBase.

virtual void vtkFrameBufferObject2::GetLastSize ( int width,
int height 
)
virtual

Dimensions in pixels of the framebuffer.

Given that InitializeViewport is static, these methods query the viewport size directly from GL. The cached size (LastViewportSize) will appear uninitialized (-1) until one one of these methods has been called. As with InitializeViewport, the methods affect the currently bound FBO (user must bind first).

Implements vtkFrameBufferObjectBase.

virtual void vtkFrameBufferObject2::GetLastSize ( int  size[2])
virtual

Dimensions in pixels of the framebuffer.

Given that InitializeViewport is static, these methods query the viewport size directly from GL. The cached size (LastViewportSize) will appear uninitialized (-1) until one one of these methods has been called. As with InitializeViewport, the methods affect the currently bound FBO (user must bind first).

Implements vtkFrameBufferObjectBase.

int* vtkFrameBufferObject2::GetLastSize ( bool  forceUpdate)

Additional overload which lets the user decide whether the returned size should be the currently cached value or first be updated from GL.

As with InitializeViewport, the method affects the currently bound FBO (user must bind first).

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 348 of file vtkFrameBufferObject2.h.

Member Data Documentation

vtkWeakPointer< vtkRenderWindow > vtkFrameBufferObject2::Context
protected

Definition at line 335 of file vtkFrameBufferObject2.h.

unsigned int vtkFrameBufferObject2::FBOIndex
protected

Definition at line 337 of file vtkFrameBufferObject2.h.

unsigned int vtkFrameBufferObject2::PreviousDrawFBO
protected

Definition at line 338 of file vtkFrameBufferObject2.h.

unsigned int vtkFrameBufferObject2::PreviousReadFBO
protected

Definition at line 339 of file vtkFrameBufferObject2.h.

unsigned int vtkFrameBufferObject2::DepthBuffer
protected

Definition at line 340 of file vtkFrameBufferObject2.h.

unsigned int vtkFrameBufferObject2::PreviousDrawBuffer
protected

Definition at line 341 of file vtkFrameBufferObject2.h.

unsigned int vtkFrameBufferObject2::PreviousReadBuffer
protected

Definition at line 342 of file vtkFrameBufferObject2.h.

int vtkFrameBufferObject2::LastViewportSize[2]
protected

Definition at line 361 of file vtkFrameBufferObject2.h.


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