vispy.gloo.framebuffer.
FrameBuffer
Bases: vispy.gloo.globject.GLObject
vispy.gloo.globject.GLObject
Frame buffer object
The color buffer to attach to this frame buffer
The depth buffer to attach to this frame buffer
The stencil buffer to attach to this frame buffer
activate
Activate/use this frame buffer.
color_buffer
Color buffer attachment
deactivate
Stop using this frame buffer, the previous framebuffer will be made active.
depth_buffer
Depth buffer attachment
read
Return array of pixel values in an attached buffer
The buffer type to read. May be ‘color’, ‘depth’, or ‘stencil’.
If True, returns RGBA array. Otherwise, returns RGB.
If not None, specifies pixels to read from buffer. Format is (x, y, w, h).
3D array of pixels in np.uint8 format. The array shape is (h, w, 3) or (h, w, 4), with the top-left corner of the framebuffer at index [0, 0] in the returned array if crop was not specified. If crop was given, the result will match the offset and dimensions of the crop.
resize
Resize all attached buffers with the given shape
New buffer shape (h, w), to be applied to all currently attached buffers. For buffers that are a texture, the number of color channels is preserved.
shape
The shape of the Texture/RenderBuffer attached to this FrameBuffer
stencil_buffer
Stencil buffer attachment
RenderBuffer
Base class for render buffer object
A render buffer can be in color, depth or stencil format. If this format is not specified, it is set when attached to the FrameBuffer.
The shape of the render buffer.
The format of the render buffer. See resize.
Indicates whether texture can be resized
format
RenderBuffer format
Set the render-buffer size and format
New shape in yx order. A render buffer is always 2D. For symmetry with the texture class, a 3-element tuple can also be given, in which case the last dimension is ignored.
The buffer format. If None, the current format is maintained. If that is also None, the format will be set upon attaching it to a framebuffer. One can also specify the explicit enum: GL_RGB565, GL_RGBA4, GL_RGB5_A1, GL_DEPTH_COMPONENT16, or GL_STENCIL_INDEX8
RenderBuffer shape