Re: [GtkGLExt] Gears example





2006/4/14, Timothy M. Shead <tshead k-3d com>:
On Thu, 2006-04-13 at 19:29 +0200, Mickael DREAN wrote:
> Hi there,
>
> I'm new with Gtkmm and GtkGlExtmm. I'm trying to put the "gears" example
> not into a Gtk::Window but into a Gtk::Frame (which is into a
> Gtk::Table) and it doesn't work.
>
>
> Glib::RefPtr<Gdk::GL::Config> glconfig;
>
>  // Try double-buffered visual
>  glconfig = Gdk::GL::Config::create(Gdk::GL::MODE_RGB    |
>                                     Gdk::GL::MODE_DEPTH  |
>                                     Gdk::GL::MODE_DOUBLE);
>  if (!glconfig)
>    {
>      std::cerr << "*** Cannot find the double-buffered visual.\n"
>                << "*** Trying single-buffered visual.\n";
>
>      // Try single-buffered visual
>      glconfig = Gdk::GL::Config::create(Gdk::GL::MODE_RGB   |
>                                         Gdk::GL::MODE_DEPTH);
>      if (!glconfig)
>        {
>          std::cerr << "*** Cannot find any OpenGL-capable visual.\n";
>          std::exit(1);
>        }
>    }
>
> In fact, it doesn't succeed to create the glconfig objet.
>
> Any idea to solve this problem?

Do any of the gtkglext examples work?  Are you initializing the library?

Tim



The example works without any problem when it inside a Gtk::Window. I will check the initialization of the library !
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]