Conversation
Groundwork for the renderer swap from OpenGL to Metal. Links the two frameworks and bumps the macOS deployment target to 14.0 so the renderer commit can target the modern AppKit display-link API. OpenGL.framework stays linked here; the renderer-swap commit removes it. Runtime behavior is unchanged.
Stages the vertex/fragment shaders the renderer commit will bind, so that commit can carry only the renderer rewrite itself. The shaders compile into the default Metal library at this commit but are not referenced at runtime yet.
Completes the migration started by the previous two commits. DisplayOpenGLView is now an MTKView subclass, Texture is backed by an MTLTexture, and the OpenGL framework link is removed. The view's public API is preserved, so the controllers that reach through it are untouched and the change is contained to the view and its texture helper.
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.
Apple deprecated OpenGL on macOS in 2018 (10.14 Mojave). On Apple Silicon — the primary target — OpenGL calls go through a software translation layer that Metal replaces with native execution.
What this PR does
DisplayOpenGLViewbecomes anMTKViewsubclass andTextureis backed by anMTLTexture; the OpenGL framework link is removed in the same commit. The view's public API is preserved, so the controllers that reach through it are untouched and the diff is contained to the view and its texture helper. The macOS deployment target is raised from 10.13 to 14.0 so the renderer can useMTKView's built-in display loop. Three commits stage the work so the renderer rewrite can be reviewed in isolation: framework + deployment-target bump first, shader source second, renderer swap third.User-visible changes
None functional. The emulator runs the same machines, same scalers, same fullscreen behavior. On Retina displays pixels now sample at integer multiples of physical resolution rather than being soft-upscaled by AppKit, which makes the image marginally crisper — unlikely to be noticed unless someone is looking for it.
Tradeoffs
The class name
DisplayOpenGLViewis preserved through this migration to keep the renderer-swap diff minimal; the rename toDisplayViewis tracked as mechanical follow-up. Bumping the macOS deployment target to 14.0 drops compatibility with 10.13–13.