Skip to content

feat: add pixel_perfect option for 1:1 pixel ratio rendering#2841

Open
pvcraven wants to merge 3 commits intodevelopmentfrom
pixel-perfect
Open

feat: add pixel_perfect option for 1:1 pixel ratio rendering#2841
pvcraven wants to merge 3 commits intodevelopmentfrom
pixel-perfect

Conversation

@pvcraven
Copy link
Copy Markdown
Member

This pull request introduces support for a "pixel perfect" rendering mode in the arcade application, ensuring a 1:1 pixel ratio by ignoring OS DPI scaling when enabled. It also updates how the OpenGL context is configured for better compatibility with the underlying graphics API.

Pixel Perfect Rendering:

  • Added a pixel_perfect parameter to the Application constructor, which, when set to True, disables DPI scaling and ensures a 1:1 pixel ratio by setting pyglet.options.dpi_scaling to "platform" and overriding get_pixel_ratio() to always return 1.0. [1] [2] [3]

OpenGL Context Configuration:

  • Updated OpenGL context creation to use pyglet.config.OpenGLUserConfig and the api parameter with the appropriate GraphicsAPI enum, improving compatibility and clarity over the previous opengl_api string usage. [1] [2]

Paul V Craven and others added 3 commits April 16, 2026 15:49
Reverts OpenGLConfig→OpenGLUserConfig and opengl_api→api changes
that were accidentally introduced while prototyping pixel_perfect.
Arcade targets pyglet 3.0.dev1 which uses the original names.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: remove redundant check in camera viewport setter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant