Skip to content

How to simultaneously visualize and render offscreen? #35

Discussion options

You must be logged in to vote

If you can render to two windows with GLFW, to my knowledge the only thing you still need is to start the second window invisible with glfwWindowHint(GLFW_VISIBLE, 0) as in record.cc.

If I understand the documentation correctly there is another way for offscreen rendering already implemented which skips GLFW.
In the model xml you can define offheight and offwidth for the visual element, which determines the size of the offscreen buffer.
After rendering your main window you mjr_setBuffer to OFFSCREEN, render again, and mjr_readPixels, before setting the buffer back again. This way you do not have to open two GLFW windows or contexts.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@aseembits93
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@aseembits93
Comment options

Answer selected by aseembits93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants