Full screen two second screen, and copy of buffers

karistouf wrote on Friday, January 16, 2015:

I would like to know if i can share openGL drawing between two GLFW renderes: one dedicated to éditing, second renderer for display.

what is the trick ?

the second renderer needs to be in full screen on the second output.

is it possible with GLFW ?

(it is on SFML, but i would like rather to stay on GLFW)

dougbinks wrote on Friday, January 16, 2015:

GLFW supports multiple windows and context sharing. See the documentation
for details
http://www.glfw.org/docs/latest/group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344
.

karistouf wrote on Saturday, January 17, 2015:

thanks for your reply, doug.

but there is missing really some examples in your documentation.
for example:
how to retrieve monitor, how to draw specifically on it.

and about the question: can i share between 2 renderes same buffer ?

dougbinks wrote on Saturday, January 17, 2015:

I didn’t write the documentation, but I think it’s excellent. It does answer your question about retrieving monitors (see the links in the section I referred you too).

To draw to different windows you need to understand OpenGL contexts, which is part of the OpenGL API. The GLFW API provides the function glfwMakeContextCurrent for switching contexts. Context sharing provides the requried functionality for sharing buffers, see the OpenGL docs on this and the GLFW one I referred you too on setting up a shared context.

Good luck!

karistouf wrote on Sunday, January 18, 2015:

ok. thanks doug.