Moderngl

Latest version: v5.10.0

Safety actively analyzes 630052 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 17

5.7.3

5.7.2

* Fixed a critical issue causing `Renderbuffer.release()` to crash due to missing `InvalidObject` import.
* Added a more sane error message when a scope is missing a framebuffer

Additional unit tests and code inspection were added to avoid similar issues in the future.

5.7.1

This version mainly addresses code maintainability and stability.

5.7.0

CHANGELOG

* Python 3.11 support
* Added support for configurable garbage collection mode. ``Context.gc_mode`` controls this.
* ``None``: (default) No garbage collection is performed. Objects needs to to be
manually released like in previous versions of moderngl.
* ``"context_gc"``: Dead objects are collected in ``Context.objects``.
These can periodically be released using ``Context.gc()``.
* ``"auto"``: Dead objects are destroyed automatically like we would expect in python.
* Added support for `glPolygonOffset`. The factors and units can be set using `Context.polygon_offset`
* Added support for normalized signed and unsigned integer textures. `ni1`, `nu1`, `ni2` and `nu2`
are the new dtypes for these.
* Added ``Context.external_texture`` for creating textures from existing OpenGL textures.
* Added `TextureCube.bind_to_image` so we can easily access cube textures in compute shaders
* Added `Texture3D.bind_to_image` so we can easily access 3D textures in compute shaders
* Added `TextureArray.bind_to_image` so we can easily access texture arrays in compute shaders
* Added support for specifying a custom internalformat for cube maps. This can be used for sRGB and texture compression formats.
* Integer textures now use `NEAREST` interpolation by default. This was causing issues with some drivers.
* Added support for writing to multiple buffers in transforms.
* ``Context.program`` now accepts a dictionary for mapping sampler names to specific texture units.
* Added `Program.is_transform` exposing if the program has a fragment shader or not
* Added `VertexArray.mode` and a `mode` argument in `Context.vertex_array`. This is now the default rendering mode when no mode parameter is passed in `render()` or `transform()`
* Added support for 1D sampler in `Uniform`
* Added direct access to `glEnable` / `glDisable` in `Context.enable_direct` / `Context.disable_direct`. This can be used to enabled capabilities not supported by ModernGL.
* `Framebuffer.read()` now has a `clamp` (bool) parameter. If enabled, floating point data will clamp to `[0.0, 1.0]`. Clamping is disabled by default.
* Fixed a bug causing ``copy_framebuffer`` to not work with multisampled framebuffers with multiple color attachments.
* Fixed a bug in ``copy_framebuffer`` that caused the draw buffers to be permanently changed.
* VertexArray: Removed "the first vertex attribute must not be a per instance attribute" limitation
* Fixed a crash when reading `ctx.provoking_vertex`
* Added workaround for MacOS requiring a framebuffer to be bound in headless mode even for transform shaders. We simply create and bind a framebuffer internally.
* Added ``GL_MAX_GEOMETRY_OUTPUT_VERTICES`` to ``Context.info``
* Docstring improvements
* Documentation improvements

5.6.4

* Transform feedback now supports all primitive modes both for vertex and geometry shaders
* `VertexArray.transform()` now raises sane errors when using the wrong primitive mode with geometry shaders
* `VertexArray.transform()` now automatically detects output primitive based on the input
* `GL_TRIANGLES_ADJACENCY` enum incorrectly mapped (`D0` instead of `0D`)
* Primitive modes are now accessible in the `Context` instance. For example: `ctx.POINTS` and `ctx.TRIANGLES`
* Texture filers are now also available in the `Context` instance. For example: `ctx.NEAREST` and `ctx.LINEAR`
* Docstring and documentation improvements

5.6.3

* Added `Context.extensions`. This is a `set` containing the OpenGL extensions supported by the context.
* Added support for overridable internal_format for `Texture`. This opens up for sRGB and compressed formats if needed.
* Docstring and documentation improvements

Page 2 of 17

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.