The driver is the first thing I suspected as well. So I modified my old fbo test app ( http://www.reallyslick.com/src/fbo.tar.gz ) by shrinking the FBO's viewport. That demo is pure OpenGL, and uses GLEW for extension code. It worked perfectly with weird viewports, so my driver is fine. Of course, six months ago there easily could have been driver problems as well :)
I'm guessing it's just some little logic problem related to how osg::Viewports are applied, but digging through the OSG code hasn't gotten me anywhere yet. Please note that this problem isn't just restricted to FBO. All the render target implementations had some problem with using shrunken viewports.
- Terry
Message: 42
Date: Mon, 24 Jul 2006 09:23:10 +0100
From: "Robert Osfield" < [EMAIL PROTECTED]>
Subject: Re: [osg-users] CameraNode viewport problems
To: "osg users" <[email protected] >
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi Terry,
I have tried to render to portions of a FBO before but always failed,
only using the same size viewport as the textures has only ever work
for me. When I experimented with this (over six months ago) I came to
the conclusion that it was most like a driver restriction.
Robert.
On 7/24/06, Terry Welsh <[EMAIL PROTECTED]> wrote:
> I can't seem to get a properly rendered texture from a CameraNode if I
> change the viewport to be something other than the full size of the texture
> attached to it. For example, in
> osgshadowtexture/CreateShadowedScene.cpp if line 128 is
> changed from
>
> camera->setViewport(0,0,tex_width,tex_height);
>
> to
>
> camera->setViewport(0,tex_height/2,tex_width,tex_height/2);
>
> then no image is rendered at all. If the render target implementation is
> set to FRAME_BUFFER then an image is rendered, but it seems to ignore the
> viewport setting and renders to the full texture size.
>
> Sorry I don't have a fix yet. Was hoping somebody who knows the code
> better might know what is causing the trouble. Otherwise, I can probably
> look at this in more detail in a couple weeks....
> --
> Terry Welsh - mogumbo 'at' gmail.com
> www.reallyslick.com | www.mogumbo.com
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
