feat: add pixel_perfect option for 1:1 pixel ratio rendering#2841
Open
pvcraven wants to merge 3 commits intodevelopmentfrom
Open
feat: add pixel_perfect option for 1:1 pixel ratio rendering#2841pvcraven wants to merge 3 commits intodevelopmentfrom
pvcraven wants to merge 3 commits intodevelopmentfrom
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces support for a "pixel perfect" rendering mode in the
arcadeapplication, 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:
pixel_perfectparameter to theApplicationconstructor, which, when set toTrue, disables DPI scaling and ensures a 1:1 pixel ratio by settingpyglet.options.dpi_scalingto"platform"and overridingget_pixel_ratio()to always return1.0. [1] [2] [3]OpenGL Context Configuration:
pyglet.config.OpenGLUserConfigand theapiparameter with the appropriateGraphicsAPIenum, improving compatibility and clarity over the previousopengl_apistring usage. [1] [2]