VTK
|
internal class which encapsulates OpenGL frame buffer object. Not to be used directly. More...
#include <vtkFrameBufferObject.h>
internal class which encapsulates OpenGL frame buffer object. Not to be used directly.
Encapsulates an OpenGL Frame Buffer Object. For use by vtkOpenGLFBORenderWindow, not to be used directly. Use vtkFrameBufferObject2 instead.
Definition at line 46 of file vtkFrameBufferObject.h.
Reimplemented from vtkObject.
Definition at line 50 of file vtkFrameBufferObject.h.
Reimplemented from vtkObject.
Definition at line 53 of file vtkFrameBufferObject.h.
vtkFrameBufferObject::vtkFrameBufferObject | ( | ) | [protected] |
vtkFrameBufferObject::~vtkFrameBufferObject | ( | ) | [protected] |
vtkFrameBufferObject::vtkFrameBufferObject | ( | ) | [protected] |
vtkFrameBufferObject::~vtkFrameBufferObject | ( | ) | [protected] |
static vtkFrameBufferObject* vtkFrameBufferObject::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkObject.
static int vtkFrameBufferObject::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type 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.
virtual int vtkFrameBufferObject::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 vtkFrameBufferObject* vtkFrameBufferObject::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkObject.
virtual vtkObjectBase* vtkFrameBufferObject::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkObject.
Reimplemented from vtkObject.
void vtkFrameBufferObject::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
void vtkFrameBufferObject::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.
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.
bool vtkFrameBufferObject::Start | ( | int | width, |
int | height, | ||
bool | shaderSupportsTextureInt | ||
) |
User must take care that width/height match the dimensions of the user defined texture attachments. This method makes the "active buffers" the buffers that will get drawn into by subsequent drawing calls. Note that this does not clear the render buffers i.e. no glClear() calls are made by either of these methods. It's up to the caller to clear the buffers if needed.
bool vtkFrameBufferObject::StartNonOrtho | ( | int | width, |
int | height, | ||
bool | shaderSupportsTextureInt | ||
) |
User must take care that width/height match the dimensions of the user defined texture attachments. This method makes the "active buffers" the buffers that will get drawn into by subsequent drawing calls. Note that this does not clear the render buffers i.e. no glClear() calls are made by either of these methods. It's up to the caller to clear the buffers if needed.
void vtkFrameBufferObject::RenderQuad | ( | int | minX, |
int | maxX, | ||
int | minY, | ||
int | maxY | ||
) |
Renders a quad at the given location with pixel coordinates. This method is provided as a convenience, since we often render quads in a FBO.
void vtkFrameBufferObject::Bind | ( | ) |
Make the draw frame buffer active (uses FRAMEBUFFER).
void vtkFrameBufferObject::UnBind | ( | ) |
Restore the previous draw framebuffer if saved, else bind the default buffer.
void vtkFrameBufferObject::SetActiveBuffer | ( | unsigned int | index | ) | [inline] |
Choose the buffers to render into.
Definition at line 89 of file vtkFrameBufferObject.h.
void vtkFrameBufferObject::SetActiveBuffers | ( | int | numbuffers, |
unsigned int | indices[] | ||
) |
User provided color buffers are attached by index to color buffers. This command lets you select which attachments are written to. See set color buffer. This call overwrites what the previous list of active buffers.
void vtkFrameBufferObject::SetColorBuffer | ( | unsigned int | index, |
vtkTextureObject * | texture, | ||
unsigned int | zslice = 0 |
||
) |
Insert a color buffer into the list of available color buffers. 0 to NumberOfRenderTargets of these are attached to color attachments by index. See SetActiveBuffers to select them for writing. All user specified texture objects must match the FBO dimensions and must have been created by the time Start() gets called. If texture is a 3D texture, zslice identifies the zslice that will be attached to the color buffer. .SECTION Caveat Currently, 1D textures are not supported.
vtkTextureObject* vtkFrameBufferObject::GetColorBuffer | ( | unsigned int | index | ) |
void vtkFrameBufferObject::RemoveColorBuffer | ( | unsigned int | index | ) |
void vtkFrameBufferObject::SetDepthBuffer | ( | vtkTextureObject * | depthTexture | ) |
Set the texture to use as depth buffer.
Set the texture to use as depth buffer.
virtual void vtkFrameBufferObject::SetDepthBufferNeeded | ( | bool | ) | [virtual] |
If true, the frame buffer object will be initialized with a depth buffer. Initial value is true.
virtual bool vtkFrameBufferObject::GetDepthBufferNeeded | ( | ) | [virtual] |
If true, the frame buffer object will be initialized with a depth buffer. Initial value is true.
void vtkFrameBufferObject::SetNumberOfRenderTargets | ( | unsigned | int | ) |
Set/Get the number of render targets to render into at once. Textures (user supplied or generated internally) are attached to color attachment 0 to NumberOfRenderTargets. You can use SetActiveBuffer to specify which of these are actually written to. If zero then all of the user provided color buffers are used.
virtual unsigned int vtkFrameBufferObject::GetNumberOfRenderTargets | ( | ) | [virtual] |
Set/Get the number of render targets to render into at once. Textures (user supplied or generated internally) are attached to color attachment 0 to NumberOfRenderTargets. You can use SetActiveBuffer to specify which of these are actually written to. If zero then all of the user provided color buffers are used.
unsigned int vtkFrameBufferObject::GetMaximumNumberOfActiveTargets | ( | ) |
Returns the maximum number of targets that can be rendered to at one time. This limits the active targets set by SetActiveTargets(). The return value is valid only if GetContext is non-null.
unsigned int vtkFrameBufferObject::GetMaximumNumberOfRenderTargets | ( | ) |
Returns the maximum number of render targets available. This limits the available attachement points for SetColorAttachment(). The return value is valid only if GetContext is non-null.
virtual int* vtkFrameBufferObject::GetLastSize | ( | ) | [virtual] |
Dimensions in pixels of the framebuffer.
virtual void vtkFrameBufferObject::GetLastSize | ( | int & | , |
int & | |||
) | [virtual] |
Dimensions in pixels of the framebuffer.
virtual void vtkFrameBufferObject::GetLastSize | ( | int | [2] | ) | [virtual] |
Dimensions in pixels of the framebuffer.
static bool vtkFrameBufferObject::IsSupported | ( | vtkRenderWindow * | renWin | ) | [static] |
Returns if the context supports the required extensions. Extension will be loaded when the conetxt is set.
int vtkFrameBufferObject::CheckFrameBufferStatus | ( | unsigned int | mode | ) |
Validate the current FBO configuration (attachments, formats, etc) prints detected errors to vtkErrorMacro.
static bool vtkFrameBufferObject::LoadRequiredExtensions | ( | vtkRenderWindow * | renWin | ) | [static, protected] |
Load all necessary extensions.
void vtkFrameBufferObject::CreateFBO | ( | ) | [protected] |
void vtkFrameBufferObject::DestroyFBO | ( | ) | [protected] |
void vtkFrameBufferObject::CreateDepthBuffer | ( | int | width, |
int | height, | ||
unsigned int | mode | ||
) | [protected] |
void vtkFrameBufferObject::CreateColorBuffers | ( | int | width, |
int | height, | ||
unsigned int | mode, | ||
bool | shaderSupportsTextureInt | ||
) | [protected] |
void vtkFrameBufferObject::DestroyDepthBuffer | ( | ) | [protected] |
void vtkFrameBufferObject::DestroyColorBuffers | ( | ) | [protected] |
void vtkFrameBufferObject::ActivateBuffers | ( | ) | [protected] |
void vtkFrameBufferObject::DisplayFrameBufferAttachments | ( | ) | [protected] |
Display all the attachments of the current framebuffer object.
void vtkFrameBufferObject::DisplayFrameBufferAttachment | ( | unsigned int | uattachment | ) | [protected] |
Display a given attachment for the current framebuffer object.
void vtkFrameBufferObject::DisplayDrawBuffers | ( | ) | [protected] |
Display the draw buffers.
void vtkFrameBufferObject::DisplayReadBuffer | ( | ) | [protected] |
Display the read buffer.
void vtkFrameBufferObject::DisplayBuffer | ( | int | value | ) | [protected] |
Display any buffer (convert value into string).
static vtkFrameBufferObject* vtkFrameBufferObject::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkObject.
static int vtkFrameBufferObject::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type 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.
virtual int vtkFrameBufferObject::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 vtkFrameBufferObject* vtkFrameBufferObject::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkObject.
virtual vtkObjectBase* vtkFrameBufferObject::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkObject.
Reimplemented from vtkObject.
void vtkFrameBufferObject::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
void vtkFrameBufferObject::SetContext | ( | vtkOpenGLRenderWindow * | 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.
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.
bool vtkFrameBufferObject::Start | ( | int | width, |
int | height, | ||
bool | shaderSupportsTextureInt | ||
) |
User must take care that width/height match the dimensions of the user defined texture attachments. This method makes the "active buffers" the buffers that will get drawn into by subsequent drawing calls. Note that this does not clear the render buffers i.e. no glClear() calls are made by either of these methods. It's up to the caller to clear the buffers if needed.
bool vtkFrameBufferObject::StartNonOrtho | ( | int | width, |
int | height, | ||
bool | shaderSupportsTextureInt | ||
) |
User must take care that width/height match the dimensions of the user defined texture attachments. This method makes the "active buffers" the buffers that will get drawn into by subsequent drawing calls. Note that this does not clear the render buffers i.e. no glClear() calls are made by either of these methods. It's up to the caller to clear the buffers if needed.
void vtkFrameBufferObject::RenderQuad | ( | int | minX, |
int | maxX, | ||
int | minY, | ||
int | maxY, | ||
vtkShaderProgram * | program, | ||
vtkgl::VertexArrayObject * | vao | ||
) |
Renders a quad at the given location with pixel coordinates. This method is provided as a convenience, since we often render quads in a FBO.
void vtkFrameBufferObject::Bind | ( | ) |
Make the draw frame buffer active (uses FRAMEBUFFER).
void vtkFrameBufferObject::UnBind | ( | ) |
Restore the previous draw framebuffer if saved, else bind the default buffer.
void vtkFrameBufferObject::SetActiveBuffer | ( | unsigned int | index | ) | [inline] |
Choose the buffers to render into.
Definition at line 95 of file vtkFrameBufferObject.h.
void vtkFrameBufferObject::SetActiveBuffers | ( | int | numbuffers, |
unsigned int | indices[] | ||
) |
User provided color buffers are attached by index to color buffers. This command lets you select which attachments are written to. See set color buffer. This call overwrites what the previous list of active buffers.
void vtkFrameBufferObject::SetColorBuffer | ( | unsigned int | index, |
vtkTextureObject * | texture, | ||
unsigned int | zslice = 0 |
||
) |
Insert a color buffer into the list of available color buffers. 0 to NumberOfRenderTargets of these are attached to color attachments by index. See SetActiveBuffers to select them for writing. All user specified texture objects must match the FBO dimensions and must have been created by the time Start() gets called. If texture is a 3D texture, zslice identifies the zslice that will be attached to the color buffer. .SECTION Caveat Currently, 1D textures are not supported.
vtkTextureObject* vtkFrameBufferObject::GetColorBuffer | ( | unsigned int | index | ) |
void vtkFrameBufferObject::RemoveColorBuffer | ( | unsigned int | index | ) |
void vtkFrameBufferObject::SetDepthBuffer | ( | vtkTextureObject * | depthTexture | ) |
Set the texture to use as depth buffer.
Set the texture to use as depth buffer.
virtual void vtkFrameBufferObject::SetDepthBufferNeeded | ( | bool | ) | [virtual] |
If true, the frame buffer object will be initialized with a depth buffer. Initial value is true.
virtual bool vtkFrameBufferObject::GetDepthBufferNeeded | ( | ) | [virtual] |
If true, the frame buffer object will be initialized with a depth buffer. Initial value is true.
void vtkFrameBufferObject::SetNumberOfRenderTargets | ( | unsigned | int | ) |
Set/Get the number of render targets to render into at once. Textures (user supplied or generated internally) are attached to color attachment 0 to NumberOfRenderTargets. You can use SetActiveBuffer to specify which of these are actually written to. If zero then all of the user provided color buffers are used.
virtual unsigned int vtkFrameBufferObject::GetNumberOfRenderTargets | ( | ) | [virtual] |
Set/Get the number of render targets to render into at once. Textures (user supplied or generated internally) are attached to color attachment 0 to NumberOfRenderTargets. You can use SetActiveBuffer to specify which of these are actually written to. If zero then all of the user provided color buffers are used.
unsigned int vtkFrameBufferObject::GetMaximumNumberOfActiveTargets | ( | ) |
Returns the maximum number of targets that can be rendered to at one time. This limits the active targets set by SetActiveTargets(). The return value is valid only if GetContext is non-null.
unsigned int vtkFrameBufferObject::GetMaximumNumberOfRenderTargets | ( | ) |
Returns the maximum number of render targets available. This limits the available attachement points for SetColorAttachment(). The return value is valid only if GetContext is non-null.
virtual int* vtkFrameBufferObject::GetLastSize | ( | ) | [virtual] |
Dimensions in pixels of the framebuffer.
virtual void vtkFrameBufferObject::GetLastSize | ( | int & | , |
int & | |||
) | [virtual] |
Dimensions in pixels of the framebuffer.
virtual void vtkFrameBufferObject::GetLastSize | ( | int | [2] | ) | [virtual] |
Dimensions in pixels of the framebuffer.
static bool vtkFrameBufferObject::IsSupported | ( | vtkOpenGLRenderWindow * | renWin | ) | [static] |
Returns if the context supports the required extensions. Extension will be loaded when the conetxt is set.
int vtkFrameBufferObject::CheckFrameBufferStatus | ( | unsigned int | mode | ) |
Validate the current FBO configuration (attachments, formats, etc) prints detected errors to vtkErrorMacro.
static bool vtkFrameBufferObject::LoadRequiredExtensions | ( | vtkOpenGLRenderWindow * | renWin | ) | [static, protected] |
Load all necessary extensions.
void vtkFrameBufferObject::CreateFBO | ( | ) | [protected] |
void vtkFrameBufferObject::DestroyFBO | ( | ) | [protected] |
void vtkFrameBufferObject::CreateDepthBuffer | ( | int | width, |
int | height, | ||
unsigned int | mode | ||
) | [protected] |
void vtkFrameBufferObject::CreateColorBuffers | ( | int | width, |
int | height, | ||
unsigned int | mode, | ||
bool | shaderSupportsTextureInt | ||
) | [protected] |
void vtkFrameBufferObject::DestroyDepthBuffer | ( | ) | [protected] |
void vtkFrameBufferObject::DestroyColorBuffers | ( | ) | [protected] |
void vtkFrameBufferObject::ActivateBuffers | ( | ) | [protected] |
void vtkFrameBufferObject::DisplayFrameBufferAttachments | ( | ) | [protected] |
Display all the attachments of the current framebuffer object.
void vtkFrameBufferObject::DisplayFrameBufferAttachment | ( | unsigned int | uattachment | ) | [protected] |
Display a given attachment for the current framebuffer object.
void vtkFrameBufferObject::DisplayDrawBuffers | ( | ) | [protected] |
Display the draw buffers.
void vtkFrameBufferObject::DisplayReadBuffer | ( | ) | [protected] |
Display the read buffer.
void vtkFrameBufferObject::DisplayBuffer | ( | int | value | ) | [protected] |
Display any buffer (convert value into string).
vtkWeakPointer<vtkRenderWindow> vtkFrameBufferObject::Context [protected] |
Definition at line 220 of file vtkFrameBufferObject.h.
bool vtkFrameBufferObject::DepthBufferNeeded [protected] |
Definition at line 222 of file vtkFrameBufferObject.h.
bool vtkFrameBufferObject::ColorBuffersDirty [protected] |
Definition at line 223 of file vtkFrameBufferObject.h.
unsigned int vtkFrameBufferObject::FBOIndex [protected] |
Definition at line 224 of file vtkFrameBufferObject.h.
int vtkFrameBufferObject::PreviousFBOIndex [protected] |
Definition at line 225 of file vtkFrameBufferObject.h.
unsigned int vtkFrameBufferObject::DepthBuffer [protected] |
Definition at line 226 of file vtkFrameBufferObject.h.
unsigned int vtkFrameBufferObject::NumberOfRenderTargets [protected] |
Definition at line 227 of file vtkFrameBufferObject.h.
int vtkFrameBufferObject::LastSize [protected] |
Definition at line 228 of file vtkFrameBufferObject.h.
std::vector< unsigned int > vtkFrameBufferObject::UserZSlices [protected] |
Definition at line 229 of file vtkFrameBufferObject.h.
std::vector< vtkSmartPointer< vtkTextureObject > > vtkFrameBufferObject::UserColorBuffers [protected] |
Definition at line 230 of file vtkFrameBufferObject.h.
std::vector< vtkSmartPointer< vtkTextureObject > > vtkFrameBufferObject::ColorBuffers [protected] |
Definition at line 231 of file vtkFrameBufferObject.h.
std::vector< unsigned int > vtkFrameBufferObject::ActiveBuffers [protected] |
Definition at line 232 of file vtkFrameBufferObject.h.
vtkSmartPointer< vtkTextureObject > vtkFrameBufferObject::UserDepthBuffer [protected] |
Definition at line 233 of file vtkFrameBufferObject.h.
bool vtkFrameBufferObject::DepthBufferDirty [protected] |
Definition at line 234 of file vtkFrameBufferObject.h.
Definition at line 225 of file vtkFrameBufferObject.h.