I don't know why, but I got some issues with Ruby OpenGL lately. I have some weird errors within a glBegin...glEnd block, like the one below :
`glEnd': invalid operation for glEnd (Gl::Error)
I found something that seems related, but kinda old, on this board :https://www.libgosu.org/cgi-bin/mwf/topic_show.pl?tid=570
I went with the minimal code I can get to test it out :
include Gl, Glu
class Window < Gosu::Window
super(640, 480, false)
exit if id == Gosu::KbEscape
glVertex3f(10, 10, 0)
glVertex3f(110, 10, 0)
glVertex3f(110, 110, 0)
glVertex3f(10, 110, 0)
In this case, because of the exception handling, the program doesn't crash and the quad is displayed on the screen. If I comment the begin...rescue, I get the error I mentionned.
I only get this error on lauching the program, doesn't seem to occur later. Would someone have an idea ?
Thanks a lot !