[GtkGLExt] Gears example



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?

Mick




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