Skip to content

Releases: pyglet/pyglet

v2.0.15

03 Apr 01:53
Compare
Choose a tag to compare

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

08 Mar 04:34
Compare
Choose a tag to compare

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

01 Mar 00:15
Compare
Choose a tag to compare

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

07 Nov 07:48
Compare
Choose a tag to compare

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

23 Oct 06:02
Compare
Choose a tag to compare

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

29 Jul 12:53
Compare
Choose a tag to compare

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

22 Jun 09:02
Compare
Choose a tag to compare

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

09 May 02:00
Compare
Choose a tag to compare

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.

v2.0.6

02 May 05:55
Compare
Choose a tag to compare

Changes and Improvements

  • Initialize AudioDriver when media module is imported, prevent pause on first sound playback.
  • New TextureArrayBin class for managing TextureArray based atlases.
  • macOS: implement "file_drop" support for Windows.
  • macOS: add support for CoreAudio, allowing native mp3, aiff, etc. support without FFMpeg.
  • macOS: alternative NSApplication based event loop, to avoid missing events on M1 Macs. #794
  • text: Caret supports RGBA color, in line with other pyglet objects.
  • Windows: New context manager for handling of safer handling of platform resources.

Bugfixes

  • Fix numerous bugs remaining with IncrementalTextLayout, with translation, caret, etc. #786
  • Windows: fix incorrect on_resize values.
  • macOS: numerous memory leak fixes.
  • shader: add missing sampler type definitions.
  • Add missing docstrings, and various documentation fixes.

v2.0.5

28 Feb 06:22
Compare
Choose a tag to compare

Changes and Improvements

  • windows.key: add support for extended function keys
  • Windows now uses "Apartment Threaded" mode for better compatibility with other libraries.
  • image: allow blanking newly created Textures (skipped by default when creating from image).

Bugfixes

  • input.macos: Fix ControllerManager hot-plugging on macOS.
  • font.windows: Fix 32bit crashes with DirectWrite font backend.
  • math: Fix incorrect calculation in Mat4.look_at method.
  • image: Fix blitting from regions, caused by invalid unpacking settings.