bindbc-raylib 0.4.0
Dynamic and static bindings to raylib
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
bindbc-raylib
This project provides both static (WIP) and dynamic bindings to the raylib.
Compile raylib
- Clone
raylib
:
$ git clone https://github.com/raysan5/raylib.git
- (Optional), create a new branch
bindbc
This binding is based on commit72443f8f25b1f8ded3b05da17857b7eeb1556b35
(May 2 11:56:24 2020 +0200)
$ git checkout -b bindbc 72443f8f
The tagged 3.0.0 relase is:
$ git log 3.0.0
commit 7ef114d1da2c34a70bba5442497103441647d8f3 (tag: 3.0.0)
Author: Ray <[email protected]>
Date: Wed Apr 1 11:07:01 2020 +0200
- Compile shared library (see raylib wiki)
$ cd raylib/src
$ make RAYLIB_LIBTYPE=SHARED
$ sudo make install RAYLIB_LIBTYPE=SHARED
Compile with raygui
- Clone
raygui
:
$ git clone https://github.com/raysan5/raygui.git
- Copy
raygui/src/*.h
toraylib/src
$ cd raygui
$ cp src/*.h ../raylib/src
- Modify
raylib/src/Makefile
in order to add icons support:
@@ -575,6 +575,7 @@ 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 '#define RAYGUI_SUPPORT_ICONS' >> raygui.c
echo '#include "$(RAYLIB_MODULE_RAYGUI_PATH)/raygui.h"' >> raygui.c
- Compile with raygui support (
RAYLIB_MODULE_RAYGUI=TRUE
)
$ make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED RAYLIB_MODULE_RAYGUI=TRUE
$ sudo make install PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED RAYLIB_MODULE_RAYGUI=TRUE
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 versions
to your dub file (see examples/gui
)
dub.json
"versions": [
"RAYGUI"
],
dub.sdl
versions "RAYLIB_260" "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 | raylib commit | Version ID |
---|---|---|
2.5.0 | Default | |
2.6.0 | 117696a8936007592f7fe7c0b7b227a805e3b74a | RAYLIB_260 |
3.0.0 | 72443f8f25b1f8ded3b05da17857b7eeb1556b35 | RAYLIB_300 |
dub.json
"versions": [ "RAYLIB_260" ],
dub.sdl
versions "RAYLIB_260"
Examples
You can find original raylib examples ported to D inside examples directory.
Dependencies
- Registered by o3o
- 0.4.0 released 4 years ago
- o3o/bindbc-raylib
- Boost
- Authors:
- Dependencies:
- none
- Versions:
-
0.9.1 2021-Oct-15 0.9.0 2020-Nov-04 0.8.0 2020-Oct-31 0.7.0 2020-Sep-11 0.6.0 2020-Aug-06 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
222 downloads total
-
- Score:
- 1.1
- Short URL:
- bindbc-raylib.dub.pm