# Full screen two second screen, and copy of buffers

**URL:** <https://discourse.glfw.org/t/full-screen-two-second-screen-and-copy-of-buffers/118>\
**Category:** support\
**Created:** [January 16, 2015, 8:06am UTC](https://discourse.glfw.org/t/full-screen-two-second-screen-and-copy-of-buffers/118 "2015-01-16T08:06:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [January 16, 2015, 8:06am UTC](https://discourse.glfw.org/t/full-screen-two-second-screen-and-copy-of-buffers/118/1 "2015-01-16T08:06:33Z")

</div>

**[karistouf](https://sourceforge.net/u/karistouf/)** wrote on [Friday, January 16, 2015](https://sourceforge.net/p/glfw/discussion/247562/thread/d030a99b/#06ad):

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)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [January 16, 2015, 10:26am UTC](https://discourse.glfw.org/t/full-screen-two-second-screen-and-copy-of-buffers/118/2 "2015-01-16T10:26:47Z")

</div>

**[dougbinks](https://sourceforge.net/u/dougbinks/)** wrote on [Friday, January 16, 2015](https://sourceforge.net/p/glfw/discussion/247562/thread/d030a99b/#06ad/aacd):

GLFW supports multiple windows and context sharing. See the documentation  
for details  
[http://www.glfw.org/docs/latest/group\_\_window.html#ga5c336fddf2cbb5b92f65f10fb6043344](http://www.glfw.org/docs/latest/group__window.html#ga5c336fddf2cbb5b92f65f10fb6043344)  
.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [January 17, 2015, 9:05am UTC](https://discourse.glfw.org/t/full-screen-two-second-screen-and-copy-of-buffers/118/3 "2015-01-17T09:05:46Z")

</div>

**[karistouf](https://sourceforge.net/u/karistouf/)** wrote on [Saturday, January 17, 2015](https://sourceforge.net/p/glfw/discussion/247562/thread/d030a99b/#eae5):

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 ?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [January 17, 2015, 9:32am UTC](https://discourse.glfw.org/t/full-screen-two-second-screen-and-copy-of-buffers/118/4 "2015-01-17T09:32:42Z")

</div>

**[dougbinks](https://sourceforge.net/u/dougbinks/)** wrote on [Saturday, January 17, 2015](https://sourceforge.net/p/glfw/discussion/247562/thread/d030a99b/#a9e2):

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](http://www.glfw.org/docs/latest/group__context.html#ga1c04dc242268f827290fe40aa1c91157) 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!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [January 18, 2015, 8:15am UTC](https://discourse.glfw.org/t/full-screen-two-second-screen-and-copy-of-buffers/118/5 "2015-01-18T08:15:40Z")

</div>

**[karistouf](https://sourceforge.net/u/karistouf/)** wrote on [Sunday, January 18, 2015](https://sourceforge.net/p/glfw/discussion/247562/thread/d030a99b/#9bc1):

ok. thanks doug.
