bundle install
to install itbundle exec ruby <pathtofile>
to run each lesson.using_nehe_lessons/lesson04.rb:18:in glClear': invalid operation (Gl::Error)
from using_nehe_lessons/lesson04.rb:18:in
draw'
from using_nehe_lessons/lesson04.rb:17:in gl'
from using_nehe_lessons/lesson04.rb:17:in
draw'
from using_nehe_lessons/lesson04.rb:51:in `show'
from using_nehe_lessons/lesson04.rb:51
gl{}
blocks. It now dawns on me that you may also do non-visual GL calls everywhere else. Is my guess right and your call fails outside of a gl{}
block?glGetError
, which will clear the error flag. I used it to trace down the error and apparently it happens where there is no GL code anyway; if you want you can do the same. I sometimes get an error before the first line of Texture#initialize
, but not right after Window#initialize
. The weird thing is that there is no GL or Gosu code inbetween those two places that could trigger an error.Window#initialize
(you can do so too to compare). In a quick test, it seems the flag is sometimes set at program startup… I added a check to every GL call in Gosu to verify that, of course the error is not deterministic :)ruby-opengl
to clear the error bit before every call, and then only check for new errors AFTER the call it's supposed to do.
glGetError
works.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill