Gtkglextmm and glew problems & questions

i have an application that uses gtkglextmm 1.2 and the extension version supported is 1.4.

i dont know if this is possible, but i want to initialize glew too, so i have this code and glewinit fails.


int main(int argc, char **argv){
    GLenum initStatus = glewInit();
    if( initStatus != GLEW_OK ){
         printf( "*GLEW Cannot Init
");
    }
    if( GLEW_ARB_vertex_buffer_object == NULL ){
         printf( "*GLEW_ARB_vertex_buffer_object = NULL
");
    }
    Gtk::Main m(argc, argv);

    // Init gtkglextmm.
    Gtk::GL::init(argc, argv);

    // Query OpenGL extension version.
    int major, minor;
    Gdk::GL::query_version(major, minor);
    std::cout << "OpenGL extension version - "<< major << "." << minor << std::endl;
    GUIVentanaPrincipal gui;
    m.run(gui);

    return 0;
}

and this is my output:


*GLEW Cannot Init
*GLEW_ARB_vertex_buffer_object = NULL
OpenGL extension version - 1.4

why gtkglext support version is so low? also i dont know what is the problem with glewinit.

ok problem solved i was doing it on the wrong part!
i anyone has the same problem here goes the solution:
it is necessary to initialize a gtkglextmm context first.
what do i mean with this? create your opengl window first
then you can initialize glew correctly:
this is my output now.


*GLEW Initialized
*GLEW_ARB_vertex_buffer_object --- OK

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.