Go to the documentation of this file.
29 #ifndef vtkFrameBufferObject_h
30 #define vtkFrameBufferObject_h
33 #include "vtkRenderingOpenGLModule.h"
75 bool Start(
int width,
int height,
bool shaderSupportsTextureInt);
107 this->SetActiveBuffers(1, &
index);
133 unsigned int zslice=0);
153 vtkGetMacro(DepthBufferNeeded,
bool);
165 vtkGetMacro(NumberOfRenderTargets,
unsigned int);
186 vtkGetVector2Macro(LastSize,
int);
227 bool shaderSupportsTextureInt);
internal class which encapsulates OpenGL frame buffer object.
void SetActiveBuffers(int numbuffers, unsigned int indices[])
User provided color buffers are attached by index to color buffers.
std::vector< unsigned int > ActiveBuffers
void DestroyColorBuffers()
void DisplayBuffer(int value)
Display any buffer (convert value into string).
static bool IsSupported(vtkRenderWindow *renWin)
Returns if the context supports the required extensions.
void CreateDepthBuffer(int width, int height, unsigned int mode)
int CheckFrameBufferStatus(unsigned int mode)
Validate the current FBO configuration (attachments, formats, etc) prints detected errors to vtkError...
void SetActiveBuffer(unsigned int index)
Choose the buffers to render into.
void DisplayReadBuffer()
Display the read buffer.
void UnBind()
Restore the previous draw framebuffer if saved, else bind the default buffer.
void RenderQuad(int minX, int maxX, int minY, int maxY)
Renders a quad at the given location with pixel coordinates.
void RemoveColorBuffer(unsigned int index)
void SetContext(vtkRenderWindow *context)
Get/Set the context.
std::vector< vtkSmartPointer< vtkTextureObject > > ColorBuffers
abstract interface to OpenGL FBOs
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
static bool LoadRequiredExtensions(vtkRenderWindow *renWin)
Load all necessary extensions.
bool StartNonOrtho(int width, int height, bool shaderSupportsTextureInt)
unsigned int NumberOfRenderTargets
Interface class for querying and using OpenGL extensions.
vtkWeakPointer< vtkRenderWindow > Context
void DisplayFrameBufferAttachment(unsigned int uattachment)
Display a given attachment for the current framebuffer object.
void Bind()
Make the draw frame buffer active (uses FRAMEBUFFER).
bool Start(int width, int height, bool shaderSupportsTextureInt)
User must take care that width/height match the dimensions of the user defined texture attachments.
vtkSmartPointer< vtkTextureObject > UserDepthBuffer
std::vector< unsigned int > UserZSlices
void DisplayFrameBufferAttachments()
Display all the attachments of the current framebuffer object.
vtkRenderWindow * GetContext()
a simple class to control print indentation
abstracts an OpenGL texture object.
void SetColorBuffer(unsigned int index, vtkTextureObject *texture, unsigned int zslice=0)
Insert a color buffer into the list of available color buffers.
void DestroyDepthBuffer()
std::vector< vtkSmartPointer< vtkTextureObject > > UserColorBuffers
unsigned int GetMaximumNumberOfRenderTargets()
Returns the maximum number of render targets available.
vtkTextureObject * GetColorBuffer(unsigned int index)
void RemoveAllColorBuffers()
void DisplayDrawBuffers()
Display the draw buffers.
unsigned int GetMaximumNumberOfActiveTargets()
Returns the maximum number of targets that can be rendered to at one time.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
void SetNumberOfRenderTargets(unsigned int)
Set/Get the number of render targets to render into at once.
static vtkFrameBufferObject * New()
void SetDepthBuffer(vtkTextureObject *depthTexture)
Set the texture to use as depth buffer.
void CreateColorBuffers(int width, int height, unsigned int mode, bool shaderSupportsTextureInt)
create a window for renderers to draw into
abstracts an OpenGL pixel buffer object.