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

fix: [#2622] Add multi engine support #2635

Merged
merged 13 commits into from
May 6, 2023
Merged

Conversation

eonarheim
Copy link
Member

@eonarheim eonarheim commented May 4, 2023

===:clipboard: PR Checklist :clipboard:===

  • 📌 issue exists in github for these changes
  • 🔬 existing tests still pass
  • 🙈 code conforms to the style guide
  • 📐 new tests written and passing / old tests updated with new scenario(s)
  • 📄 changelog entry added (or not needed)

==================

Closes #2622 Multi engine support is theoretically here!

There are some big changes here:

  • TextureLoader is no longer a singleton, but an instance member on the ExcaliburGraphicsContextWebGL
  • We defer loading textures into webgl until the first draw call, this is needed to in order to upload to the multiple contexts. This shouldn't cause too much of an issue since we only need to do this if the image ever changes.
  • Additionally you must pass the gl context into the gl utility types

Needs a little more testing to make sure everything is still good. There is potentially some more refactoring opportunities as well to make this feel a little cleaner

image

Changes:

  • Refactor TextureLoader to not be static
  • Remove webgl adapter and pass gl context to gl helper types

@eonarheim eonarheim merged commit 862e7e0 into main May 6, 2023
@eonarheim eonarheim deleted the bugfix/2622-multi-engine-support branch May 6, 2023 04:31
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.

Running multiple engines creates errors in image-renderer
1 participant