开发者

Drawing in several windows with gl/glx

开发者 https://www.devze.com 2023-01-11 05:16 出处:网络
I am looking at the NeHe OpenGL tutorials (nehe.gamedev.net), which as almost every example also for Linux/glx.

I am looking at the NeHe OpenGL tutorials (nehe.gamedev.net), which as almost every example also for Linux/glx.

But how can ope开发者_如何学Gon several windows and draw into all of them? Thanks!


Creating more than one window is easy, just repeat the procedure. If you want to draw the same scene to different windows, you can draw the scene using multiple render targets. Google knows lots of tutorials for that.

If you want to draw different things into different windows, you can either use multiple OpenGL instances in separate threads/processes or use so-called swap-chains in Direct3D. I don't know exactly how to translate them into OpenGL. You can share a single OpenGL device between multiple rendering threads using makeCurrent(). Sharing common resources is not trivial though.

0

精彩评论

暂无评论...
验证码 换一张
取 消