class SFML::Window

A bare window with input + an OpenGL context, without SFML’s 2D batcher. Use this when you want raw OpenGL (or another rendering library) and just need SFML to manage the platform-level window and event loop. For 2D drawing with SFML’s API, you want SFML::RenderWindow instead.

win = SFML::Window.new(800, 600, “GL”) while win.open? win.each_event do |event| case event in {type: :closed} then win.close in {type: :key_pressed, code: :escape} then win.close else end end

# ... draw with raw OpenGL calls here ...

win.display

end