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

Double initialization of render stage #400

Open
j-o opened this issue Aug 22, 2017 · 1 comment
Open

Double initialization of render stage #400

j-o opened this issue Aug 22, 2017 · 1 comment
Labels

Comments

@j-o
Copy link
Contributor

j-o commented Aug 22, 2017

This call order is fine:

m_canvas->setOpenGLContext();
m_canvas->setRenderStage(...);

However, if called the other way around (as a result of my solution to #393), the render stage is initialized twice: once during setOpenGLContext() and once during the first call to render() (without intermediate deinitialization).

Solution ideas:

  • add m_contextInitialized flag to Canvas
  • Stage stores a pointer to the context it has been initialized with that can be checked by the Canvas
@j-o j-o added the bug label Aug 22, 2017
@j-o
Copy link
Contributor Author

j-o commented Aug 22, 2017

I like the second idea because it just so happens that I have a Stage that needs this information anyway ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant