Offscreen viewport
-
- Posts: 36
- Joined: Sat Feb 06, 2010 11:52 am
Offscreen viewport
I need to render to a viewport that is slightly off the screen. For example, instead of the viewport's top left coordinate being at 0,0 I would like it to be at -10,-10.
The problem is that all the video drivers have a setViewPort() function that clips to fixed dimensions (defined as the top left being at 0,0 and the bottom right set from the current getCurrentRenderTargetSize()).
Because this clipping results in my output dimensions changing (ie my output width and/or height are altered), this means that the projection is changed. Obviously, this results in rendering looking incorrect because it appears squashed.
I suspect that the reason for the clip is that OpenGL/DirectX cannot handle a viewport offscreen? Is that the case?
If so, does anyone have any idea as to how I can get around this limitation?
Thanks in advance!
The problem is that all the video drivers have a setViewPort() function that clips to fixed dimensions (defined as the top left being at 0,0 and the bottom right set from the current getCurrentRenderTargetSize()).
Because this clipping results in my output dimensions changing (ie my output width and/or height are altered), this means that the projection is changed. Obviously, this results in rendering looking incorrect because it appears squashed.
I suspect that the reason for the clip is that OpenGL/DirectX cannot handle a viewport offscreen? Is that the case?
If so, does anyone have any idea as to how I can get around this limitation?
Thanks in advance!
well you can render the scene to a texture and then render a screen quad slitly setoff with the texture applied that will work for sure.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
-
- Posts: 36
- Joined: Sat Feb 06, 2010 11:52 am
-
- Posts: 36
- Joined: Sat Feb 06, 2010 11:52 am
-
- Posts: 36
- Joined: Sat Feb 06, 2010 11:52 am
-
- Posts: 36
- Joined: Sat Feb 06, 2010 11:52 am
-
- Posts: 36
- Joined: Sat Feb 06, 2010 11:52 am
Pretty sure it would be easier to just use draw2DImage()...
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net