Hi Ricardo,

I have to shame that I still haven't officially tagged new osgppu version which 
supports resizing. All the changes are only in the svn.
As to your suggestions, I think it should be set to user to change the aspect 
ratio. The reason is that the osgPPU does actually not know anything about 
projection matrix. osgPPU works purelly in 2D domain. Hence moving the work of 
updating projection matrix to osgPPU might be a wrong way to do it.

I think it might make more sense to put that projection matrix update somewhere 
in to update routines of the camera or the viewer.

cheers
art


Riccardo Corsi wrote:
> 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 < ()> 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 
> > (http://forum.openscenegraph.org/viewtopic.php?p=27014#27014)
> > 
> > 
> > 
> > 
> > 
> > 
> > _______________________________________________
> > osg-users mailing list
> >  ()
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
> > (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> > 
> > 
> > 
> 
> 
>  ------------------
> Post generated by Mail2Forum


------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=31306#31306





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to