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