Renderbuffers¶
-
Context.
renderbuffer
(size, components=4, samples=0, floats=True) → Renderbuffer Renderbuffer
objects are OpenGL objects that contain images. They are created and used specifically withFramebuffer
objects.Parameters: - size (tuple) – The width and height of the renderbuffer.
- components (int) – The number of components 1, 2, 3 or 4.
Keyword Arguments: - samples (int) – The number of samples. Value 0 means no multisample format.
- floats (bool) – Use floating point precision.
Returns: renderbuffer
Return type:
-
Context.
depth_renderbuffer
(size, samples=0) → Renderbuffer Renderbuffer
objects are OpenGL objects that contain images. They are created and used specifically withFramebuffer
objects.Parameters: size (tuple) – The width and height of the renderbuffer. Keyword Arguments: samples (int) – The number of samples. Value 0 means no multisample format. Returns: depth renderbuffer Return type: Renderbuffer
-
class
Renderbuffer
¶ Renderbuffer objects are OpenGL objects that contain images. They are created and used specifically with
Framebuffer
objects. They are optimized for use as render targets, whileTexture
objects may not be, and are the logical choice when you do not need to sample from the produced image. If you need to resample, use Textures instead. Renderbuffer objects also natively accommodate multisampling.A Renderbuffer object cannot be instantiated directly, it requires a context. Use
Context.renderbuffer()
orContext.depth_renderbuffer()
to create one.-
width
¶ int – The width of the renderbuffer.
-
height
¶ int – The height of the renderbuffer.
-
size
¶ tuple – The size of the renderbuffer.
-
samples
¶ int – The samples of the renderbuffer.
-
components
¶ int – The components of the renderbuffer.
-
depth
¶ bool – Is the renderbuffer a depth renderbuffer?
-