bindbc-raylib 0.1.0

Dynamic and static bindings to raylib


To use this package, run the following command in your project's root directory:

bindbc-raylib

This project provides both static (WIP) and dynamic bindings to the raylib.

Compile raylib

  1. Clone raylib:
$ git clone https://github.com/raysan5/raygui.git
  1. Compile shared library (see raylib wiki)
$ make RAYLIB_LIBTYPE=SHARED
$ sudo make install

Compile with raygui

  1. Clone raygui:
$ git clone https://github.com/raysan5/raygui.git
  1. Copy raygui/src/*.h to raylib/src

$ cd raygui
$ cp src/*.h ../raylib/src
  1. Modify src/Makefile (see raylib issue 1103)
@@ -571,11 +571,13 @@ raudio.o : raudio.c raylib.h

 # Compile raygui module
 # NOTE: raygui header should be distributed with raylib.h

-raygui.o : raygui.c raygui.h
-       @echo #define RAYGUI_IMPLEMENTATION > raygui.c
-       @echo #include "$(RAYLIB_MODULE_RAYGUI_PATH)/raygui.h" > raygui.c
+raygui.o : raygui.c raygui.h gui_textbox_extended.h ricons.h
        $(CC) -c $< $(CFLAGS) $(INCLUDE_PATHS) -D$(PLATFORM) -DRAYGUI_IMPLEMENTATION

+raygui.c:
+       echo '#define RAYGUI_IMPLEMENTATION' > raygui.c
+       echo '#include "$(RAYLIB_MODULE_RAYGUI_PATH)/raygui.h"' >> raygui.c
  1. Compile with raygui support (RAYLIB_MODULE_RAYGUI=TREU)
$ make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED RAYLIB_MODULE_RAYGUI=TRUE

In order to use raygui support, add

versions "RAYGUI"

to your dub file (see )xamples/gui)

Add bindbc-raylib to your project

Add the package as a dependency in your dub.json or dub.sdl package description:

dub.json

"dependencies": {
    "bindbc-raylib": "~>0.1.0"
}

dub.sdl

dependency "bindbc-raylib" version="~>0.1.0"

Enable raygui

To enable raygui add the versions to your dub file

dub.json

"versions": [
    "RAYGUI"
],

dub.sdl

versions "RAYLIB261" "RAYGUI"

Enable support for raylib versions

Raylib versions can be configured by adding the appropriate version to a versions directive in your dub file

| raylib Version | Version ID | | --- | --- | | 2.5.0 | Default | | 2.6.1 | RAYLIB261 |

dub.json

"versions": [ "RAYLIB216" ],

dub.sdl

versions "RAYLIB216"

Examples

You can find original raylib examples ported to D inside examples directory.

Dependencies

Authors:
  • Orfeo Da ViĆ 
Dependencies:
none
Versions:
0.4.0 2020-May-21
0.3.0 2020-May-06
0.2.0 2020-Feb-19
0.1.0 2020-Feb-18
~master 2020-May-25
Show all 5 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 4 downloads this month

  • 10 downloads total

Score:
0.9
Short URL:
bindbc-raylib.dub.pm