Hello,
I checked the lighting and that is not the problem. But I tried to implement a
osgViewer::Viewer in the application (after the gtk main loop). Now I have the
same problem in the osgViewer. But the cessna.osg looks fine, when I comment
all GTK stuff out. Ergo, I think the problem is anywhere in gtk?!
Now a little example, at which the problem occurs. I create a gtk window and
after the main loop an osgViewer. Without the gtk stuff the cessna looks fine
and with the gtk window the cessna looks very rough and black.
int main( int argc, char *argv[] )
{
/* Pointer auf Struktur GtkWidget (wird für Fenster und Button benötigt) */
GtkWidget *window;
// Inits
gtk_init (&argc, &argv);
// Window erzeugen
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK
(gtk_main_quit), NULL);
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
// automatsiches Aktualisieren, wenn sich was bei den Children ändert
gtk_container_set_reallocate_redraws (GTK_CONTAINER (window), TRUE);
// Widgets anzeigen
gtk_widget_show (window);
gtk_main ();
osgViewer::Viewer* viewer = new osgViewer::Viewer();
osg::Group* root = new osg::Group();
root->addChild(osgDB::readNodeFile("cessna.osg"));
viewer->setSceneData(root);
viewer->realize();
viewer->run();
return 0;
}
Incidentally, I use the gtk 2.0.
Cheers,
Martin
>It looks like a lighting issue. It looks like lighting is turned on for the
>scene, >but there are no lights. You might look for stateSet calls related to
>lighting. >Otherwise you could try and force lighting to be off.
> Andy
-----Original Message-----
From: osg-users-bounces at lists.openscenegraph.org on behalf of Martin Großer
Sent: Fri 5/9/2008 3:01 PM
To: jeremy at emperorlinux.com; 'OpenSceneGraph Users'
Subject: Re: [osg-users] Problem with osgviewerGTK example
It happens only in the GTK and when I press the "60 FPS" button than is the
same problem with the model, only the the mouse navigation has change. When
I use the osgViewer or the osgCompositeViewer the model looks normal.
I use OpenSceneGraph 2.4 and fedora 8, is this information helpful?
Cheers,
Martin
On Fri, 2008-05-09 at 13:30 +0200, "Martin Großer" wrote:
> Hello,
>
> when I use the osgviewerGTK, I see a very simplistic model and it is
black. For example I used the cessna.osg file and I made a picture. I have
attach the picture to this mail.
>
> What could be the problem?
Does this happen on all viewers, or just the GTK one? Also, what happens
when you toggle on the "60 FPS" button?
> Cheers,
>
> Martin
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org