Shouldn't then the method, which scales the viewport, take care of casting?
Because based on OpenGL Specification viewport is per definition an integer 
value.


--- Robert Osfield <[EMAIL PROTECTED]> schrieb am So, 30.11.2008:

> Von: Robert Osfield <[EMAIL PROTECTED]>
> Betreff: Re: [osg-users] osg::Viewport doubles???
> An: "OpenSceneGraph Users" <[email protected]>
> Datum: Sonntag, 30. November 2008, 16:51
> Hi Art,
> 
> osg::Viewport now has doubles to enable scaling of a the
> viewport
> relative to a window that has vary size.
> 
> The performance involved in casting should be negligible
> given that
> you'll only be doing a once or twice a frame.
> 
> Robert.
> 
> On Sun, Nov 30, 2008 at 3:46 PM, Art Tevs
> <[EMAIL PROTECTED]> wrote:
> > Hi folks.
> >
> > Can somebody explain me what is actually the reason
> having double as type for the osg::Viewport variables (x, y,
> width and height)?
> > We have now always to cast (static_cast) in the
> Viewport::apply method and  if I need that values too, I
> have also to cast. I think this is an avoidable performance
> leak, isn't it?
> >
> > Cheers,
> > art
> >
> >
> >
> >
> >
> > _______________________________________________
> > 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


      
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to