Hi there, I rise again this pretty old thread to add a detail: the aspect ratio of the camera is not automatically corrected when resizing the viewport. Is this operation left to users on purpose to be more generic?
If you think it might be useful to integrate it in the resizeViewport method - maybe with an optional flag? - it is as simple as adding a call like: camera->setProjectionMatrixAsPerspective(fovy, ar, zNear, zFar); with the new AR, within the resizeViewport() method. I tested on my side and works as expected. Cheers, ricky On Tue, Apr 20, 2010 at 15:56, Art Tevs <[email protected]> wrote: > Hi folks, > > so, I just realized that the solution I posted yesterday is the same as was > proposed by Mick. > > I just implemented another solution for proper resizing. You can find it in > the svn. With the current implementation resizing works like a charm with > almost any example (motionblur still make some small issues). Take a look > into the viewer or HDR or DoF example, all of them works. > > There were several issues, I had to correct. One of them was to force to > call osg::Texture::dirtyTextureObject() after resizing. In osg code if you > call setTextureSize, then nothing else happens :( With this change it works > better. Additionaly I put the solution as proposed by Mick and changed the > size of every texture of the camera. Just take a look into examples. I will > go for a release of osgPPU v0.6 (for osg 2.8.3) in the next days, I think. > > I hope now, the problem can be seen as solved to 95% :) > > > Cheers, > Art > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=27014#27014 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

