On 12/21/06, Jeremy L. Moles <[EMAIL PROTECTED]> wrote:
On Thu, 2006-12-21 at 16:49 -0500, Jeremy L. Moles wrote:
> On Thu, 2006-12-21 at 21:46 +0000, Robert Osfield wrote:
> > Hi,
> >
> > The easist way to do it is first have a look at the
> > osgViewer::SimpleViewer and osgsimple, osgkeyboadmouse and
> > osgsimpleview* examples in CVS. None of the these are gtk based but
> > it really shouldn't be hard to link it up once you see how the OSG can
> > be wired up to other toolkits.
>
sorry , but, not of them have gtk window ?? I don't understand all
could you be more precisely. THe only thing I try to do is connect a
pyramid osg in a gtkdrawingarea (constructed with glade)
> You'll probably need to connect the GLScene object to an event called
> "display" in a user-defined callback (at least that's how it works in
> Python). This gets called once per frame, so it's where you'll use your
> SceneView object to communicate with the current, implicit context.
Actually, my summation is off here a bit--I assumed that 1) you were
using GtkGlExt and 2) the Python API was 1:1 w/ the C library.
Apparently, in gtkglext, you "give" a widget GL capability (such as a
DrawingArea).
Ignore it for now and I'll work up a real example later...
> If I make an example doing this, would it go in OSG? osgsimpleviewerGTK
> or whatever?
>
> > Robert.
> >
> > On 12/21/06, elekis <[EMAIL PROTECTED]> wrote:
> > > hi all,
> > >
> > > I have to do some simulations in c++, and for the first time, I have
> > > to use the gtk and osg.
> > > I have to use osg in a gtk window(drawingarea I suppose) and the
> > > inteface is creating with libglade.
> > >
> > > but I have lots of difficult.
> > > is there any tutorial example or anything other stuff who can help
> > > me to connect this three library ..???
> > >
> > > for example. there is my glade file.
> > >
> > >
--------------------------------------------------------------------------------------------------------------
> > > <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> > > <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
> > > <!--Generated with glade3 3.0.2 on Thu Dec 21 18:41:06 2006 by [EMAIL
PROTECTED]>
> > > <glade-interface>
> > > <widget class="GtkWindow" id="window1">
> > > <child>
> > > <widget class="GtkDrawingArea" id="drawingarea1">
> > > <property name="visible">True</property>
> > > </widget>
> > > </child>
> > > </widget>
> > > </glade-interface>
> > >
----------------------------------------------------------------------------------------------------------------
> > >
> > > like you see it's just a simple window with a drawingarea.
> > >
> > > and there is my c++ file.
> > >
--------------------------------------------------------------------------------------------------------------
> > > #include <gtk/gtk.h>
> > > #include <glade/glade.h>
> > >
> > > int main (int argc, char **argv)
> > > {
> > > GladeXML *xml;
> > > gtk_init(&argc, &argv);
> > >
> > > glade_init();
> > > xml = glade_xml_new("../ConfigFile/WindowsView.glade", "window1",
NULL);
> > >
> > > if (!xml) {
> > > g_warning("problem while loading the .glade file");
> > > return 1;
> > > }
> > > GtkWidget *window1 = glade_xml_get_widget (xml, "window1");
> > > gtk_widget_show (window1);
> > > gtk_main();
> > >
> > > return 0;
> > > }
> > >
------------------------------------------------------------------------------------------------------------------------
> > >
> > > like you see too, it's not so complicate but How to connect the osg
> > > with the drawing area.
> > > is a drawing area I have to use (that's what I read, but how to use
> > > gtkmm with it??)
> > >
> > > thanks a lot.
> > > _______________________________________________
> > > osg-users mailing list
> > > [email protected]
> > > http://openscenegraph.net/mailman/listinfo/osg-users
> > > http://www.openscenegraph.org/
> > >
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> > http://openscenegraph.net/mailman/listinfo/osg-users
> > http://www.openscenegraph.org/
> >
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/