Skip to content

Commit f17235c

Browse files
committed
Upgrade bindings to raylib 5.5
Fix windows patch
1 parent c0e66dc commit f17235c

File tree

16 files changed

+1198
-378
lines changed

16 files changed

+1198
-378
lines changed

dune-project

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,5 @@
4444
(depends
4545
(dune (>= 3.17))
4646
yojson
47-
re))
47+
re
48+
containers))

examples/core/core_3d_picking.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ let rec loop camera collision ray =
5454
match (is_mouse_button_pressed MouseButton.Left, collision) with
5555
| true, true -> (false, None)
5656
| true, false ->
57-
let r = get_mouse_ray (get_mouse_position ()) camera in
57+
let r = get_screen_to_world_ray (get_mouse_position ()) camera in
5858
let collision =
5959
get_ray_collision_box r
6060
(BoundingBox.create

examples/core/core_vr_simulator.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ let setup () =
1313
set_v_resolution hmd 1200;
1414
set_h_screen_size hmd 0.133793;
1515
set_v_screen_size hmd 0.0669;
16-
set_v_screen_center hmd 0.0478;
1716
set_eye_to_screen_distance hmd 0.041;
1817
set_lens_separation_distance hmd 0.07;
1918
set_interpupillary_distance hmd 0.07;

src/c/dune

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
(copy vendor/raylib/src/libraylib.a libraylib.a)
3434
(run make -C vendor/raylib/src clean)
3535
(run make -C vendor/raylib/src RAYLIB_LIBTYPE=SHARED -j 8)
36-
(copy vendor/raylib/src/libraylib.so.5.0.0 dllraylib.so)))))
36+
(copy vendor/raylib/src/libraylib.so.5.5.0 dllraylib.so)))))
3737

3838
(rule
3939
(alias build-raylib)
@@ -53,7 +53,7 @@
5353
(copy vendor/raylib/src/libraylib.a libraylib.a)
5454
(run make -C vendor/raylib/src clean)
5555
(run make -C vendor/raylib/src RAYLIB_LIBTYPE=SHARED -j 8)
56-
(copy vendor/raylib/src/libraylib.5.0.0.dylib dllraylib.so)))))
56+
(copy vendor/raylib/src/libraylib.5.5.0.dylib dllraylib.so)))))
5757

5858
(rule
5959
(alias build-raylib)
@@ -104,4 +104,4 @@
104104
(copy vendor/raylib/src/libraylib.a libraylib.a)
105105
(run gmake -C vendor/raylib/src clean)
106106
(run gmake -C vendor/raylib/src RAYLIB_LIBTYPE=SHARED -j 8)
107-
(copy vendor/raylib/src/libraylib.5.0.0.so dllraylib.so)))))
107+
(copy vendor/raylib/src/libraylib.5.5.0.so dllraylib.so)))))

src/c/enable_formats.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
diff --git a/vendor/raylib/src/config.h b/vendor/raylib/src/config.h
22
--- a/vendor/raylib/src/config.h
33
+++ b/vendor/raylib/src/config.h
4-
@@ -148,9 +148,9 @@
4+
@@ -165,9 +165,9 @@
55
//------------------------------------------------------------------------------------
66
// Selecte desired fileformats to be supported for image data loading
77
#define SUPPORT_FILEFORMAT_PNG 1
@@ -13,7 +13,7 @@ diff --git a/vendor/raylib/src/config.h b/vendor/raylib/src/config.h
1313
#define SUPPORT_FILEFORMAT_GIF 1
1414
#define SUPPORT_FILEFORMAT_QOI 1
1515
//#define SUPPORT_FILEFORMAT_PSD 1
16-
@@ -225,7 +225,7 @@
16+
@@ -247,7 +247,7 @@
1717
#define SUPPORT_FILEFORMAT_OGG 1
1818
#define SUPPORT_FILEFORMAT_MP3 1
1919
#define SUPPORT_FILEFORMAT_QOA 1

src/c/mingw64.patch

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
diff --git a/vendor/raylib/src/Makefile b/vendor/raylib/src/Makefile
2-
index 193e3eb5..11412e60 100644
3-
--- a/vendor/raylib/src/Makefile
4-
+++ b/vendor/raylib/src/Makefile
5-
@@ -240,8 +240,8 @@ endif
6-
7-
# Define default C compiler and archiver to pack library: CC, AR
8-
#------------------------------------------------------------------------------------------------
9-
-CC = gcc
10-
-AR = ar
11-
+CC = x86_64-w64-mingw32-gcc
12-
+AR = x86_64-w64-mingw32-ar
13-
14-
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
15-
ifeq ($(PLATFORM_OS),OSX)
16-
@@ -605,7 +605,7 @@ else
17-
ifeq ($(PLATFORM),$(filter $(PLATFORM),PLATFORM_DESKTOP PLATFORM_DESKTOP_SDL))
18-
ifeq ($(PLATFORM_OS),WINDOWS)
19-
# NOTE: Linking with provided resource file
20-
- $(CC) -shared -o $(RAYLIB_RELEASE_PATH)/$(RAYLIB_LIB_NAME).dll $(OBJS) $(RAYLIB_RES_FILE) $(LDFLAGS) $(LDLIBS)
21-
+ $(CC) -shared -o $(RAYLIB_RELEASE_PATH)/$(RAYLIB_LIB_NAME).dll $(OBJS) $(LDFLAGS) $(LDLIBS)
22-
@echo "raylib dynamic library ($(RAYLIB_LIB_NAME).dll) and import library (lib$(RAYLIB_LIB_NAME)dll.a) generated!"
23-
endif
24-
ifeq ($(PLATFORM_OS),LINUX)
1+
diff --git a/vendor/raylib/src/Makefile b/vendor/raylib/src/Makefile
2+
index 7dde52fb..9df71f4f 100644
3+
--- a/vendor/raylib/src/Makefile
4+
+++ b/vendor/raylib/src/Makefile
5+
@@ -266,8 +266,8 @@ endif
6+
7+
# Define default C compiler and archiver to pack library: CC, AR
8+
#------------------------------------------------------------------------------------------------
9+
-CC = gcc
10+
-AR = ar
11+
+CC = x86_64-w64-mingw32-gcc
12+
+AR = x86_64-w64-mingw32-ar
13+
14+
ifeq ($(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW)
15+
ifeq ($(PLATFORM_OS),OSX)
16+
@@ -669,7 +669,7 @@ else
17+
ifeq ($(TARGET_PLATFORM),$(filter $(TARGET_PLATFORM),PLATFORM_DESKTOP_GLFW PLATFORM_DESKTOP_SDL PLATFORM_DESKTOP_RGFW))
18+
ifeq ($(PLATFORM_OS),WINDOWS)
19+
# NOTE: Linking with provided resource file
20+
- $(CC) -shared -o $(RAYLIB_RELEASE_PATH)/$(RAYLIB_LIB_NAME).dll $(OBJS) $(RAYLIB_RES_FILE) $(LDFLAGS) $(LDLIBS)
21+
+ $(CC) -shared -o $(RAYLIB_RELEASE_PATH)/$(RAYLIB_LIB_NAME).dll $(OBJS) $(LDFLAGS) $(LDLIBS)
22+
@echo "raylib dynamic library ($(RAYLIB_LIB_NAME).dll) and import library (lib$(RAYLIB_LIB_NAME)dll.a) generated!"
23+
endif
24+
ifeq ($(PLATFORM_OS),LINUX)

0 commit comments

Comments
 (0)