+ if (!attribList)
+ {
+ int data[] = { GLX_RGBA,
+ GLX_DOUBLEBUFFER,
+ GLX_DEPTH_SIZE, 1,
+ None };
+ attribList = (int*) data;
+ }
+
+ Display *dpy = GDK_DISPLAY();
+
+ g_vi = glXChooseVisual( dpy, DefaultScreen(dpy), attribList );
+
+ GdkVisual *visual = gdkx_visual_get( g_vi->visualid );
+ GdkColormap *colormap = gdk_colormap_new( gdkx_visual_get(g_vi->visualid), TRUE );
+
+ gtk_widget_push_colormap( colormap );
+ gtk_widget_push_visual( visual );
+
+ m_glWidget = gtk_drawing_area_new();
+ gtk_widget_set_events( m_glWidget,
+ GDK_EXPOSURE_MASK |
+ GDK_POINTER_MOTION_HINT_MASK |
+ GDK_POINTER_MOTION_MASK |
+ GDK_BUTTON_MOTION_MASK |
+ GDK_BUTTON1_MOTION_MASK |
+ GDK_BUTTON2_MOTION_MASK |
+ GDK_BUTTON3_MOTION_MASK |
+ GDK_BUTTON_PRESS_MASK |
+ GDK_BUTTON_RELEASE_MASK |
+ GDK_KEY_PRESS_MASK |
+ GDK_KEY_RELEASE_MASK |
+ GDK_ENTER_NOTIFY_MASK |
+ GDK_LEAVE_NOTIFY_MASK );
+
+ gtk_widget_pop_visual();
+ gtk_widget_pop_colormap();
+
+ wxScrolledWindow::Create( parent, id, pos, size, style, name );
+
+ gtk_myfixed_put( GTK_MYFIXED(m_wxwindow), m_glWidget, 0, 0 );
+
+ gtk_widget_show( m_glWidget );
+