Skip to content
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

Some machine doesn't like singleton implementation #168

Open
ntut-rick opened this issue Apr 3, 2024 · 0 comments
Open

Some machine doesn't like singleton implementation #168

ntut-rick opened this issue Apr 3, 2024 · 0 comments
Labels
help wanted Extra attention is needed optimization

Comments

@ntut-rick
Copy link
Member

ntut-rick commented Apr 3, 2024

Problem

On macOS, some programs will experience significant performance hits when items on screen gets too many. According to this answer on Stack Overflow, using singletons with OpenGL uniform buffers prevents macOS's OpenGL to Metal wrapper to perform parallelization optimizations. For whatever reason this doesn't seem to happen on Windows or Linux OpenGL driver implementations (or Intel / AMD / Nvidia)

Fixing history

Other Info

There are other resources such as Program and VertexArray that are still singletons. However, the difference is they are not updated every frame like UniformBuffer I don't know if changing those to normal class members will incur a performance penalty or not as I haven't properly configured profiling on a macOS machine. I'll leave them as is.

Originally posted by @NOOBDY in #162 (comment)

@github-project-automation github-project-automation bot moved this to 🆕 Backlog in New Game Framework Apr 3, 2024
@NOOBDY NOOBDY added the help wanted Extra attention is needed label Apr 3, 2024
@ntut-rick ntut-rick pinned this issue Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed optimization
Projects
Status: 🆕 Backlog
Development

No branches or pull requests

2 participants