gtk-- and gl
- From: Brian Alexander Martin <briam cats ucsc edu>
- To: gtk-list redhat com
- Subject: gtk-- and gl
- Date: Thu, 19 Feb 1998 20:05:14 -0800 (PST)
I've been trying to convert the glgtk.c file from
ftp://ftp.gimp.org/pub/gtk/contrib/glgtk-demo.971104.tgz
to gtk--. I've got it compiling and putting up a window, but the openGL
stuff just doesen't seem to want to display anything. I think the problem
is related to a pretty big hack I made at one point.
The problem is that I need to find the GdkWindow structure associated with
the Gtk_DrawingArea I want to render openGL to. In the c version this was
done by accessing the window element off of the drawing area. The window
element is in the _GtkWidget structure. I was having problems figuring
out how to do this with gtk--, and eventually I came up with the following
beast:
(((GtkWidget *)(((Gtk_Widget*)glarea)->gtkobject))->window)
The c version was this:
glarea->window
What I had to do was to cast first to a Gtk_Widget * to get the gtkobject
element (C structure) and then cast to a GtkWidget * (again C) to get to
the window element. This compiles and runs, but I don't get any openGL.
Any ideas?
thanks,
Brian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]