pi@raspibplus ~/Code/Ruby/Gosu $ ruby test.rb
/usr/local/lib/ruby/gems/2.2.0/gems/gosu-0.9.2/lib/gosu/swig_patches.rb:19:in initialize': Could not create window: Could not initialize OpenGL / GLES library (RuntimeError)
from /usr/local/lib/ruby/gems/2.2.0/gems/gosu-0.9.2/lib/gosu/swig_patches.rb:19:in
initialize'
from test.rb:4:in initialize'
from test.rb:15:in
new'
from test.rb:15:in `<main>'
terminate called after throwing an instance of 'std::runtime_error'
what(): Could not create window: Could not initialize OpenGL / GLES library
Aborted
pi@raspibplus /usr/local/lib/ruby/gems/2.2.0/gems/gosu-0.8.7.2/examples $ gem list gosu
*** LOCAL GEMS ***
gosu (0.8.7.2)
pi@raspibplus /usr/local/lib/ruby/gems/2.2.0/gems/gosu-0.8.7.2/examples $ ruby Tutorial.rb
Tutorial.rb:84:in initialize': Could not open window: Could not initialize OpenGL / GLES library (RuntimeError)
from Tutorial.rb:84:in
initialize'
from Tutorial.rb:130:in new'
from Tutorial.rb:130:in
<main>'
gosu-examples
gem now: https://github.com/gosu/gosu-examples (a recent and not very well documented move)SDL_GL_CreateContext(window)
after creating the window and see what it returns?
printf("SDL_GL_CreateContext returns %d\n", int(SDL_GL_CreateContext(window)));
SDL_Window* window = SDL_CreateWindow("Test SDL 2", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
800, 600, SDL_WINDOW_SHOWN | SDL_WINDOW_OPENGL);
check_error_sdl(window == nullptr, "Unable to create window");
~/SDL2test $ ./sdl2_test
SDL_GL_CreateContext returns 1
~/SDL2test $
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill