Skip to content

Commit

Permalink
document interoperability
Browse files Browse the repository at this point in the history
  • Loading branch information
szabolcsdombi committed Apr 12, 2022
1 parent 105ab8e commit d2c0233
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,33 @@ This method releases the OpenGL resources associated with the parameter.
OpenGL resources are not released automatically on garbage collection.
Release Pipelines before the Images and Buffers they use.

Interoperability
----------------

| Some window implementations expose a framebuffer object for drawing.
| Detecting this framebuffer is an error-prone and non-reliable solution.
| The recommended way is to change :py:attr:`Context.screen` to the frambuffer object.
| Do not change the :py:attr:`Pipeline._framebuffer`. It is for a different purpose.
| Running zengl alongside another renderer is not supported.
| However, to port existing code to zengl, some interoperability may be necessary.
| OpenGL objects can be extracted with :py:meth:`zengl.inspect`.
| It is possible to interact with these objects using the OpenGL API directly.
.. py:method:: zengl.inspect(obj: Buffer | Image | Pipeline)
Returns an object with all of the OpenGL objects.

.. py:attribute:: Context.screen
| An integer representing the default framebuffer object.
| You may want to change this attribute when using PyQt.
.. py:attribute:: Pipeline._framebuffer
| An integer value of the framebuffer object used by the pipeline.
| This attribute can be changed.
Utils
-----

Expand Down

0 comments on commit d2c0233

Please sign in to comment.