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

Added SharedContext class that allows you to create a shared context … #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

holoeye-photonics
Copy link
Contributor

…for another thread.

Some extra notes:

  • Keep in mind that core::beginRendering() always sets the context in the core current. So you should consider not using a shared context for the render thread but the actual core context instead. You can use core::makeContextCurrent() for this.
  • There is a class Mem2Native that can handle uploading texture asynchronously.
  • The following post suggests that using shared contexts is not desirable due to the graphics driver mutexing any commands anyway on shared contexts. https://forums.libsdl.org/viewtopic.php?p=41512#41512

@frankinshtein
Copy link
Contributor

frankinshtein commented May 5, 2017

btw,

  1. Mem2Native - deprecated
  2. for async textures loading there is https://github.com/oxygine/oxygine-framework/blob/master/oxygine/src/res/CreateResourceContext.h

@holoeye-photonics
Copy link
Contributor Author

Hi Denis,

thanks for the info. However we do not use the engine for games and need a very strict texture loading pipeline so CreateResourceContext is not predictable enough for us timing wise. But I also think that having shared contexts is not an ideal approach here so we will probably also end up not using them.
But the code is there and working so I felt I could just publish it anyway, maybe it is good use to someone.

Thanks for your time,
Dan

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.

2 participants