Hello Francesco,

Francesco Tamagni wrote:
> hi to all.
> i heavily use fake FBOs ( setFBOOn( false ) ).
> 
> the problem is that i expect that fake FBOs, as they inherit from 
> Viewport, behaves like Viewports when i resize them ( setSize() ). 
> Instead, i discovered that FBOs do this:
> 
>      Window *win = action->getWindow();
> 
>      // Let the window handle resizes, to avoid interfering with the
>      // FBOViewports settings
> 
>      win->resizeGL();
> 
> before each render. this basically does glViewport() using full window 
> size... but if i did setSize to render on a sub-portion of screen, it is 
> ignored and the content are rendered on the full window.

have you tried using the SFStorageHeight SFStorageWidth fields ? AFAIUI 
this can be used to set the size of the texture that is created and if 
the window is larger than that texture it was my understanding that the 
FBOViewport only renders to a part of the window.

> there are two possible solutions to this problem:
> 
> 1 - don't use fake fbo, use true ones.
> 2 - let setFBOOn(false) interfere with FBOViewports settings
> 
> + solution 1 has the drawback that i have to replicate a lot of code to 
> support video cards on which FBOs don't work, using big IFs

ideally, the only difference between real and faked FBOs should be the 
performance...

> + solution 2 has the drawback that it is not semantically consistent 
> with FBOs (that doesn't support offsets), but is semantically consistent 
> with the Viewport concept, from which OpenSG derives FBOs...

hm, I don't quite understand what you are referring to with offsets 
above. The fact that FBOViewport draws into framebuffer 0 (i.e. the 
window) when emulating FBOs is just because in that case it's the only 
available framebuffer ;)

        Regards,
                Carsten

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to