Skip to content

Haxe bindings for raylib, a simple and easy-to-use library to learn videogame programming

License

Notifications You must be signed in to change notification settings

micomuko/raylib-hx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

raylib-hx Logo

raylib-hx

Stars License Forks

Haxe bindings for raylib, a simple and easy-to-use library to learn videogame programming.

Check out the examples folder to see some code!

Requirements

  • Haxe 4.0.0 or above
  • (Windows only) MSVC v142 - VS 2019 C++ x64/x86 build tools
  • (Windows only) Windows 10 SDK

Installation

  • git clone https://github.com/ForeignSasquatch/raylib-hx --recurse-submodules -j8
  • haxelib dev raylib-hx raylib-hx

Usage

This is a basic example of the bindings which creates a window. In your project make a Build.hxml file with the following:

-cp [source folder]
-cpp [output folder]
-lib raylib-hx
-main [Main file]

Sample code:

class Main {
  static function main() {
    Rl.initWindow(1280, 720, "Hi");
    
    while(!Rl.windowShouldClose()) {
      Rl.beginDrawing();
      Rl.clearBackground(Rl.Colors.WHITE);
      Rl.endDrawing();
    }
    
    Rl.closeWindow();
  }
}

On Linux it's possible to use a system wide installation of Raylib instead of the source code provided with this repo.

Just add the --define shared_libs flag to your *.hxml file or to the command line.

Consider supporting

ko-fi

About

Haxe bindings for raylib, a simple and easy-to-use library to learn videogame programming

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Haxe 99.9%
  • C 0.1%