Hi Robert, OK, I see, however I ran into troubles using CUDA together with doubles in viewports. The problem is that CUDA compiler invokes gcc with -malign-double parameter, which isn't the same as for osg. Hence whenever I want to access the values of a viewport in a CUDA code (actually C-code compiled with gcc by cuda compiler) I am not able to get proper values out of it. Hence one of the applications (either CUDA compiler ;) ) or OSG has to go in the direction of the other by either removing -malign-doubles (which I think wouldn't be done so easyly) or by adding this parameter to OSG compilation. However the second case isn't also a good solution, I think.
I tried to implement the viewport with int and it works fine. I think also using floats instead of doubles would be also fine (because no alignment is needed). Currently I am checking the case with float and also want to try to compile osg with -malign-doubles. Let see if it does help. I would let you know more soon... Art --- Robert Osfield <[EMAIL PROTECTED]> schrieb am So, 30.11.2008: > Von: Robert Osfield <[EMAIL PROTECTED]> > Betreff: Re: [osg-users] osg::Viewport doubles??? > An: [EMAIL PROTECTED], "OpenSceneGraph Users" > <osg-users@lists.openscenegraph.org> > Datum: Sonntag, 30. November 2008, 17:17 > Hi Art, > > On Sun, Nov 30, 2008 at 3:59 PM, Art Tevs > <[EMAIL PROTECTED]> wrote: > > 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. > > Not quite, it's not about passing data to OpenGL, > it's about handling > resizing down and back up again of viewports, if you do > this with > int's then you can never recover the original size of > the viewport > because of rounding. > > Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org