Texture
=======

.. py:currentmodule:: moderngl

.. autoclass:: moderngl.Texture

Create
------

.. automethod:: Context.texture
   :noindex:

.. automethod:: Context.depth_texture
   :noindex:

Methods
-------

.. automethod:: Texture.read
.. automethod:: Texture.read_into
.. automethod:: Texture.write
.. automethod:: Texture.build_mipmaps
.. automethod:: Texture.bind_to_image
.. automethod:: Texture.use
.. automethod:: Texture.release

Attributes
----------

.. autoattribute:: Texture.repeat_x
.. autoattribute:: Texture.repeat_y
.. autoattribute:: Texture.filter
.. autoattribute:: Texture.swizzle
.. autoattribute:: Texture.compare_func
.. autoattribute:: Texture.anisotropy
.. autoattribute:: Texture.width
.. autoattribute:: Texture.height
.. autoattribute:: Texture.size
.. autoattribute:: Texture.dtype
.. autoattribute:: Texture.components
.. autoattribute:: Texture.samples
.. autoattribute:: Texture.depth
.. autoattribute:: Texture.glo
.. autoattribute:: Texture.mglo
.. autoattribute:: Texture.extra
.. autoattribute:: Texture.ctx

.. toctree::
    :maxdepth: 2
