Viewport consisting of multiple rectangles?

Started by
2 comments, last by Ingrater 16 years, 10 months ago
Hello, Are there any procedures in OpenGL to assign a viewport consisting of multiple rectangular areas? In DirectX 9, I think, I'm only able to have such viewport by using a second framebuffer(or render target) where I perform all the drawing routines. So after that I can copy all choosen rectangular areas to the first framebuffer. But what are the possibilities in OpenGL?
My spacesim project blog:http://www.simerge.com/
Advertisement
With glViewport you can configure in which area of the window you want to render, see nehe lesson 42

http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=42
http://3d.benjamin-thaut.de
Aem... Maybe I wasn't precise with my question.

I want to render once into a viewport consisting of multiple rectangles.

If a have a complex scene and 20 rectangles for example I can't afford to rerender this scene into each rectangle. I would like to tell OpenGL that he must render inside these 20 rectangles. Is there a function like glViewport which takes multiple rectangles as parameter?

Otherwise I must render into a second framebuffer or use the stencil buffer (which is worse).
My spacesim project blog:http://www.simerge.com/
You could render into an Texture and map these texture onto the rectangles.
To render on a texture use an fbo, se the fbo 101 article on this page for futher reference.
http://3d.benjamin-thaut.de

This topic is closed to new replies.

Advertisement