Viewport consisting of multiple rectangles?
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?
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://nehe.gamedev.net/data/lessons/lesson.asp?lesson=42
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).
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).
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.
To render on a texture use an fbo, se the fbo 101 article on this page for futher reference.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement