Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 1.22 KB

framebuffer.rst

File metadata and controls

42 lines (32 loc) · 1.22 KB

Framebuffer

.. py:module:: moderngl
.. py:currentmodule:: moderngl

.. autoclass:: moderngl.Framebuffer

Create

.. automethod:: Context.simple_framebuffer(size, components=4, samples=0, dtype='f1') -> Framebuffer
    :noindex:

.. automethod:: Context.framebuffer(color_attachments=(), depth_attachment=None) -> Framebuffer
    :noindex:

Methods

.. automethod:: Framebuffer.clear(red=0.0, green=0.0, blue=0.0, alpha=0.0, depth=1.0, viewport=None)
.. automethod:: Framebuffer.read(viewport=None, components=3, attachment=0, alignment=1, dtype='f1') -> bytes
.. automethod:: Framebuffer.read_into(buffer, viewport=None, components=3, attachment=0, alignment=1, dtype='f1', write_offset=0)
.. automethod:: Framebuffer.use()

Attributes

.. autoattribute:: Framebuffer.viewport
.. autoattribute:: Framebuffer.color_mask
.. autoattribute:: Framebuffer.depth_mask
.. autoattribute:: Framebuffer.width
.. autoattribute:: Framebuffer.height
.. autoattribute:: Framebuffer.size
.. autoattribute:: Framebuffer.samples
.. autoattribute:: Framebuffer.bits
.. autoattribute:: Framebuffer.color_attachments
.. autoattribute:: Framebuffer.depth_attachment
.. autoattribute:: Framebuffer.glo

.. toctree::
    :maxdepth: 2