Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ url = https://github.com/raysan5/raylib
path = raygui
url = https://github.com/raysan5/raygui

[submodule "physac"]
path = physac
url = https://github.com/raysan5/physac

[submodule "examples/lynx"]
path = examples/lynx
url = https://gitlab.com/TSnake41/lynx
url = https://gitlab.com/TSnake41/lynx
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ rl.CloseWindow()

### Compatibility

raylib-lua (raylua) currently uses raylib 5.5 API. See [compat.lua](https://github.com/TSnake41/raylib-lua/blob/master/src/compat.lua) for more info.
raylib-lua (raylua) currently uses raylib 6.0 API. See [compat.lua](https://github.com/TSnake41/raylib-lua/blob/master/src/compat.lua) for more info.

[physac](https://github.com/victorfisac/Physac) and [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) modules are also built-in by default.
[rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) is also built-in by default.
[raygui](https://github.com/raysan5/raygui) is supported, but is minimally tested.

Please report any issues you have with raygui with raylib-lua (raylua) on GitHub or on the #raylib-lua subchannel of [the raylib Discord server](https://discord.gg/raylib). To find the #raylib-lua page, join the raylib Discord server by clicking the above link, then scroll down on the left side of Discord's list of channels until you find #raylib-lua and click it. You can chat and ask questions there.
Expand Down
6 changes: 3 additions & 3 deletions Saphirefile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ local cflags = os.getenv "CFLAGS" or "-O2 -s"
local ldflags = os.getenv "LDFLAGS" or "-O2 -s -lm"
local ldflags_r = os.getenv "LDFLAGS_R" or ""

local modules = "raymath rlgl gestures physac raygui rcamera"
local modules = "raymath rlgl gestures raygui rcamera"
local graphics = os.getenv "GRAPHICS" or "GRAPHICS_API_OPENGL_43"

cflags = cflags .. " -Iluajit/src -Iraygui/src -Iphysac/src -Iraylib/src".. " -D" .. graphics
cflags = cflags .. " -Iluajit/src -Iraygui/src -Iraylib/src".. " -D" .. graphics

local raylua_so_path = "raylua.so" -- assume unix-like by default
local so_ldflags = ldflags
Expand All @@ -61,7 +61,7 @@ if saphire.targets.clean then
}
else
libluajit = {
command = string.format("make -C luajit amalg CC=%s BUILDMODE=static MACOSX_DEPLOYMENT_TARGET=10.13", cc),
command = string.format("make -C luajit amalg CC=%s BUILDMODE=static HOST_MSYS=1 HOST_LUA=host/minilua.exe GIT_RELVER='[ -e ../.git ] && git show -s --format=%%ct >luajit_relver.txt 2>/dev/null || cat ../.relver >luajit_relver.txt 2>/dev/null || :' MACOSX_DEPLOYMENT_TARGET=10.13", cc),
name = "LuaJIT"
}
end
Expand Down
2 changes: 1 addition & 1 deletion build/buildRaylib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if los.type() == "linux" then
end

local consts = {
RAYLIB_VERSION = "5.5.0",
RAYLIB_VERSION = "6.0.0",
RAYLIB_API_VERSION = "550",
}

Expand Down
6 changes: 3 additions & 3 deletions examples/gui_portable_window.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ while not exit_window and not rl.WindowShouldClose() do
if drag_window then
window_pos = window_pos + mouse_pos - pan_offset

if rl.IsMouseButtonReleased(rl.MOUSE_BUTTON_RIGHT) then
if rl.IsMouseButtonReleased(rl.MOUSE_BUTTON_LEFT) then
drag_window = false
end

Expand All @@ -34,11 +34,11 @@ while not exit_window and not rl.WindowShouldClose() do
rl.BeginDrawing()

rl.ClearBackground(rl.RAYWHITE)
exit_window = rl.GuiWindowBox(rl.new("Rectangle", 0, 0, width, height), "PORTABLE WINDOW")
exit_window = rl.GuiWindowBox(rl.new("Rectangle", 0, 0, width, height), "PORTABLE WINDOW") ~= 0
rl.DrawText(string.format("Mouse Position: [ %.0f, %.0f ]", mouse_pos.x, mouse_pos.y),
10, 40, 10, rl.DARKGRAY)

rl.EndDrawing()
end

rl.CloseWindow()
rl.CloseWindow()
88 changes: 0 additions & 88 deletions examples/physics_demo.lua

This file was deleted.

8 changes: 4 additions & 4 deletions examples/shaders_compute_shader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ local brushSize = 8

-- Game of Life logic compute shader
local golLogicCode = rl.LoadFileText("resources/glsl430/gol.glsl")
local golLogicShader = rl.rlCompileShader(golLogicCode, rl.RL_COMPUTE_SHADER);
local golLogicProgram = rl.rlLoadComputeShaderProgram(golLogicShader);
local golLogicShader = rl.rlLoadShader(golLogicCode, rl.RL_COMPUTE_SHADER);
local golLogicProgram = rl.rlLoadShaderProgramCompute(golLogicShader);
rl.UnloadFileText(golLogicCode);

-- Game of Life rendering compute shader
local golRenderShader = rl.LoadShader(nil, "resources/glsl430/gol_render.glsl")
local resUniformLoc = rl.GetShaderLocation(golRenderShader, "resolution")

local golTransfertCode = rl.LoadFileText("resources/glsl430/gol_transfert.glsl");
local golTransfertShader = rl.rlCompileShader(golTransfertCode, rl.RL_COMPUTE_SHADER);
local golTransfertProgram = rl.rlLoadComputeShaderProgram(golTransfertShader);
local golTransfertShader = rl.rlLoadShader(golTransfertCode, rl.RL_COMPUTE_SHADER);
local golTransfertProgram = rl.rlLoadShaderProgramCompute(golTransfertShader);
rl.UnloadFileText(golTransfertCode);

local ssboSize = ffi.sizeof("int[?]", GOL_WIDTH * GOL_WIDTH)
Expand Down
2 changes: 1 addition & 1 deletion luajit
Submodule luajit updated 212 files
15 changes: 10 additions & 5 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ LUA ?= luajit/src/luajit

WINDRES ?= windres

CFLAGS += -Iluajit/src -Iraylib/src -Iraygui/src -Iphysac/src
CFLAGS += -Iluajit/src -Iraylib/src -Iraygui/src
LDFLAGS += luajit/src/libluajit.a raylib/src/libraylib.a

MODULES := raymath rlgl gestures physac raygui rcamera
MODULES := raymath rlgl gestures raygui rcamera

# raylib settings
PLATFORM ?= PLATFORM_DESKTOP
Expand All @@ -19,6 +19,7 @@ CFLAGS += -D$(GRAPHICS) -D$(PLATFORM)

USE_WAYLAND_DISPLAY ?= FALSE
USE_EXTERNAL_GLFW ?= FALSE
PLATFORM_SHELL ?= sh

ifeq ($(OS),Windows_NT)
LDFLAGS += -lopengl32 -lgdi32 -lwinmm -static
Expand Down Expand Up @@ -53,14 +54,18 @@ all: raylua_s raylua_e raylua_r luajit raylib
luajit:
$(MAKE) -C luajit amalg \
CC=$(CC) BUILDMODE=static \
HOST_MSYS=mingw \
HOST_LUA=./host/minilua.exe \
MINILUA_DEP=host/minilua.exe \
MACOSX_DEPLOYMENT_TARGET=10.13

raylib:
$(MAKE) -C raylib/src \
CC=$(CC) AR=$(AR) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
USE_WAYLAND_DISPLAY="$(USE_WAYLAND_DISPLAY)" \
USE_EXTERNAL_GLFW="$(USE_EXTERNAL_GLFW)" \
PLATFORM="$(PLATFORM)" GRAPHICS="$(GRAPHICS)"
PLATFORM="$(PLATFORM)" GRAPHICS="$(GRAPHICS)" \
PLATFORM_SHELL="$(PLATFORM_SHELL)"


raylua_s: src/raylua_s.o $(EXTERNAL_FILES) libraylua.a
Expand Down Expand Up @@ -103,8 +108,8 @@ clean:
rm -rf raylua_s raylua_e libraylua.a src/raylua_e.o src/raylua_s.o \
src/raylua.o src/raylua_self.o src/raylua_builder.o src/autogen/*.c \
src/lib/miniz.o src/res/icon.res
$(MAKE) -C luajit clean
$(MAKE) -C raylib/src clean
$(MAKE) -C luajit clean HOST_MSYS=mingw
$(MAKE) -C raylib/src clean PLATFORM_SHELL="$(PLATFORM_SHELL)"
rm -f raylib/libraylib.a

.PHONY: all src/autogen/bind.c src/autogen/boot.c raylua_s raylua_e luajit \
Expand Down
1 change: 0 additions & 1 deletion physac
Submodule physac deleted from 4a8e17
2 changes: 1 addition & 1 deletion raylib
Submodule raylib updated 964 files
Loading