How to create an OpenGL 3.x or 4.x context in Ruby?

I looked everywhere, but there the seam was not ruby, which would create an OpenGL 3/4 context.

It does not have to be the complete OpenGL binding library, just the part that creates the OpenGL context.

Update: If I am desperate, I will partially bind rubfw ruby ​​with ruby ​​ffi. So save me from this;)

+4
source share
1 answer

I wrote a library that can create an OpenGL 3 or 4 context on most platforms (provided that it is supported). It is called Ray . You do not need to use your attractive system or DSL, you can just use it to create a window and OpenGL context.

Ray::GL.major_version = 3 Ray::GL.minor_version = 2 Ray::GL.core_profile = true # if you want/need one window = Ray::Window.new("test", [640, 480]) window.make_current # You can make OpenGL calls yourself now 
+8
source

All Articles