1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
|
Usage
Encapsulates an OpenGL Frame Buffer Object. For use by
vtkOpenGLFBORenderWindow, not to be used directly.
To create an instance of class vtkFrameBufferObject, simply
invoke its constructor as follows
obj = vtkFrameBufferObject
Methods
The class vtkFrameBufferObject has several methods that can
be used. They are listed below. Note that the documentation
is translated automatically from the VTK sources, and may
not be completely intelligible. When in doubt, consult the
VTK website. In the methods listed below, obj is an instance
of the vtkFrameBufferObject class.
* string = obj.GetClassName ()
* int = obj.IsA (string name)
* vtkFrameBufferObject = obj.NewInstance ()
* vtkFrameBufferObject = obj.SafeDownCast (vtkObject o)
* obj.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 = obj.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.
* bool = obj.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 = obj.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.
* obj.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.
Precondition:
positive_minX: minX>=0
increasing_x: minX<=maxX
valid_maxX: maxX<LastSize[0]
positive_minY: minY>=0
increasing_y: minY<=maxY
valid_maxY: maxY<LastSize[1]
* obj.Bind () - Save the current framebuffer and make the
frame buffer active. Multiple calls to Bind has no effect.
* obj.UnBind () - Restore the framebuffer saved with the
call to Bind(). Multiple calls to UnBind has no effect.
* obj.SetActiveBuffer (int index) - Choose the buffer to
render into. This is available only if the
GL_ARB_draw_buffers extension is supported by the card.
* obj.SetActiveBuffers (int numbuffers, int indices[]) -
Choose the buffer to render into. This is available only
if the GL_ARB_draw_buffers extension is supported by the
card.
* obj.SetColorBuffer (int index, vtkTextureObject texture,
int zslice)
* vtkTextureObject = obj.GetColorBuffer (int index)
* obj.RemoveColorBuffer (int index)
* obj.RemoveAllColorBuffers ()
* obj.SetDepthBuffer (vtkTextureObject depthTexture) - Set
the texture to use as depth buffer.
* obj.RemoveDepthBuffer () - Set the texture to use as depth
buffer.
* obj.SetDepthBufferNeeded (bool ) - If true, the frame
buffer object will be initialized with a depth buffer.
Initial value is true.
* bool = obj.GetDepthBufferNeeded () - If true, the frame
buffer object will be initialized with a depth buffer.
Initial value is true.
* obj.SetNumberOfRenderTargets (int ) - Set/Get the number
of render targets to render into at once.
* int = obj.GetNumberOfRenderTargets () - Set/Get the number
of render targets to render into at once.
* int = obj.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.
* int = obj.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.
* int = obj. GetLastSize () - Dimensions in pixels of the
framebuffer.
* FreeMat_Documentation
* Visualization_Toolkit_Rendering_Classes
* Generated on Thu Jul 25 2013 17:18:35 for FreeMat by
doxygen_ 1.8.1.1
|