Releases: pyglet/pyglet
Releases · pyglet/pyglet
v2.0.16
Changes and Improvements
- library-wide overhaul of docstrings, and addition of type hints. (#1084)
- sprite: Add
blend_mode
property to change BLEND_MODE without needing to re-create the Sprite. - sprite: Deprecate
AdvancedSprite
, and merge functionality into defaultSprite
class. - sprite: Add
get_sprite_group
method, allowing easy usage of custom SpriteGroups in subclasses. - image: Code for
Texture.blit
has been inlined. (#1109) - shapes: Concave polygon can be drawn by earcutting a polygon. (#1121)
- shapes: Add Rounded Rectangle shape. (#1131)
- shapes: Add
thickness
property toBox
shapes. - libs: Add
pyglet.libs.ioctl
module, to consolidate shared code on Linux. - gui: Add a pseudo "nine-path" Sprite-like class for variable sized windows.
- math: Add
match
statement support to Vec classes. - graphics: Don't re-create a Shader each call to
draw
ordraw_indexed
. - graphics: Greatly improve Uniform Buffer Objects and Buffer Object binding behavior.
- pyglet.options: Add
shader_bind_management
option for users who want to have more control over UBO binding behavior. - pyglet.options: Add runtime typing enforcement to user-set options.
- pyglet.experimental: Add simple GPU-based particle system in
particles
module. - text.layout: Update
on_style_text
to be more efficient.
Bugfixes
- window.macos: Fix constant appearance of blinking caret on M1 based Macs. (#1160)
- window.xlib: Avoid XSet/UnsetICFocus calls when _have_utf8 is False. (#1049)
- window.win32: Fix application not updating timers and redrawing during moves. (#1125)
- shapes: Add missing
thickness
property to Box. - shapes: Add missing docstrings to
Arc
thickness
property. - shapes: Fix ShapeBase.group setter to only migrate batch when batch is not None. (#1090)
- shapes: BezierCurve: fix miter artifacts from #1134. (#1155)
- examples: Fix "more" button outline in soundspace example. (#1085)
- tests: Fix a rarely-failing audio time test. (#1092)
- input.controller: Fix accidentially missed mappings.
- graphics.shader: Add missing parent program reference in Uniforms (#1103)
- graphics.domain: Fix VertexList.resize method.
- text.directwrite: Fix crash with dw_legacy_naming. Check if a custom collection exists before find a font with it.
v1.5.29
v2.0.15
Changes and Improvements
- font: Clean up win32 legacy font renderer to remove unused or outdated code.
- font: Boxes are now primary update method for TextLayout instead of relying on the vertex_list of the TextLayout.
- font: More typing additions.
- gui.widgets: Add _set_enabled hook (#1073)
- shapes: Add missing BezierCurve thickness property.
- graphics: Re-raise error for attributes during shader creation with better error descriptions. (#1076)
- docs: Start adding GUI section to the programming guide.
- typing: Add stub file for init package to workaround IDE inspection/completion issues with lazy loading modules. (#1077)
- examples: Add more visual feedback to the Controller example
Bugfixes
- Xaudio2: Fix missing
)
to POINTER which causes XAudio2 to fail to be imported. (#1068) - font.caret: Fix caret positioning and moving the cursor during cursor selection. (#932)
- input.controller: User added mappings should take higher priority over default mappings.
- input.controller: Properly handle inverted axis as dpad (#1078)
- shapes: Added a None check to ShapeBase.delete (#1075)
- shapes: Fix Line being off-centered when setting thickness #1083
- image: Fix BufferManager.get_depth_buffer() for GL3+.
v2.0.14b
Changes and Improvements
- shapes: Add new MultiLine shape. (#1057)
- font: Enhance UserDefinedFonts to allow using custom font mapping functions (#1067)
- typing: Improve Xaudio2 COM type hints (#1062)
- text: Raise Exception when attempting to change IncrementalTextLayout.rotation, as it's not supported.
- tests.integration: Add simple sanity tests for creation of all Label, Document, and Layout objects.
Bugfixes
- input.win32: Fix broken xinput get_devices and get_controllers methods (#1060)
- shapes: Fix incorrect BezierCurve positioning, and Line rotation. (#1084)
- app: Fix CFSTR.release() bugs in macOS event loop. (#1059)
- font: Fix missing annotation import causing a crash for GDI.
- text.caret: Caret now properly works with other Layout content valigns other than top.
- text.layout: Ensure all TextLayouts have consistent argument ordering.
- text.layout: Fix left, right, bottom, top Layout parameters not being correct.
- text.layout: Fix changing anchor not updating the translation.
- text.layout: Fix for lines getting garbled in an IncrementalTextLayout when using a content-valign other than top.
- text.layout: Fix IncrementalTextLayout setting visible line count instead of total line count.
- text.layout: Fix translation sometimes not updating all of the GlyphBoxes.
- text.layout: Fix _update_anchor not updating vertex lists of IncrementalTextLayout.
- text.layout: Fix _update_flow_glyphs not updating line count when it breaks it's loop.
- text.layout: Fix deleting lines at the end of a multilined IncrementalTextLayout not reducing view size.
- text.layout: Fix shader to conform to new anchors.
- text.layout: Rotation no longer requires destroying the whole layout, it now just updates attributes.
- text.layout: Anchor bottom fix for Scrollable/Incremental.
v2.0.12
Note: This version is a quick bugfix release that superceeds v2.0.11.
The previous release contained a bug that broke Batch/Group migration, which has now been fixed (and a unit test added for).
Changes and Improvements
- media: major internal audio cleanup, bugfixes, and improvements on all platforms.
- various typing and documentation improvements.
- math: add Quaternion class with common methods.
- shader: add support for setting and getting arrays in a Uniform via wrapper. (#1005)
- shapes: add radius property get and set to Arc class. (#1013)
- sprite, shapes: Avoid extra step of updating vertex list after creation. (#1016)
- shapes: allow setting the line thickness of Arc and BezierCurve shapes. (#1028, #1030)
- text: add Caret.select_all method.
- text: performance improvements on instantiation, visibility, anchors, positions. (#1004)
- text: add left, right, bottom, top attributes. (#1004)
- text: add program argument for custom shaders. (#1037)
- text: add get_as_texture function to render text to a new texture. (#1037)
- font: skip pre-parsing all system fonts to improve speed. Check only when needed.
Bugfixes
- macOS: prevent crash when scanning for Controllers if device.transport is None. (#995)
- input: avoid crash when encountering controls with invalid min/max values. (#986)
- xlib: fix missed argument in window drag.
- media: fix bad behavior when clearing XAudio2AudioPlayer. (#1011)
- pyglet.init: don't install debug_trace until after module proxies #1046
- media: numerous fixes to race conditions and deadlocks across all backends.
- experimental: Fix incorrect texture UVs and final positioning for GeometryShader Sprite.
- image: add missing binding calls for blit_to/texture methods.
v2.0.10
Changes and Improvements
- sprite: moving Sprites is now about 35% faster (as tested on R5 5600X)
- gui: Add TextEntry.focus property to allow programmatic focus control
- gui: Allow set TextEntry.width and TextEntry.height
- Window: Add experimental Window.get_clipboard_text and Window.set_clipboard_text methods
- experimental: Add new pyglet.experimental package for easier wider testing of new ideas
- experimental: Add
geoshader_sprite.py
that is more complex, but faster than the standard Sprite - experimental: Add
net
module with Server/Client proof of concept - tests: Add new interactive spot test to visually confirm shapes are working as expected
- shapes: Move rotate functionality to ShapeBase class, and allow all shapes to rotate
- VertexDomain: bind all buffers to VAO in init, and avoid binding each draw
- gl.Context: Add a new cached
Context.create_program
method to assist in shader reuse - examples.model.fpscamera: fix drifting input, and other improvements
- contrib.qt_sprite_preview.py: Modify to allow using either PySide2 or PyQt5 (#959)
- examples: Carry over the soundspace example (#972)
- media: The "Silent" audio driver now behaves more like a real driver
- text: Add RGB color setter fallback for HTML labels, assuming 255 alpha
- shapes: Add a new (unfilled) Box shape
- gl: Take threading into account when deleting OpenGL objects (#988)
Bugfixes
- gl: Stop storing doomed VAOs in object space (#918)
- xlib: Do a better job of detecting UTF8 capability (#520)
- media.Player: for Video playback, set context when updating Textures
- shapes: fix re-positioning of BezierCurve and Polygon shapes
- media.codecs: Fix use-after-frees and memory leaks in the wmf decoder #962
- text.Caret: Fix caret blinking (#971)
- text.layout: Fix incorrect background color vertex data
- Windows: Implement fix for ctypes.wintypes.BYTE in Python < 3.12 (#977)
- input.evdev: Fix for pypy3 by removing usage of os.readv
v1.5.28
Features
- Add support for FFmpeg 6.0
- Add support for mouse buttons 4 & 5 on Windows and Linux
- Windows: set higher timer precision when starting PlatformEventLoop.
- font.DirectWrite: improve font name parser (set 'dw_legacy_naming' pyglet option for old behavior)
- Extend keyboard F-key support (F16-24 on Windows, F21-24 on Linux. Mac limited to F20. (#773)
- Avoid audio stutter by initializing the AudioDriver when the media module is first used.
- macOS: add support for "on_file_drop" Window events
- macOS: add CoreAudio decoder for supporting compressed audio formats out of the box (mp3, etc.)
- macOS: add filename support for QuartzFont
- macOS: New optional alternate event loop, to prevent M1 issues (set 'osx_alt_loop' pyglet option) (#794)
Bugfixes
- Backport of numerous media and font bugfixes from the master branch.
- Fix BYTE windows type for Python 3.12
- Skip calling CGDisplaySetDisplayMode if the current screen mode is the same (#891)
- font.DirectWrite: Enable color font only for supported OS's
- Fix get_default_screen() to get the primary monitor, not just the first in the list (#717)
- Fix debug_win32 - LoadLibrary implementation (#748)
- font.Directwrite: Fix 32 bit crashes (#771)
- macOS: Fix memory leak with NSDate object returns.
- Fix FFmpeg 4.0 not being found on MacOS
- Varios XAudio2 fixes and cleanups (#877)
v2.0.9
Changes and Improvements
- app: Passing
None
to pyglet.app.run will disable automatic Window redraws. - window: Add a Window.draw method to help when manually scheduling Window redraws.
- shapes: Add a
border
thickness setter to BorderedRectangle. - docs: Various docstring improvements and cleanups.
- examples: Add minimal ComputeShader example.
Bugfixes
- media: Fix multiple on_eos events from OpenAL players, and major MediaThreads overhaul.
- macos: Fix on_key events (#898)
- macos: Workaround for CGDisplaySetDisplayMode bug
- Xaudio2: Fix packet refill crash when removing a player that was deleted mid callback.
- gui: Fix incorrectly named on_mouse_scroll arguments (#904).
v2.0.8
Changes and Improvements
- Add missing OpenGL extensions
- Add support for FFmpeg 6.0
- Sprite width & height properties are now settable, allowing scaling by pixels
- documentation: updates to migration guide, media, and events
- shapes: Allow checking if a point is in a shape, using the
in
operator
Bugfixes
- clock: Fix clock swallowing ReferenceErrors
- documentation: fix some sphinx build issues on ReadTheDocs
- font: multiple macOS fixes, including issues with double-byte fonts
- input: ensure Xinput controllers dispatch events on the main thread
v2.0.7
Changes and Improvements
- gui: Add alpha value to the Caret's default color.
- docs: Some minor rewording of sections, and type fixes.
Bugfixes
- Fix broken struct format strings in png and ttf decoders.
- text: Clear Group cache when a Layout's Group is changed.
- Fix incorrect string formatting in the timer.py example.