-
-
Notifications
You must be signed in to change notification settings - Fork 0
Add Sdl2 windowing & OpenGL rendering (basic) #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* Added an implementation of IDisplay using Sdl2. * Created a new Catalyst.Modules.Crystal.Sdl2 project.
* Added an implementation of IWindow using Sdl2.
…dow/SdlWindow.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: FireController#1847 <usfirepilot123@gmail.com>
* Resolved exceptions from the DelegateQueue causing a recursive loop when attempting to unwind the stack. * Resolved exceptions from the worker thread in CatalystApp from being consumed.
* Created a new Catalyst.Modules.Crystal.OpenGL project. * Resolved naming inconsistencies in the builder extensions for Glfw3. * Added an implementation of OpenGLMacNativeConnector. * Added an implementation of the OpenGL INativeApi wrapper.
* Added a basic impl for IRenderer for OpenGLRenderer * Minor changes to IRenderer (adding the dispatcher, depth clarification for Clear, and nullability on SetTarget) * Added RendererOptions * Added RenderLayerException * Added CreateRenderer to IRendererLayer * Fixed naming in the native connector
d76dab6 to
9bcfe33
Compare
In theory, the basics for a renderer should now be complete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 38 out of 38 changed files in this pull request and generated 63 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CatalystUI/Modules/Crystal/CatalystUI.Modules.Crystal.Sdl2/Window/SdlWindow.cs
Outdated
Show resolved
Hide resolved
CatalystUI/Modules/Crystal/CatalystUI.Modules.Crystal.Sdl2/Window/SdlWindow.cs
Outdated
Show resolved
Hide resolved
CatalystUI/Modules/Crystal/CatalystUI.Modules.Crystal.Sdl2/Window/SdlWindow.cs
Show resolved
Hide resolved
CatalystUI/Modules/Crystal/CatalystUI.Modules.Crystal.Sdl2/Window/SdlWindow.cs
Show resolved
Hide resolved
CatalystUI/Modules/Crystal/CatalystUI.Modules.Crystal.Sdl2/Window/SdlWindow.cs
Outdated
Show resolved
Hide resolved
CatalystUI/Modules/Crystal/CatalystUI.Modules.Crystal.OpenGL/Renderer/OpenGLRenderer.cs
Show resolved
Hide resolved
CatalystUI/Modules/Crystal/CatalystUI.Modules.Crystal.OpenGL/Renderer/OpenGLRenderer.cs
Show resolved
Hide resolved
CatalystUI/Modules/Crystal/CatalystUI.Modules.Crystal.OpenGL/Renderer/OpenGLRenderer.cs
Outdated
Show resolved
Hide resolved
CatalystUI/Modules/Crystal/CatalystUI.Modules.Crystal.OpenGL/Renderer/OpenGLRenderer.cs
Show resolved
Hide resolved
CatalystUI/Modules/Crystal/CatalystUI.Modules.Crystal.OpenGL/Renderer/OpenGLRenderer.cs
Show resolved
Hide resolved
CatalystUI/Modules/Crystal/CatalystUI.Modules.Crystal.Core/Renderer/RendererOptions.cs
Show resolved
Hide resolved
68f4fe4 to
620c0d4
Compare
* Added a "quickstart" BasicWindow example project * Resolved get/init/set issues with WindowOptions & RendererOptions (no need for them to be read-only).
CatalystUI/Modules/Crystal/CatalystUI.Modules.Crystal.Core/Renderer/RenderLayerException.cs
Show resolved
Hide resolved
...Modules/Crystal/CatalystUI.Modules.Crystal.OpenGL/Extensions/CatalystAppBuilderExtensions.cs
Show resolved
Hide resolved
ItzNxthaniel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, I would like to discuss my two comments before explicit approval.
* Ensured threads properly wait if there's no delegates instead of spin-looping. * Resolved excessive fetching of TargetFramerate in OpenGLRenderer (moved to use underlying value) * Resolved publish profiles not exporting the correct architectures (Arm64 vs x64)
* Resolved changes by Copilot * Resolved chnages by @ThisIsBrady * Resolved changes by @ItzNxthaniel
* This was put inside the lock causing it to wait forever because delegates could never be enqueued :(
* Was not setting the disposal flag early enough so resources were still being used after they were disposed of. * Removed disposal exception for _queue.Execute() due to the rate at which it is fired.
ItzNxthaniel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
📑 Summary
Beginning work on adding the Crystal Sdl2 windowing implementation and a very basic OpenGL renderer implementation.
I am aware of the lack of an Sdl2 to OpenGL connector. This will be a future PR/commit.
⚒️ Changes
Caution
Accurately describing the changes made in this PR will greatly improve the speed at which we can review your PR. Semantic Versioning can be helpful in determining the scope of your change, and will help in determining the appropriate version number, merge location, and timing of the integration of your change.
➕ Additions
Added the following projects to the repository:
Additionally, changes from about four months ago in the original CatalystUI development project have now been migrated into the latest version, including a refactored implementation of SdlDisplay, SdlWindow, and OpenGLRenderer (to merge the previous OpenGLThread and OpenGLRenderer implementations together).
✖️ Modifications
Primary changes from previous commits in this iteration of Catalyst include:
All changes are noted in the individual commits.
➖ Removals
💬 Review
Important
Accurately listing key items for review will help us review your PR more quickly. Please include large changes, breaking changes, and any other changes that may require special attention.
Reviewers will check off items in the list as they are reviewed, in addition to the normal GitHub review process. They may request changes if any items are not adequately addressed or add additional items as necessary.
GlfwWindowwithSdlWindow.SdlWindowcontains implementations MATCHING the available implementations ofGlfwWindow.