Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Ruby Wrapper Using FFI  (Read 608 times)

0 Members and 1 Guest are viewing this topic.


  • Newbie
  • *
  • Posts: 23
    • View Profile
Ruby Wrapper Using FFI
« on: June 05, 2020, 09:47:06 pm »
Hello all,

I have made a wrapper for SFML in the Ruby programming language. This updates it to 2.5. It is based off the C port of SFML. I used FFI to help make things easier. I have most of the modules wrapped. The only one I don't have wrapped is the Net module. I noticed the last SFML wrapper for Ruby hasn't been updated in a long time. I don't have this on Github or anything yet. Just wondering if anyone would be interested?

Here is a brief example of the wrapper using FFI.
attach_function :sfRenderWindow_create,[:uint,:uint,:uint,:string,:uint32,:pointer],:pointer

require 'ffi'
#don't run infinite loop
x = Graphics.sfRenderWindow_create(800,600,32,"SFML",0,nil)
while Graphics.sfRenderWindow_isOpen(x)