Robert Osfield wrote:
> This is something you'll probably have to take up with Cywin
> development community.  My own thoughts on things to try yourself
> would to try a completely clean build, including removing
> OpenSceneGraph/CMakeCache.txt and then doing a fresh ./configure;make;
>   as there are chance it might locate the new libs better.

Robert,

I wanted to give you an update - OSG compiles now and the examples seem 
to work fine.  The undefined references were a result of some cross up 
headers for Opengl and GLUT which they seem to have resolved now.  
Several of the groups had to work together to clean up some of the 
headers. 

In testing the new version my build built osgviewerGLUT which I used as 
a test for the libglut32.a they had to update.  The example with the new 
library ran fine but osgviewerGLUT would keep on running even though the 
window closed when I hit escape (which it might be supposed to do).  
Also when I used the close box on the  window I received a segfault.  I 
reported this to them and one of them took a look at osgviewerGLUT and 
this is what he had to say:

> OSG completes its build now with the new libglut32.a.  
 
Excellent.
 
> It builds an example 
> program osgviewerGLUT.exe which opens a window and diplays an image.  
When I 
> click the close box on that window I get a segmentation fault when the 
app 
> closes.  The app will also close when you simply press the escape key. 
 This 
> leaves the process running in the background as if I had used the hack 
 
> -DGLUT_DISABLE_ATEXIT_HACK.
> When I used the escape I had to kill the process manually.  Not sure 
if this is 
> a glut issue or an issue with their example window but thought I would 
let you 
> know.
> bk
 
Hi Brian,
 
I took a look at osgviewerGLUT. Did that ever worked well with some 
previous version
of the opengl package? I see a few strange things:
 
void keyboard( unsigned char key, int /*x*/, int /*y*/ )
{
    switch( key )
    {
        case 27:
            // clean up the viewer 
            if (viewer.valid()) viewer = 0;
            glutDestroyWindow(glutGetWindow());
            break;
//...
    }
}

Typing esc only destroys the window without stopping the program, which 
continue with a
dangling viewer pointer; no wonder that you have to kill it manually. 
Instead of calling glutDestroyWindow(glutGetWindow()); it should call 
exit(0); , maybe after
calling delete viewer; .
 
void display(void)
{
    // update and render the scene graph
    if (viewer.valid()) viewer->frame();
    // Swap Buffers
    glutSwapBuffers();
    glutPostRedisplay();
}
 
glutPostRedisplay(); will have display() called again, so it creates an 
infinite loop.
It should not be there. glutPostRedisplay(); should rather be at the end 
of 
mousebutton, mousemove, and keyboard.

Closing the window with the (X) icon should result in simply calling 
exit(0) and destroying the 
window. As to why it segfaults, you would have to degug it, as I don't 
have
OpenSceneGraph installed.
 




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

Reply via email to