On Wed, 2008-11-05 at 11:53 -0500, Jean-Sébastien Guay wrote:
> Hi Cedric,
> 
> > Waiting for the examples to compile, I'll check back in with the results 
> > soon.
> 
> There's a missing OSGANIMATION_EXPORT on the 
> osgAnimation::Bone::UpdateBone class.
> 
> With that added, all compiles correctly.
> 
> Running
> 
>    osganimationviewer osgAnimation/example.osg
> 
> gives a window with buttons at the bottom. If I click on the 2 left-most 
> buttons some text comes in and fades out. If I click on the right-most 
> button, a box in the bottom right corner comes in, and if I click on it 
> again it goes out of the screen. Is that the expected behavior?
> 
> I tried running
> 
>    osganimationviewer osgAnimation/avatar.osg
> 
> but I get a "disk error", and debugging I see that it's looking for a 
> file called
> 
>    "f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/brow.l.tga"
> 
> Those paths should probably be relative to the .osg file?
> 
> I didn't check other files in the .tar.gz.
> 
> One comment I have which applies to the osgWidget examples too (and I've 
> said this before, when testing the osgWidget examples): the window shows 
> up with its title bar outside the screen. It's very annoying. In 
> general, don't use

Everyone asks about this, so I'll try and put a comment in the code
somewhere to explain it. The bottom line is that it simply isn't
possible to create a pixel-aligned 2D interface in OSG without at least
initially forcing a window size. Sure, I could rely on whatever size the
user sets in their environment, but I need some way to keep the
orthorgraphic camera in sync with the actual dimensions of the
application window itself.

Normally, you rely on the RESIZE event in osgGA to inform you of this,
and for the most part it works (see src/osgWidget/ViewerEventHandlers)
for keeping you in sync with the size of the window. However, a RESIZE
event isn't generate for the initial size of the window, nor is it
generated when the window is asked to go into "fullscreen" mode.

Until there is some global way of "hooking" into the intial (and any
subsequent changes thereafter) window dimensions in a reliable way, we
simply have no choice. I spent an afternoon trying to get around this
with no avail. If someone can tell me how to get the initial window
size, I'll be more than happy to patch osgWidget. :) (I've posted asking
about this in the past with no response.) Until then, I do the best I
can with what I've got.

Now, if you don't care about having a truly pixel-aligned WindowManager
(GUI) then it doesn't matter, of course. But this results in very poor
interface quality.

>    viewer.setUpViewInWindow(0, 0, WIDTH, HEIGHT);
> 
> and just let the viewer set itself up, or use
> 
>    viewer.setUpViewInWindow(50, 50, WIDTH, HEIGHT);
> 
> so that it comes up in a sane place on the screen. (but I really suggest 
> to not use it, so that the user can use command-line args or environment 
> variables to set where the viewer will show up if he wants)
> 
> J-S

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

Reply via email to