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

Example: Multiple Windows #224

Open
bryphe opened this issue Jan 20, 2019 · 2 comments
Open

Example: Multiple Windows #224

bryphe opened this issue Jan 20, 2019 · 2 comments
Labels
A-other Area: Other, does not fit neatly into any of the other buckets example help wanted Extra attention is needed

Comments

@bryphe
Copy link
Member

bryphe commented Jan 20, 2019

The Revery API supports creating multiple Windows via multiple calls to App.createWindow:

let createWindow =

I'd like to have an example that exercises this behavior. The example could consist of a single Button labeled "New Window". When clicked, App.createWindow would be called with a new Window with a very simple primitive (like, just a <Text /> saying "This is Window X")

There is one blocker to this:

  • We need to set up our Windows to share the same OpenGL context. When creating OpenGL assets like buffers/textures/compiled shaders/etc, these are associated with an OpenGL context. The GLFW API supports sharing an OpenGL context between Windows: https://www.glfw.org/docs/latest/context_guide.html (See "Context Object Sharing"). However, our glfwCreateWindow wrapper doesn't support this - we'd need to also add an API for this
  • Once we have the glfwCreateWindow API with an additional argument for passing a window context, we can pass/share the context w/ the App.createWindow. The consumer of the API should never have to care about 'Window Context Sharing' - we should take care of that automatically.
@canadaduane
Copy link

canadaduane commented May 19, 2019

Is it possible to have multiple windows at this stage? I can call createWindow multiple times (and I get a window for each call) but the UI is only shown & responsive in the window that I pass to UI.start.

@Et7f3
Copy link
Member

Et7f3 commented May 19, 2019

Here is a work in progress for multiple windows support #235

@glennsl glennsl added the A-other Area: Other, does not fit neatly into any of the other buckets label Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-other Area: Other, does not fit neatly into any of the other buckets example help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants