All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
5.6.0 Unreleased
From moderngl 5.6 context creation is done by the glcontext package. This means we can keep improving context creation without releasing new moderngl versions. The bar for contributing to context creation is also lower. Backends can be written in C++ or by simply using ctypes.
- Scissor test support.
Framebuffer.scissor
andContext.scissor
can now be used to set and enable scissor testing per framebuffer. - The
Framebuffer.clear
have an optionalcolor
parameter to replace the oldred, green, blue, alpha
parameters. - Samplers and Buffers have an
assign
method to simplify the scope creation. - Samplers have an optional
texture
parameter that will be used together with the sampler when given. - The Scope's
enable_only
keyword argument is deprecated in favor of theenable
keyword argument. - Buffers have a
bind
method that replaces the tuples in the VertexArray creation. - VertexArrays have an optional
scope
property that will be used when rendering. - The VertexArray's
vertices
property is now writeable. - VertexArrays have an
instances
property to control the default number of instances when rendering. - The Context object contains the constants provided by the moderngl module. The constants are: (TRIANGLE, LINES, DEPTH_TEST, ...)
- The
framebuffer
parameter is optional in Scopes. - The
ctx.simple_vertex_array
is deprecated in favor of usingctx.vertex_array
with the same parameters. - The
prog[uniform].value = value
is deprecated in favor of usingprog[uniform] = value
. - The
prog[uniform].write(bytes_value)
is deprecated in favor of using theprog[uniform] = bytes_value
.
5.5.4 - 2019-11-10
This version was originally meant to only add python 3.8 support, but a few additions and fixes where cherry-picked from the 5.6 branch.
- Python 3.8 support
Vertexarray
s can now be crated without any content.Context.blend_func
now supports separate blend functions for rgb and alpha.- Added
Context.blend_equation
supporting separate blend equations for rgb and alpha.
5.5.3 - 2019-08-16
- Scope object uniform buffer bindings.
5.5.2 - 2019-06-13
- missing package in setup.py
5.5.1 - 2019-06-12
- offset fix for vao render
5.5.0 - 2019-01-22
- depth texture filter and compare func
- scope restores old enable flags properly
- clear gl errors as the final step of initialization
- fix default framebuffer's number of attachments
- documentation for
extra
properties - improved documentation
- improved build on Mac
5.4.2 - 2018-08-01
- included
moderngl.program_members
in the package list
5.4.1 - 2018-07-30
- broken description on PyPI
5.4.0 - 2018-07-30
- Sampler object support
Context.sampler
methodContext.max_anisotropy
propertyContext.clear_samplers
methodFramebuffer.read
andFramebuffer.read_into
now acceptsattachment=-1
to read the depth attachmentTexture.compare_func
propertyTexture.anisotropy
property- docs and tests
- missing
ComputeShader
uniforms and uniform blocks - wrong
DrawBuffer
call when clearing the screen - reading depth values from textures
- broken compare functions
5.3.0 - 2018-06-27
index_element_size
parameter forContext.vertex_array
andContext.simple_vertex_array
- comapre fuctions
5.2.1 - 2018-05-10
- markdown readme issues
5.2.0 - 2018-05-10
Context.core_profile_check
methodGL_CONTEXT_PROFILE_MASK
toContext.info
GL_PATCHES
constant for drawing patches- getter and setter for
GL_PATCH_VERTICES
- markdown readme
- tesselation control and tesselation evaluation shader being swapped when creating a program
5.1.0 - 2018-04-28
- offset and size parameter to
Buffer.bind_to_uniform_block
- offset and size parameter to
Buffer.bind_to_storage_buffer
GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT
toContext.info
5.0.7 - 2018-04-08
- minor bugs in Buffer Format
5.0.6 - 2018-03-22
standalone_context
on linux issue #173
5.0.5 - 2018-03-21
- Standalone context on linux fails when the default display is nonzero.
5.0.4 - 2018-03-07
- Standalone context on windows fails when old GPU driver is installed.
5.0.3 - 2018-02-28
- TextureArray objects
- Indirect drawing
- Restored Error class from ModernGL4
- Properly set subroutines in VertexArray render
5.0.2 - 2018-02-20
- Wrong module name in some windows based wheel files
5.0.1 - 2018-02-19
- Build errors and warnings for older python versions
5.0.0 - 2018-02-18
For more information please see: Differences between ModernGL5 and ModernGL4
- Query objects
- Scope objects
- Conditional Rendering
- New
RASTERIZER_DISCARD
enable flag - Context fbo attribute
- Context depth_func and blend_func
- Depth Texture compare_func
- Most of the constants became integers
- Renamed
default_framebuffer
toscreen
and always points to framebuffer 0 - VertexArray's buffer formats
- Program creation
- Program members
- Replace floats parameter with dtype
- Classes and methods that are no longer needed
4.2.2 - 2018-01-06
- Program.__getitem__ returns Uniforms, UniformBuffers, Attributes and Varyings
4.2.1 - 2017-11-25
- UniformMap.get, AttributeMap.get, ... methods
- Context.info
GL_MAX_COMPUTE_WORK_GROUP_COUNT
value - Missing TextureCube class
- Buffer.clear return type hint
4.2.0 - 2017-10-17
- Default framebuffer bits attribute
- Context.detect_framebuffer
- Support reserving buffers with human readable sizes
- Standalone context on linux requires 24 bits for the depth buffer at least
- Bound framebuffer reference count
4.1.12 - 2017-08-22
- TextureCube class and Context
texture_cube
method - Context
enable_only
method
- Enable flags support bitwise
__or__
,__and__
and__inv__
- Framebuffer does not create a Renderbuffer when the depth_attachment is None
ModernGL.MULTISAMPLE
constant- Version class and Version constants
- Texture3D created with wrong type
4.1.11 - 2017-07-02
- Context
front_face
attribute
- VertexArray
program
member type - Context
viewport
attribute missingtuple
cast - Misplaced
GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS
- Compile warnings (strict-prototypes)
- Initial value of
wireframe
4.1.10 - 2017-06-23
- Documentation improvements
- Context
max_samples
attribute
- Validate the number of samples using wrong values
4.1.9 - 2017-06-23
- Context
info
attribute - Support Textures in
copy_framebuffer
- Texture
floats
attribute
- 3D texture
depth
attribute type
4.1.8 - 2017-06-19
- 3D texture support (
Texture3D
class and Contexttexture3d
method) - Context
max_integer_samples
attribute - Fallback display for linux
- Unused texture's
read
method'sviewport
parameter
- Broken framebuffer
color_attachments
attribute - Segmentation fault when creating a texture using string data by mistake
- Validate Renderbuffer and Texture samples
4.1.7 - 2017-06-13
- Uniform
read
andwrite
methods write_offset
parameter for theread_into
methods- Read framebuffer's pixels to a buffer
- Read texture's pixels to a buffer
- Write texture's from a buffer
- Pixel Buffer Object
- Default framebuffer wrong drawbuffers
- Framebuffer non zero viewport settings
- Uniform setter error messages
4.1.6 - 2017-06-12
- Broken uniform setter in 4.1.5
4.1.5 - 2017-06-09
- Modifying framebuffer properties has no effect unless the framebuffer is explicitly bound
4.1.4 - 2017-06-07
- Framebuffer
color_mask
attribute - Framebuffer
depth_mask
attribute - Framebuffer
viewport
attribute
copy_framebuffer
usingdefault_framebuffer
- Failing
__repr__
in VertexArrays
- Framebuffer methods do not affect the bound framebuffer
- Invalid texture sampling parameters for multisample textures
- Invalid texture sampling parameters for depth textures
4.1.3 - 2017-06-04
- TextureFilter and TextureWrap classes and constants
- Texture
build_mipmaps
method - Texture
repeat_x
,repeat_y
andfilter
attributes - Texture
swizzle
getter
4.1.2 - 2017-05-31
- Read any color attachments of the Framebuffer
- Framebuffer, Buffer, BufferAccess and Texture
read_into
method __slots__
for ModernGL classes- Framebuffer read different color attachments
- Tkinter connector for windows using ctypes
- Multiple render targets
- Non-float renderbuffers are not readable
- Buffer
read
keyword onlyoffset
argument
Context.renderbuffer
will usefloats=False
by defaultbind_to_uniform_block
location
parameter was renamed tobinding
bind_to_storage_buffer
location
parameter was renamed tobinding
4.1.1 - 2017-05-27
- UniformBlock
binding
andsize
attribute - Framebuffer
width
,height
andsamples
attribute - Texture
swizzle
attribute - Context
error
attribute - OpenGL objects as
glo
attributes - Buffer
clear()
method - Missing
release()
methods - Iterable program member maps
- Human readable program members
- Pixel pack and unpack alignments
- Subroutines
- UniformBlock
array_size
andlocation
attribute - VertexArrayAttribute
default
attribute
- BufferAccess unused
offset
parameter - Binding buffer to a UniformBlock
- Broken RTD docs
4.1.0 - 2017-05-24
- Exception handling when importing the implementation
- Standalone context on linux and mac with fallback mechanism
- Require version at context creation
- Context
version_code
property - Framebuffer
clear()
method
- Context
clear()
method accepts floats
- Required
-std=c++11
for linux and mac - ModernGL
VERSION
constant
Framebuffer
andTexture
can have uninitialized x, y values- Uniform setters
4.0.0 - 2017-05-20
- Full linting support
- Restructure docs
- Examples in docs
- pep8 style
- VSCode snippets
- Changelog
- Wrap the C/C++ module with a pure python module
- Rename internal module to avoid ambiguosity
- Rename class like members from the Context class
3.1.5 - 2017-05-07
- Standalone ModernGL context
- Sphinx generated docs
- Linting with pylint mock file
- Mac OSX support
3.1.0 - 2017-03-01
- Wrapping OpenGL objects with python types
- Improved Linux support
- Direct access to OpenGL objects
2.4.1 - 2016-08-30
- setup.py and PyPI compatible packaging
- Direct access to OpenGL objects
- Linux support
- It was a tool for me to develop games in python