24

I had a look at GtkGlExt, but it's only for GTK2. Unfortunately, after some hours of searching, it seems that no one take care of having something like an OpenGLDrawingArea…

Any information will be welcomed. Even if it's like "it's not possible for now".

Nikko
  • 4,182
  • 1
  • 26
  • 44
Adrien Clerc
  • 2,636
  • 1
  • 21
  • 26
  • How about using Clutter? – Jan Spurny Aug 24 '12 at 10:52
  • As described in the [developer's manual](http://developer.gnome.org/clutter/stable/clutter-overview.html): `Clutter works by manipulating a scene-graph of 2D surfaces, or 'actors', inside a 3D space.`. COGL can be used for that, as it is a small layer above OpenGL. However, it isn't possible to [use it smoothly in GTK+](https://mail.gnome.org/archives/gtk-devel-list/2011-October/msg00010.html) applications yet… – Adrien Clerc Aug 25 '12 at 06:15
  • Nobody has ever tried to do this? – Nikko Aug 28 '12 at 13:37
  • 2
    What platform are you trying to do this ? Xorg, Windows or OSX ? – count0 Aug 30 '12 at 14:35
  • the platform is Xorg on Linux – Nikko Aug 31 '12 at 09:09

1 Answers1

8

It looks like you have a few options here.

  1. Use an in-development port of gtkglext to gtk3
  2. Use SDL to draw into your GTK app by setting the SDL_WINDOWID environment variable
  3. Manage GLX yourself to create an OpenGL context for your GTK app.

I found a app spectrum3d which implements both of the first two alternatives.

The third option will be quite complex and is probably not worth pursuing.

Geoff Reedy
  • 34,891
  • 3
  • 56
  • 79