Re: Problem deriving GLArea widget

Following up:
I got the included test program to work by making the following change in At this point, I'm not sure if this is a complete and total fix, as I need to see if my full featured class can be used correctly.

<   if(base && base->create_context) {
< Glib::RefPtr<Gdk::GLContext> retval(Glib::wrap((*base->create_context)(gobj()),true));
<       return retval;
<   }
>   if(base && base->create_context)
>     return Glib::wrap((*base->create_context)(gobj()));

I'm assuming it's the take_copy argument passed to wrap?

On 04/22/2016 12:23 PM, Bill McGrory wrote:
I am trying to derive a widget off of Gtk::GLArea,
when I do, I get GLib-GObject-CRITICAL **: g_value_take_object: assertion 'G_IS_OBJECT (v_object)' failed
and "OpenGL context creation failed.

I have tracked this to
GdkGLContext* GLArea_Class::create_context_callback(GtkGLArea* self)

where a different path is taken whether or not the GtkGLArea self is derived or not. However, I don't know if I am not doing something correctly, or if this is a bug.

Any help would be apprectiate.

the following example demonstrates the problem under a ubuntu 16.04.


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