[racket] No OpenGL on canvas created by button click

From: Johnny Morrice (spoon at killersmurf.com)
Date: Sat Apr 16 09:31:30 EDT 2011

Hello list,

In racket 5.1 from the gentoo lisp overlay,

When I create an canvas% after a button press, it does not
support OpenGL.

This does not occur with a canvas created immediately on a frame%.

Have a look at the attachment to see if you can replicate this:

$ gracket works.rkt
Canvas has a GL context

$ gracket dont_work.rkt
(object:button% ...)
GtkGLExt: gtk_widget_set_gl_capability: assertion `!GTK_WIDGET_REALIZED
(widget)' failed
Canvas does not have a GL context

Is this a bug or am I doing it wrong?

I don't know GTK but I did some research and it seems the GTK assertion
means the canvas is not on the screen.

I'm not really sure how to approach that, I did some tinkering with
turning the frame on and off before canvas creation, made no difference.

Rapt with anticipation,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opengl-button-canvas.tar.gz
Type: application/x-gzip
Size: 541 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20110416/4c26dcda/attachment.gz>

Posted on the users mailing list.