Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
0cb20c7d7c |
179
README.md
179
README.md
@ -1,180 +1,11 @@
|
||||
![raylib-lua logo](assets/logo.png)
|
||||
![rayfork-lua logo](assets/logo.png)
|
||||
|
||||
[![release](https://img.shields.io/github/v/release/TSnake41/raylib-lua?style=flat-square)](https://github.com/TSnake41/raylib-lua/releases/latest)
|
||||
[![downloads](https://img.shields.io/github/downloads/tsnake41/raylib-lua/total?style=flat-square)](https://github.com/TSnake41/raylib-lua/releases)
|
||||
[![release](https://img.shields.io/github/v/release/TSnake41/rayfork-lua?style=flat-square)](https://github.com/TSnake41/rayfork-lua/releases/latest)
|
||||
[![downloads](https://img.shields.io/github/downloads/tsnake41/rayfork-lua/total?style=flat-square)](https://github.com/TSnake41/rayfork-lua/releases)
|
||||
|
||||
## raylib-lua
|
||||
## rayfork-lua
|
||||
|
||||
[LuaJIT](https://luajit.org/)-based binding for [raylib](https://www.raylib.com/), a simple and easy-to-use
|
||||
library to learn videogames programming.
|
||||
|
||||
This binding is partially based on [raylib-wren/wray](https://github.com/TSnake41/raylib-wren).
|
||||
|
||||
### Usage (raylua_s)
|
||||
|
||||
raylua_s is the script-mode binary of raylib-lua.
|
||||
Without any argument, you get into the REPL which gives you a minimal Lua]
|
||||
shell that allows you to run Lua code from terminal.]
|
||||
|
||||
You can specify a Lua file as argument to run the specified Lua file.
|
||||
|
||||
### Usage (raylua_e)
|
||||
|
||||
raylua_e is the embedding-mode binary of raylib-lua.
|
||||
|
||||
This binary allows you to build standalone raylib applications from Lua code.
|
||||
|
||||
There are 3 ways to use it :
|
||||
- zip mode :
|
||||
If you specify a zip file as argument, this zip will be used as payload
|
||||
application, this file expects to have a `main.lua` which is the entry point
|
||||
of the application.
|
||||
- directory mode :
|
||||
Similar to zip mode except that it automatically build the zip payload from
|
||||
the specified directory.
|
||||
- lua mode :
|
||||
Build the executable from a single Lua file.
|
||||
|
||||
Using `require` in embedded mode works as expected but `dofile` and `loadfile`
|
||||
may not work as expected as these functions load from a external file rather
|
||||
than from `package` loaders.
|
||||
|
||||
### Building / Updating raylib / Contribution
|
||||
|
||||
To build raylib-lua from source, you need to take care that submodules are
|
||||
imported, if not or you are unsure :
|
||||
|
||||
```shell
|
||||
git submodule init
|
||||
git submodule update
|
||||
```
|
||||
|
||||
This make take some time depending on network bandwidth.
|
||||
Then, raylib-lua should build as expected using `make` tool with a working C compiler.
|
||||
|
||||
A working Lua interpreter is needed, by default the luajit interpreter built
|
||||
along with `libluajit.a` is used. In case of cross-compiling, you may want to
|
||||
change which Lua interpreter is used to a one your system supports.
|
||||
You can specify the interpreter with the `LUA` variable.
|
||||
|
||||
If you need to update raylib binding, there are few tasks to do :
|
||||
- update `tools/api.h` functions signatures, keep file clean with exactly one function per line.
|
||||
- update struct definitions in `src/raylib.lua`
|
||||
|
||||
### Loading embedded ressources
|
||||
|
||||
Currently, raylib-lua doesn't support loading ressources from payload using
|
||||
raylib API. However, you can still arbitrarily load files from payload using
|
||||
`raylua.loadfile` which returns a boolean indicating success and file content.
|
||||
|
||||
### Making structs
|
||||
|
||||
To make raylib structs, you need to use the LuaJIT FFI.
|
||||
```lua
|
||||
local ffi = require "ffi"
|
||||
```
|
||||
|
||||
Then use ffi.new to make a struct, e.g `ffi.new("Color", r, g, b, a)`
|
||||
|
||||
#### Note concerning pointers
|
||||
|
||||
You can use `rl.ref` to build a pointer from a struct cdata.
|
||||
This functions only work struct cdata, in case of primitive cdata, you
|
||||
need to make a array and pass it directly.
|
||||
|
||||
e.g :
|
||||
```lua
|
||||
local int_ptr = ffi.new "int [1]"
|
||||
local data = tostring(rl.LoadFileData("test.txt", int_ptr))
|
||||
local count = tonumber(int_ptr[0])
|
||||
```
|
||||
|
||||
### Example
|
||||
|
||||
```lua
|
||||
rl.SetConfigFlags(rl.FLAG_VSYNC_HINT)
|
||||
|
||||
rl.InitWindow(800, 450, "raylib [core] example - basic window")
|
||||
|
||||
while not rl.WindowShouldClose() do
|
||||
rl.BeginDrawing()
|
||||
|
||||
rl.ClearBackground(rl.RAYWHITE)
|
||||
rl.DrawText("Congrats! You created your first window!", 190, 200, 20, rl.LIGHTGRAY)
|
||||
|
||||
rl.EndDrawing()
|
||||
end
|
||||
|
||||
rl.CloseWindow()
|
||||
```
|
||||
|
||||
### Compatibility
|
||||
|
||||
raylib-lua (raylua) currently uses raylib 3.1-dev API with some 3.0 API compatibility
|
||||
(see [compat.lua](https://github.com/TSnake41/raylib-lua/blob/master/src/compat.lua)).
|
||||
physac and rlgl modules are built-in by default.
|
||||
raygui is supported, but is minimally tested, please report any issues you have
|
||||
with raygui with raylib-lua (raylua) on GitHub or raylib Discord (#raylib-lua channel)
|
||||
|
||||
#### Global API
|
||||
|
||||
You can make raylib-lua (raylua) partially compatible with
|
||||
[original raylib-lua](https://github.com/raysan5/raylib-lua) or
|
||||
[raylib-lua-sol](https://github.com/RobLoach/raylib-lua-sol) with global API by
|
||||
adding `setmetatable(_G, { __index = rl })` on the first line.
|
||||
|
||||
This will allow direct use of the raylib binding through globals instead of `rl` table.
|
||||
|
||||
You have an example of this in `lua_global_api.lua`.
|
||||
|
||||
### Editor support
|
||||
|
||||
Currently, there is no editor autocompletion/integration support for most editors, but there is a
|
||||
[third-party autocompletion support](https://github.com/Rabios/raylua/tree/master/zerobrane)
|
||||
for [ZeroBrane Studio](https://studio.zerobrane.com/) by [Rabios](https://github.com/Rabios).
|
||||
|
||||
#### Debugging
|
||||
|
||||
You can use [Local Lua Debugger for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=tomblind.local-lua-debugger-vscode)
|
||||
to provide debugging support with Visual Studio Code.
|
||||
You need to add this at the beginning of your code to use it :
|
||||
```lua
|
||||
do local f = getmetatable(rl).__index;rawset(rl, "__index", function (_, k) return select(2, pcall(f, _, k)) end) end
|
||||
package.path = package.path .. os.getenv "LUA_PATH"
|
||||
local lldebugger = require "lldebugger"; lldebugger.start()
|
||||
```
|
||||
You also need to setup a launch configuration in Visual Studio Code to run raylua_s with debugger attached, e.g
|
||||
```json
|
||||
{
|
||||
"type": "lua-local",
|
||||
"request": "launch",
|
||||
"name": "(Lua) Launch",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"program": { "command": "PATH TO raylua_s" },
|
||||
"args": [ "main.lua OR ${file} OR WHATEVER" ]
|
||||
}
|
||||
```
|
||||
This debugger doesn't support pausing, you need to place a breakpoint before executing
|
||||
to get a actual debug, otherwise, a error needs to be thrown in the application to get the debugging.
|
||||
This debugger has a significant overhead, expect a performance loss in intensive projects.
|
||||
|
||||
### Other bindings
|
||||
|
||||
raylib-lua (raylua) is not the only Lua binding for raylib.
|
||||
|
||||
There are some other bindings, which may or may not be up to date.
|
||||
|
||||
[RobLoach/raylib-lua-sol](https://github.com/RobLoach/raylib-lua-sol)
|
||||
|
||||
[raysan5/raylib-lua](https://github.com/raysan5/raylib-lua/)
|
||||
|
||||
[HDPLocust/raylib-luamore](https://github.com/HDPLocust/raylib-luamore)
|
||||
|
||||
[alexander-matz ffi binding](https://gist.github.com/alexander-matz/f8ee4eb9fdf676203d70c1e5e329a6ec)
|
||||
|
||||
[darltrash/raylib-luajit](https://github.com/darltrash/raylib-luajit)
|
||||
|
||||
[Rabios/raylua](https://github.com/Rabios/raylua)
|
||||
Modular [LuaJIT](https://luajit.org/)-based binding for [SasLuca/rayfork](https://github.com/SasLuca/rayfork).
|
||||
|
||||
### Licence
|
||||
|
||||
|
12
makefile
12
makefile
@ -6,10 +6,10 @@ LUA ?= luajit/src/luajit
|
||||
|
||||
WINDRES ?= windres
|
||||
|
||||
CFLAGS += -Iluajit/src -Iraylib/src -Iraygui/src
|
||||
LDFLAGS += -Lluajit/src -Lraylib -lraylib
|
||||
CFLAGS += -Iluajit/src
|
||||
LDFLAGS += -Lluajit/src
|
||||
|
||||
MODULES := raymath rlgl easings gestures physac raygui
|
||||
MODULES := rayfork
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
LDFLAGS += -lopengl32 -lgdi32 -lwinmm -static
|
||||
@ -32,9 +32,6 @@ all: raylua_s raylua_e luajit raylib
|
||||
luajit:
|
||||
$(MAKE) -C luajit amalg CC=$(CC) BUILDMODE=static MACOSX_DEPLOYMENT_TARGET=10.13
|
||||
|
||||
raylib:
|
||||
$(MAKE) CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" -C raylib/src
|
||||
|
||||
raylua_s: src/raylua_s.o $(EXTERNAL_FILES) libraylua.a
|
||||
$(CC) -o $@ $^ $(LDFLAGS) luajit/src/libluajit.a
|
||||
|
||||
@ -45,7 +42,7 @@ raylua_e: src/raylua_e.o src/raylua_self.o src/raylua_builder.o src/lib/miniz.o
|
||||
src/res/icon.res: src/res/icon.rc
|
||||
$(WINDRES) $^ -O coff $@
|
||||
|
||||
libraylua.a: src/raylua.o
|
||||
libraylua.a: src/lib/rayfork.o src/raylua.o
|
||||
$(AR) rcu $@ $^
|
||||
|
||||
raylua.dll: src/raylua.o
|
||||
@ -72,7 +69,6 @@ clean:
|
||||
src/raylua.o src/raylua_self.o src/raylua_builder.o src/autogen/*.c \
|
||||
src/lib/miniz.o
|
||||
$(MAKE) -C luajit clean
|
||||
$(MAKE) -C raylib/src clean
|
||||
|
||||
.PHONY: all src/autogen/bind.c src/autogen/boot.c raylua_s raylua_e luajit \
|
||||
raylib clean
|
||||
|
593
rayfork
Normal file
593
rayfork
Normal file
@ -0,0 +1,593 @@
|
||||
struct rf_lua_bind_entry {
|
||||
const char *name;
|
||||
const char *proto;
|
||||
void *ptr;
|
||||
};
|
||||
|
||||
struct rf_lua_bind_entry rayfork_entries[] = {
|
||||
{ "rf_calloc_wrapper", "", &rf_calloc_wrapper },
|
||||
{ "rf_libc_allocator_wrapper", "", &rf_libc_allocator_wrapper },
|
||||
{ "rf_libc_get_file_size", "r", &rf_libc_get_file_size },
|
||||
{ "rf_libc_load_file_into_buffer", "", &rf_libc_load_file_into_buffer },
|
||||
{ "rf_get_last_recorded_error", "r", &rf_get_last_recorded_error },
|
||||
{ "rf_log_type_string", "", &rf_log_type_string },
|
||||
{ "rf_set_logger", "", &rf_set_logger },
|
||||
{ "rf_set_logger_filter", "", &rf_set_logger_filter },
|
||||
{ "rf_libc_printf_logger", "", &rf_libc_printf_logger },
|
||||
{ "rf_libc_rand_wrapper", "r", &rf_libc_rand_wrapper },
|
||||
{ "rf_decode_utf8_char", "r", &rf_decode_utf8_char },
|
||||
{ "rf_count_utf8_chars", "r", &rf_count_utf8_chars },
|
||||
{ "rf_decode_utf8_to_buffer", "r", &rf_decode_utf8_to_buffer },
|
||||
{ "rf_decode_utf8", "r", &rf_decode_utf8 },
|
||||
{ "rf_next_pot", "", &rf_next_pot },
|
||||
{ "rf_center_to_screen", "r", &rf_center_to_screen },
|
||||
{ "rf_center_to_object", "r", &rf_center_to_object },
|
||||
{ "rf_clamp", "", &rf_clamp },
|
||||
{ "rf_lerp", "", &rf_lerp },
|
||||
{ "rf_vec2_add", "r", &rf_vec2_add },
|
||||
{ "rf_vec2_sub", "r", &rf_vec2_sub },
|
||||
{ "rf_vec2_len", "", &rf_vec2_len },
|
||||
{ "rf_vec2_dot_product", "", &rf_vec2_dot_product },
|
||||
{ "rf_vec2_distance", "", &rf_vec2_distance },
|
||||
{ "rf_vec2_angle", "", &rf_vec2_angle },
|
||||
{ "rf_vec2_scale", "r", &rf_vec2_scale },
|
||||
{ "rf_vec2_mul_v", "r", &rf_vec2_mul_v },
|
||||
{ "rf_vec2_negate", "r", &rf_vec2_negate },
|
||||
{ "rf_vec2_div", "r", &rf_vec2_div },
|
||||
{ "rf_vec2_div_v", "r", &rf_vec2_div_v },
|
||||
{ "rf_vec2_normalize", "r", &rf_vec2_normalize },
|
||||
{ "rf_vec2_lerp", "r", &rf_vec2_lerp },
|
||||
{ "rf_vec3_add", "r", &rf_vec3_add },
|
||||
{ "rf_vec3_sub", "r", &rf_vec3_sub },
|
||||
{ "rf_vec3_mul", "r", &rf_vec3_mul },
|
||||
{ "rf_vec3_mul_v", "r", &rf_vec3_mul_v },
|
||||
{ "rf_vec3_cross_product", "r", &rf_vec3_cross_product },
|
||||
{ "rf_vec3_perpendicular", "r", &rf_vec3_perpendicular },
|
||||
{ "rf_vec3_len", "", &rf_vec3_len },
|
||||
{ "rf_vec3_dot_product", "", &rf_vec3_dot_product },
|
||||
{ "rf_vec3_distance", "", &rf_vec3_distance },
|
||||
{ "rf_vec3_scale", "r", &rf_vec3_scale },
|
||||
{ "rf_vec3_negate", "r", &rf_vec3_negate },
|
||||
{ "rf_vec3_div", "r", &rf_vec3_div },
|
||||
{ "rf_vec3_div_v", "r", &rf_vec3_div_v },
|
||||
{ "rf_vec3_normalize", "r", &rf_vec3_normalize },
|
||||
{ "rf_vec3_ortho_normalize", "", &rf_vec3_ortho_normalize },
|
||||
{ "rf_vec3_transform", "r", &rf_vec3_transform },
|
||||
{ "rf_vec3_rotate_by_quaternion", "r", &rf_vec3_rotate_by_quaternion },
|
||||
{ "rf_vec3_lerp", "r", &rf_vec3_lerp },
|
||||
{ "rf_vec3_reflect", "r", &rf_vec3_reflect },
|
||||
{ "rf_vec3_min", "r", &rf_vec3_min },
|
||||
{ "rf_vec3_max", "r", &rf_vec3_max },
|
||||
{ "rf_vec3_barycenter", "r", &rf_vec3_barycenter },
|
||||
{ "rf_mat_determinant", "", &rf_mat_determinant },
|
||||
{ "rf_mat_trace", "", &rf_mat_trace },
|
||||
{ "rf_mat_transpose", "r", &rf_mat_transpose },
|
||||
{ "rf_mat_invert", "r", &rf_mat_invert },
|
||||
{ "rf_mat_normalize", "r", &rf_mat_normalize },
|
||||
{ "rf_mat_identity", "r", &rf_mat_identity },
|
||||
{ "rf_mat_add", "r", &rf_mat_add },
|
||||
{ "rf_mat_sub", "r", &rf_mat_sub },
|
||||
{ "rf_mat_translate", "r", &rf_mat_translate },
|
||||
{ "rf_mat_rotate", "r", &rf_mat_rotate },
|
||||
{ "rf_mat_rotate_xyz", "r", &rf_mat_rotate_xyz },
|
||||
{ "rf_mat_rotate_x", "r", &rf_mat_rotate_x },
|
||||
{ "rf_mat_rotate_y", "r", &rf_mat_rotate_y },
|
||||
{ "rf_mat_rotate_z", "r", &rf_mat_rotate_z },
|
||||
{ "rf_mat_scale", "r", &rf_mat_scale },
|
||||
{ "rf_mat_mul", "r", &rf_mat_mul },
|
||||
{ "rf_mat_frustum", "r", &rf_mat_frustum },
|
||||
{ "rf_mat_perspective", "r", &rf_mat_perspective },
|
||||
{ "rf_mat_ortho", "r", &rf_mat_ortho },
|
||||
{ "rf_mat_look_at", "r", &rf_mat_look_at },
|
||||
{ "rf_mat_to_float16", "r", &rf_mat_to_float16 },
|
||||
{ "rf_quaternion_identity", "r", &rf_quaternion_identity },
|
||||
{ "rf_quaternion_len", "", &rf_quaternion_len },
|
||||
{ "rf_quaternion_normalize", "r", &rf_quaternion_normalize },
|
||||
{ "rf_quaternion_invert", "r", &rf_quaternion_invert },
|
||||
{ "rf_quaternion_mul", "r", &rf_quaternion_mul },
|
||||
{ "rf_quaternion_lerp", "r", &rf_quaternion_lerp },
|
||||
{ "rf_quaternion_nlerp", "r", &rf_quaternion_nlerp },
|
||||
{ "rf_quaternion_slerp", "r", &rf_quaternion_slerp },
|
||||
{ "rf_quaternion_from_vec3_to_vec3", "r", &rf_quaternion_from_vec3_to_vec3 },
|
||||
{ "rf_quaternion_from_mat", "r", &rf_quaternion_from_mat },
|
||||
{ "rf_quaternion_to_mat", "r", &rf_quaternion_to_mat },
|
||||
{ "rf_quaternion_from_axis_angle", "r", &rf_quaternion_from_axis_angle },
|
||||
{ "rf_quaternion_to_axis_angle", "", &rf_quaternion_to_axis_angle },
|
||||
{ "rf_quaternion_from_euler", "r", &rf_quaternion_from_euler },
|
||||
{ "rf_quaternion_to_euler", "r", &rf_quaternion_to_euler },
|
||||
{ "rf_quaternion_transform", "r", &rf_quaternion_transform },
|
||||
{ "rf_rec_match", "", &rf_rec_match },
|
||||
{ "rf_check_collision_recs", "", &rf_check_collision_recs },
|
||||
{ "rf_check_collision_circles", "", &rf_check_collision_circles },
|
||||
{ "rf_check_collision_circle_rec", "", &rf_check_collision_circle_rec },
|
||||
{ "rf_check_collision_point_rec", "", &rf_check_collision_point_rec },
|
||||
{ "rf_check_collision_point_circle", "", &rf_check_collision_point_circle },
|
||||
{ "rf_check_collision_point_triangle", "", &rf_check_collision_point_triangle },
|
||||
{ "rf_get_collision_rec", "r", &rf_get_collision_rec },
|
||||
{ "rf_check_collision_spheres", "", &rf_check_collision_spheres },
|
||||
{ "rf_check_collision_boxes", "", &rf_check_collision_boxes },
|
||||
{ "rf_check_collision_box_sphere", "", &rf_check_collision_box_sphere },
|
||||
{ "rf_check_collision_ray_sphere", "", &rf_check_collision_ray_sphere },
|
||||
{ "rf_check_collision_ray_sphere_ex", "", &rf_check_collision_ray_sphere_ex },
|
||||
{ "rf_check_collision_ray_box", "", &rf_check_collision_ray_box },
|
||||
{ "rf_collision_ray_model", "r", &rf_collision_ray_model },
|
||||
{ "rf_collision_ray_triangle", "r", &rf_collision_ray_triangle },
|
||||
{ "rf_collision_ray_ground", "r", &rf_collision_ray_ground },
|
||||
{ "rf_get_size_base64", "", &rf_get_size_base64 },
|
||||
{ "rf_decode_base64", "r", &rf_decode_base64 },
|
||||
{ "rf_pixel_format_string", "", &rf_pixel_format_string },
|
||||
{ "rf_is_uncompressed_format", "", &rf_is_uncompressed_format },
|
||||
{ "rf_is_compressed_format", "", &rf_is_compressed_format },
|
||||
{ "rf_bits_per_pixel", "", &rf_bits_per_pixel },
|
||||
{ "rf_bytes_per_pixel", "", &rf_bytes_per_pixel },
|
||||
{ "rf_pixel_buffer_size", "", &rf_pixel_buffer_size },
|
||||
{ "rf_format_pixels_to_normalized", "", &rf_format_pixels_to_normalized },
|
||||
{ "rf_format_pixels_to_rgba32", "", &rf_format_pixels_to_rgba32 },
|
||||
{ "rf_format_pixels", "", &rf_format_pixels },
|
||||
{ "rf_format_one_pixel_to_normalized", "r", &rf_format_one_pixel_to_normalized },
|
||||
{ "rf_format_one_pixel_to_rgba32", "r", &rf_format_one_pixel_to_rgba32 },
|
||||
{ "rf_format_one_pixel", "", &rf_format_one_pixel },
|
||||
{ "rf_color_match_rgb", "", &rf_color_match_rgb },
|
||||
{ "rf_color_match", "", &rf_color_match },
|
||||
{ "rf_color_to_int", "", &rf_color_to_int },
|
||||
{ "rf_color_normalize", "r", &rf_color_normalize },
|
||||
{ "rf_color_from_normalized", "r", &rf_color_from_normalized },
|
||||
{ "rf_color_to_hsv", "r", &rf_color_to_hsv },
|
||||
{ "rf_color_from_hsv", "r", &rf_color_from_hsv },
|
||||
{ "rf_color_from_int", "r", &rf_color_from_int },
|
||||
{ "rf_fade", "r", &rf_fade },
|
||||
{ "rf_unproject", "r", &rf_unproject },
|
||||
{ "rf_get_mouse_ray", "r", &rf_get_mouse_ray },
|
||||
{ "rf_get_camera_matrix", "r", &rf_get_camera_matrix },
|
||||
{ "rf_get_camera_matrix2d", "r", &rf_get_camera_matrix2d },
|
||||
{ "rf_get_world_to_screen", "r", &rf_get_world_to_screen },
|
||||
{ "rf_get_world_to_screen2d", "r", &rf_get_world_to_screen2d },
|
||||
{ "rf_get_screen_to_world2d", "r", &rf_get_screen_to_world2d },
|
||||
{ "rf_set_camera3d_mode", "", &rf_set_camera3d_mode },
|
||||
{ "rf_update_camera3d", "", &rf_update_camera3d },
|
||||
{ "rf_image_size", "", &rf_image_size },
|
||||
{ "rf_image_size_in_format", "", &rf_image_size_in_format },
|
||||
{ "rf_image_get_pixels_as_rgba32_to_buffer", "", &rf_image_get_pixels_as_rgba32_to_buffer },
|
||||
{ "rf_image_get_pixels_as_normalized_to_buffer", "", &rf_image_get_pixels_as_normalized_to_buffer },
|
||||
{ "rf_image_pixels_to_rgba32", "r", &rf_image_pixels_to_rgba32 },
|
||||
{ "rf_image_compute_pixels_to_normalized", "r", &rf_image_compute_pixels_to_normalized },
|
||||
{ "rf_image_extract_palette_to_buffer", "", &rf_image_extract_palette_to_buffer },
|
||||
{ "rf_image_extract_palette", "r", &rf_image_extract_palette },
|
||||
{ "rf_image_alpha_border", "r", &rf_image_alpha_border },
|
||||
{ "rf_supports_image_file_type", "", &rf_supports_image_file_type },
|
||||
{ "rf_load_image_from_file_data_to_buffer", "r", &rf_load_image_from_file_data_to_buffer },
|
||||
{ "rf_load_image_from_file_data", "r", &rf_load_image_from_file_data },
|
||||
{ "rf_load_image_from_hdr_file_data_to_buffer", "r", &rf_load_image_from_hdr_file_data_to_buffer },
|
||||
{ "rf_load_image_from_hdr_file_data", "r", &rf_load_image_from_hdr_file_data },
|
||||
{ "rf_load_image_from_format_to_buffer", "r", &rf_load_image_from_format_to_buffer },
|
||||
{ "rf_load_image_from_file", "r", &rf_load_image_from_file },
|
||||
{ "rf_unload_image", "", &rf_unload_image },
|
||||
{ "rf_mipmaps_image_size", "", &rf_mipmaps_image_size },
|
||||
{ "rf_compute_mipmaps_stats", "r", &rf_compute_mipmaps_stats },
|
||||
{ "rf_image_gen_mipmaps_to_buffer", "r", &rf_image_gen_mipmaps_to_buffer },
|
||||
{ "rf_image_gen_mipmaps", "r", &rf_image_gen_mipmaps },
|
||||
{ "rf_unload_mipmaps_image", "", &rf_unload_mipmaps_image },
|
||||
{ "rf_get_dds_image_size", "r", &rf_get_dds_image_size },
|
||||
{ "rf_load_dds_image_to_buffer", "r", &rf_load_dds_image_to_buffer },
|
||||
{ "rf_load_dds_image", "r", &rf_load_dds_image },
|
||||
{ "rf_load_dds_image_from_file", "r", &rf_load_dds_image_from_file },
|
||||
{ "rf_get_pkm_image_size", "r", &rf_get_pkm_image_size },
|
||||
{ "rf_load_pkm_image_to_buffer", "r", &rf_load_pkm_image_to_buffer },
|
||||
{ "rf_load_pkm_image", "r", &rf_load_pkm_image },
|
||||
{ "rf_load_pkm_image_from_file", "r", &rf_load_pkm_image_from_file },
|
||||
{ "rf_get_ktx_image_size", "r", &rf_get_ktx_image_size },
|
||||
{ "rf_load_ktx_image_to_buffer", "r", &rf_load_ktx_image_to_buffer },
|
||||
{ "rf_load_ktx_image", "r", &rf_load_ktx_image },
|
||||
{ "rf_load_ktx_image_from_file", "r", &rf_load_ktx_image_from_file },
|
||||
{ "rf_load_animated_gif", "r", &rf_load_animated_gif },
|
||||
{ "rf_load_animated_gif_file", "r", &rf_load_animated_gif_file },
|
||||
{ "rf_gif_frame_size", "r", &rf_gif_frame_size },
|
||||
{ "rf_get_frame_from_gif", "r", &rf_get_frame_from_gif },
|
||||
{ "rf_unload_gif", "", &rf_unload_gif },
|
||||
{ "rf_get_seed_for_cellular_image", "r", &rf_get_seed_for_cellular_image },
|
||||
{ "rf_gen_image_color_to_buffer", "r", &rf_gen_image_color_to_buffer },
|
||||
{ "rf_gen_image_color", "r", &rf_gen_image_color },
|
||||
{ "rf_gen_image_gradient_v_to_buffer", "r", &rf_gen_image_gradient_v_to_buffer },
|
||||
{ "rf_gen_image_gradient_v", "r", &rf_gen_image_gradient_v },
|
||||
{ "rf_gen_image_gradient_h_to_buffer", "r", &rf_gen_image_gradient_h_to_buffer },
|
||||
{ "rf_gen_image_gradient_h", "r", &rf_gen_image_gradient_h },
|
||||
{ "rf_gen_image_gradient_radial_to_buffer", "r", &rf_gen_image_gradient_radial_to_buffer },
|
||||
{ "rf_gen_image_gradient_radial", "r", &rf_gen_image_gradient_radial },
|
||||
{ "rf_gen_image_checked_to_buffer", "r", &rf_gen_image_checked_to_buffer },
|
||||
{ "rf_gen_image_checked", "r", &rf_gen_image_checked },
|
||||
{ "rf_gen_image_white_noise_to_buffer", "r", &rf_gen_image_white_noise_to_buffer },
|
||||
{ "rf_gen_image_white_noise", "r", &rf_gen_image_white_noise },
|
||||
{ "rf_gen_image_perlin_noise_to_buffer", "r", &rf_gen_image_perlin_noise_to_buffer },
|
||||
{ "rf_gen_image_perlin_noise", "r", &rf_gen_image_perlin_noise },
|
||||
{ "rf_gen_image_cellular_to_buffer", "r", &rf_gen_image_cellular_to_buffer },
|
||||
{ "rf_gen_image_cellular", "r", &rf_gen_image_cellular },
|
||||
{ "rf_image_copy_to_buffer", "r", &rf_image_copy_to_buffer },
|
||||
{ "rf_image_copy", "r", &rf_image_copy },
|
||||
{ "rf_image_crop_to_buffer", "r", &rf_image_crop_to_buffer },
|
||||
{ "rf_image_crop", "r", &rf_image_crop },
|
||||
{ "rf_image_resize_to_buffer", "r", &rf_image_resize_to_buffer },
|
||||
{ "rf_image_resize", "r", &rf_image_resize },
|
||||
{ "rf_image_resize_nn_to_buffer", "r", &rf_image_resize_nn_to_buffer },
|
||||
{ "rf_image_resize_nn", "r", &rf_image_resize_nn },
|
||||
{ "rf_image_format_to_buffer", "r", &rf_image_format_to_buffer },
|
||||
{ "rf_image_format", "r", &rf_image_format },
|
||||
{ "rf_image_alpha_mask_to_buffer", "r", &rf_image_alpha_mask_to_buffer },
|
||||
{ "rf_image_alpha_clear", "r", &rf_image_alpha_clear },
|
||||
{ "rf_image_alpha_premultiply", "r", &rf_image_alpha_premultiply },
|
||||
{ "rf_image_alpha_crop_rec", "r", &rf_image_alpha_crop_rec },
|
||||
{ "rf_image_alpha_crop", "r", &rf_image_alpha_crop },
|
||||
{ "rf_image_dither", "r", &rf_image_dither },
|
||||
{ "rf_image_flip_vertical_in_place", "", &rf_image_flip_vertical_in_place },
|
||||
{ "rf_image_flip_vertical_to_buffer", "r", &rf_image_flip_vertical_to_buffer },
|
||||
{ "rf_image_flip_vertical", "r", &rf_image_flip_vertical },
|
||||
{ "rf_image_flip_horizontal_in_place", "", &rf_image_flip_horizontal_in_place },
|
||||
{ "rf_image_flip_horizontal_to_buffer", "r", &rf_image_flip_horizontal_to_buffer },
|
||||
{ "rf_image_flip_horizontal", "r", &rf_image_flip_horizontal },
|
||||
{ "rf_image_rotate_cw_to_buffer", "r", &rf_image_rotate_cw_to_buffer },
|
||||
{ "rf_image_rotate_cw", "r", &rf_image_rotate_cw },
|
||||
{ "rf_image_rotate_ccw_to_buffer", "r", &rf_image_rotate_ccw_to_buffer },
|
||||
{ "rf_image_rotate_ccw", "r", &rf_image_rotate_ccw },
|
||||
{ "rf_image_color_tint_to_buffer", "r", &rf_image_color_tint_to_buffer },
|
||||
{ "rf_image_color_tint", "r", &rf_image_color_tint },
|
||||
{ "rf_image_color_invert_to_buffer", "r", &rf_image_color_invert_to_buffer },
|
||||
{ "rf_image_color_invert", "r", &rf_image_color_invert },
|
||||
{ "rf_image_color_grayscale_to_buffer", "r", &rf_image_color_grayscale_to_buffer },
|
||||
{ "rf_image_color_grayscale", "r", &rf_image_color_grayscale },
|
||||
{ "rf_image_color_contrast_to_buffer", "r", &rf_image_color_contrast_to_buffer },
|
||||
{ "rf_image_color_contrast", "r", &rf_image_color_contrast },
|
||||
{ "rf_image_color_brightness_to_buffer", "r", &rf_image_color_brightness_to_buffer },
|
||||
{ "rf_image_color_brightness", "r", &rf_image_color_brightness },
|
||||
{ "rf_image_color_replace_to_buffer", "r", &rf_image_color_replace_to_buffer },
|
||||
{ "rf_image_color_replace", "r", &rf_image_color_replace },
|
||||
{ "rf_image_draw", "", &rf_image_draw },
|
||||
{ "rf_image_draw_rectangle", "", &rf_image_draw_rectangle },
|
||||
{ "rf_image_draw_rectangle_lines", "", &rf_image_draw_rectangle_lines },
|
||||
{ "rf_audio_device_count", "r", &rf_audio_device_count },
|
||||
{ "rf_default_audio_device", "r", &rf_default_audio_device },
|
||||
{ "rf_start_audio_device", "", &rf_start_audio_device },
|
||||
{ "rf_close_audio_device", "", &rf_close_audio_device },
|
||||
{ "rf_is_audio_device_ready", "", &rf_is_audio_device_ready },
|
||||
{ "rf_set_master_volume", "", &rf_set_master_volume },
|
||||
{ "rf_audio_format_from_filename_extension", "r", &rf_audio_format_from_filename_extension },
|
||||
{ "rf_audio_format_from_filename_extension_string", "r", &rf_audio_format_from_filename_extension_string },
|
||||
{ "rf_fully_decode_wav", "r", &rf_fully_decode_wav },
|
||||
{ "rf_fully_decode_ogg", "r", &rf_fully_decode_ogg },
|
||||
{ "rf_fully_decode_flac", "r", &rf_fully_decode_flac },
|
||||
{ "rf_fully_decode_mp3", "r", &rf_fully_decode_mp3 },
|
||||
{ "rf_fully_decode_xm", "r", &rf_fully_decode_xm },
|
||||
{ "rf_fully_decode_mod", "r", &rf_fully_decode_mod },
|
||||
{ "rf_fully_decode_audio_from_buffer", "r", &rf_fully_decode_audio_from_buffer },
|
||||
{ "rf_fully_decode_audio_from_file", "r", &rf_fully_decode_audio_from_file },
|
||||
{ "rf_unload_audio_data", "", &rf_unload_audio_data },
|
||||
{ "rf_load_encoded_audio_from_buffer", "r", &rf_load_encoded_audio_from_buffer },
|
||||
{ "rf_load_encoded_audio_from_file", "r", &rf_load_encoded_audio_from_file },
|
||||
{ "rf_audio_play", "", &rf_audio_play },
|
||||
{ "rf_audio_stop", "", &rf_audio_stop },
|
||||
{ "rf_audio_pause", "", &rf_audio_pause },
|
||||
{ "rf_audio_resume", "", &rf_audio_resume },
|
||||
{ "rf_audio_update", "", &rf_audio_update },
|
||||
{ "rf_audio_set_volume", "", &rf_audio_set_volume },
|
||||
{ "rf_audio_set_pitch", "", &rf_audio_set_pitch },
|
||||
{ "rf_audio_time_len", "", &rf_audio_time_len },
|
||||
{ "rf_audio_time_played", "", &rf_audio_time_played },
|
||||
{ "rf_audio_is_playing", "", &rf_audio_is_playing },
|
||||
{ "rf_audio_volume", "", &rf_audio_volume },
|
||||
{ "rf_audio_pitch", "", &rf_audio_pitch },
|
||||
{ "rf_gfx_load_shader", "r", &rf_gfx_load_shader },
|
||||
{ "rf_gfx_unload_shader", "", &rf_gfx_unload_shader },
|
||||
{ "rf_gfx_get_shader_location", "", &rf_gfx_get_shader_location },
|
||||
{ "rf_gfx_set_shader_value", "", &rf_gfx_set_shader_value },
|
||||
{ "rf_gfx_set_shader_value_v", "", &rf_gfx_set_shader_value_v },
|
||||
{ "rf_gfx_set_shader_value_matrix", "", &rf_gfx_set_shader_value_matrix },
|
||||
{ "rf_gfx_set_shader_value_texture", "", &rf_gfx_set_shader_value_texture },
|
||||
{ "rf_gfx_get_matrix_projection", "r", &rf_gfx_get_matrix_projection },
|
||||
{ "rf_gfx_get_matrix_modelview", "r", &rf_gfx_get_matrix_modelview },
|
||||
{ "rf_gfx_set_matrix_projection", "", &rf_gfx_set_matrix_projection },
|
||||
{ "rf_gfx_set_matrix_modelview", "", &rf_gfx_set_matrix_modelview },
|
||||
{ "rf_gfx_blend_mode", "", &rf_gfx_blend_mode },
|
||||
{ "rf_gfx_matrix_mode", "", &rf_gfx_matrix_mode },
|
||||
{ "rf_gfx_push_matrix", "", &rf_gfx_push_matrix },
|
||||
{ "rf_gfx_pop_matrix", "", &rf_gfx_pop_matrix },
|
||||
{ "rf_gfx_load_identity", "", &rf_gfx_load_identity },
|
||||
{ "rf_gfx_translatef", "", &rf_gfx_translatef },
|
||||
{ "rf_gfx_rotatef", "", &rf_gfx_rotatef },
|
||||
{ "rf_gfx_scalef", "", &rf_gfx_scalef },
|
||||
{ "rf_gfx_mult_matrixf", "", &rf_gfx_mult_matrixf },
|
||||
{ "rf_gfx_frustum", "", &rf_gfx_frustum },
|
||||
{ "rf_gfx_ortho", "", &rf_gfx_ortho },
|
||||
{ "rf_gfx_viewport", "", &rf_gfx_viewport },
|
||||
{ "rf_gfx_begin", "", &rf_gfx_begin },
|
||||
{ "rf_gfx_end", "", &rf_gfx_end },
|
||||
{ "rf_gfx_vertex2i", "", &rf_gfx_vertex2i },
|
||||
{ "rf_gfx_vertex2f", "", &rf_gfx_vertex2f },
|
||||
{ "rf_gfx_vertex3f", "", &rf_gfx_vertex3f },
|
||||
{ "rf_gfx_tex_coord2f", "", &rf_gfx_tex_coord2f },
|
||||
{ "rf_gfx_normal3f", "", &rf_gfx_normal3f },
|
||||
{ "rf_gfx_color4ub", "", &rf_gfx_color4ub },
|
||||
{ "rf_gfx_color3f", "", &rf_gfx_color3f },
|
||||
{ "rf_gfx_color4f", "", &rf_gfx_color4f },
|
||||
{ "rf_gfx_enable_texture", "", &rf_gfx_enable_texture },
|
||||
{ "rf_gfx_disable_texture", "", &rf_gfx_disable_texture },
|
||||
{ "rf_gfx_set_texture_wrap", "", &rf_gfx_set_texture_wrap },
|
||||
{ "rf_gfx_set_texture_filter", "", &rf_gfx_set_texture_filter },
|
||||
{ "rf_gfx_enable_render_texture", "", &rf_gfx_enable_render_texture },
|
||||
{ "rf_gfx_disable_render_texture", "", &rf_gfx_disable_render_texture },
|
||||
{ "rf_gfx_enable_depth_test", "", &rf_gfx_enable_depth_test },
|
||||
{ "rf_gfx_disable_depth_test", "", &rf_gfx_disable_depth_test },
|
||||
{ "rf_gfx_enable_backface_culling", "", &rf_gfx_enable_backface_culling },
|
||||
{ "rf_gfx_disable_backface_culling", "", &rf_gfx_disable_backface_culling },
|
||||
{ "rf_gfx_enable_scissor_test", "", &rf_gfx_enable_scissor_test },
|
||||
{ "rf_gfx_disable_scissor_test", "", &rf_gfx_disable_scissor_test },
|
||||
{ "rf_gfx_scissor", "", &rf_gfx_scissor },
|
||||
{ "rf_gfx_enable_wire_mode", "", &rf_gfx_enable_wire_mode },
|
||||
{ "rf_gfx_disable_wire_mode", "", &rf_gfx_disable_wire_mode },
|
||||
{ "rf_gfx_delete_textures", "", &rf_gfx_delete_textures },
|
||||
{ "rf_gfx_delete_render_textures", "", &rf_gfx_delete_render_textures },
|
||||
{ "rf_gfx_delete_shader", "", &rf_gfx_delete_shader },
|
||||
{ "rf_gfx_delete_vertex_arrays", "", &rf_gfx_delete_vertex_arrays },
|
||||
{ "rf_gfx_delete_buffers", "", &rf_gfx_delete_buffers },
|
||||
{ "rf_gfx_clear_color", "", &rf_gfx_clear_color },
|
||||
{ "rf_gfx_clear_screen_buffers", "", &rf_gfx_clear_screen_buffers },
|
||||
{ "rf_gfx_update_buffer", "", &rf_gfx_update_buffer },
|
||||
{ "rf_gfx_load_attrib_buffer", "", &rf_gfx_load_attrib_buffer },
|
||||
{ "rf_gfx_init_vertex_buffer", "", &rf_gfx_init_vertex_buffer },
|
||||
{ "rf_gfx_close", "", &rf_gfx_close },
|
||||
{ "rf_gfx_draw", "", &rf_gfx_draw },
|
||||
{ "rf_gfx_check_buffer_limit", "", &rf_gfx_check_buffer_limit },
|
||||
{ "rf_gfx_set_debug_marker", "", &rf_gfx_set_debug_marker },
|
||||
{ "rf_gfx_load_texture", "", &rf_gfx_load_texture },
|
||||
{ "rf_gfx_load_texture_depth", "", &rf_gfx_load_texture_depth },
|
||||
{ "rf_gfx_load_texture_cubemap", "", &rf_gfx_load_texture_cubemap },
|
||||
{ "rf_gfx_update_texture", "", &rf_gfx_update_texture },
|
||||
{ "rf_gfx_get_internal_texture_formats", "r", &rf_gfx_get_internal_texture_formats },
|
||||
{ "rf_gfx_unload_texture", "", &rf_gfx_unload_texture },
|
||||
{ "rf_gfx_generate_mipmaps", "", &rf_gfx_generate_mipmaps },
|
||||
{ "rf_gfx_read_texture_pixels_to_buffer", "r", &rf_gfx_read_texture_pixels_to_buffer },
|
||||
{ "rf_gfx_read_texture_pixels", "r", &rf_gfx_read_texture_pixels },
|
||||
{ "rf_gfx_read_screen_pixels", "", &rf_gfx_read_screen_pixels },
|
||||
{ "rf_gfx_load_render_texture", "r", &rf_gfx_load_render_texture },
|
||||
{ "rf_gfx_render_texture_attach", "", &rf_gfx_render_texture_attach },
|
||||
{ "rf_gfx_render_texture_complete", "", &rf_gfx_render_texture_complete },
|
||||
{ "rf_gfx_load_mesh", "", &rf_gfx_load_mesh },
|
||||
{ "rf_gfx_update_mesh", "", &rf_gfx_update_mesh },
|
||||
{ "rf_gfx_update_mesh_at", "", &rf_gfx_update_mesh_at },
|
||||
{ "rf_gfx_draw_mesh", "", &rf_gfx_draw_mesh },
|
||||
{ "rf_gfx_unload_mesh", "", &rf_gfx_unload_mesh },
|
||||
{ "rf_create_custom_render_batch_from_buffers", "r", &rf_create_custom_render_batch_from_buffers },
|
||||
{ "rf_create_custom_render_batch", "r", &rf_create_custom_render_batch },
|
||||
{ "rf_create_default_render_batch", "r", &rf_create_default_render_batch },
|
||||
{ "rf_set_active_render_batch", "", &rf_set_active_render_batch },
|
||||
{ "rf_unload_render_batch", "", &rf_unload_render_batch },
|
||||
{ "rf_load_texture_from_file", "r", &rf_load_texture_from_file },
|
||||
{ "rf_load_texture_from_file_data", "r", &rf_load_texture_from_file_data },
|
||||
{ "rf_load_texture_from_image", "r", &rf_load_texture_from_image },
|
||||
{ "rf_load_texture_from_image_with_mipmaps", "r", &rf_load_texture_from_image_with_mipmaps },
|
||||
{ "rf_load_texture_cubemap_from_image", "r", &rf_load_texture_cubemap_from_image },
|
||||
{ "rf_load_render_texture", "r", &rf_load_render_texture },
|
||||
{ "rf_update_texture", "", &rf_update_texture },
|
||||
{ "rf_gen_texture_mipmaps", "", &rf_gen_texture_mipmaps },
|
||||
{ "rf_set_texture_filter", "", &rf_set_texture_filter },
|
||||
{ "rf_set_texture_wrap", "", &rf_set_texture_wrap },
|
||||
{ "rf_unload_texture", "", &rf_unload_texture },
|
||||
{ "rf_unload_render_texture", "", &rf_unload_render_texture },
|
||||
{ "rf_gen_texture_cubemap", "r", &rf_gen_texture_cubemap },
|
||||
{ "rf_gen_texture_irradiance", "r", &rf_gen_texture_irradiance },
|
||||
{ "rf_gen_texture_prefilter", "r", &rf_gen_texture_prefilter },
|
||||
{ "rf_gen_texture_brdf", "r", &rf_gen_texture_brdf },
|
||||
{ "rf_parse_ttf_font", "r", &rf_parse_ttf_font },
|
||||
{ "rf_compute_ttf_font_glyph_metrics", "", &rf_compute_ttf_font_glyph_metrics },
|
||||
{ "rf_compute_ttf_font_atlas_width", "", &rf_compute_ttf_font_atlas_width },
|
||||
{ "rf_generate_ttf_font_atlas", "r", &rf_generate_ttf_font_atlas },
|
||||
{ "rf_ttf_font_from_atlas", "r", &rf_ttf_font_from_atlas },
|
||||
{ "rf_load_ttf_font_from_data", "r", &rf_load_ttf_font_from_data },
|
||||
{ "rf_load_ttf_font_from_file", "r", &rf_load_ttf_font_from_file },
|
||||
{ "rf_compute_glyph_metrics_from_image", "", &rf_compute_glyph_metrics_from_image },
|
||||
{ "rf_load_image_font_from_data", "r", &rf_load_image_font_from_data },
|
||||
{ "rf_load_image_font", "r", &rf_load_image_font },
|
||||
{ "rf_load_image_font_from_file", "r", &rf_load_image_font_from_file },
|
||||
{ "rf_unload_font", "", &rf_unload_font },
|
||||
{ "rf_get_glyph_index", "r", &rf_get_glyph_index },
|
||||
{ "rf_font_height", "", &rf_font_height },
|
||||
{ "rf_measure_text", "r", &rf_measure_text },
|
||||
{ "rf_measure_text_rec", "r", &rf_measure_text_rec },
|
||||
{ "rf_measure_string", "r", &rf_measure_string },
|
||||
{ "rf_measure_string_rec", "r", &rf_measure_string_rec },
|
||||
{ "rf_clear", "", &rf_clear },
|
||||
{ "rf_begin", "", &rf_begin },
|
||||
{ "rf_end", "", &rf_end },
|
||||
{ "rf_begin_2d", "", &rf_begin_2d },
|
||||
{ "rf_end_2d", "", &rf_end_2d },
|
||||
{ "rf_begin_3d", "", &rf_begin_3d },
|
||||
{ "rf_end_3d", "", &rf_end_3d },
|
||||
{ "rf_begin_render_to_texture", "", &rf_begin_render_to_texture },
|
||||
{ "rf_end_render_to_texture", "", &rf_end_render_to_texture },
|
||||
{ "rf_begin_scissor_mode", "", &rf_begin_scissor_mode },
|
||||
{ "rf_end_scissor_mode", "", &rf_end_scissor_mode },
|
||||
{ "rf_begin_shader", "", &rf_begin_shader },
|
||||
{ "rf_end_shader", "", &rf_end_shader },
|
||||
{ "rf_begin_blend_mode", "", &rf_begin_blend_mode },
|
||||
{ "rf_end_blend_mode", "", &rf_end_blend_mode },
|
||||
{ "rf_draw_pixel", "", &rf_draw_pixel },
|
||||
{ "rf_draw_pixel_v", "", &rf_draw_pixel_v },
|
||||
{ "rf_draw_line", "", &rf_draw_line },
|
||||
{ "rf_draw_line_v", "", &rf_draw_line_v },
|
||||
{ "rf_draw_line_ex", "", &rf_draw_line_ex },
|
||||
{ "rf_draw_line_bezier", "", &rf_draw_line_bezier },
|
||||
{ "rf_draw_line_strip", "", &rf_draw_line_strip },
|
||||
{ "rf_draw_circle", "", &rf_draw_circle },
|
||||
{ "rf_draw_circle_v", "", &rf_draw_circle_v },
|
||||
{ "rf_draw_circle_sector", "", &rf_draw_circle_sector },
|
||||
{ "rf_draw_circle_sector_lines", "", &rf_draw_circle_sector_lines },
|
||||
{ "rf_draw_circle_gradient", "", &rf_draw_circle_gradient },
|
||||
{ "rf_draw_circle_lines", "", &rf_draw_circle_lines },
|
||||
{ "rf_draw_ring", "", &rf_draw_ring },
|
||||
{ "rf_draw_ring_lines", "", &rf_draw_ring_lines },
|
||||
{ "rf_draw_rectangle", "", &rf_draw_rectangle },
|
||||
{ "rf_draw_rectangle_v", "", &rf_draw_rectangle_v },
|
||||
{ "rf_draw_rectangle_rec", "", &rf_draw_rectangle_rec },
|
||||
{ "rf_draw_rectangle_pro", "", &rf_draw_rectangle_pro },
|
||||
{ "rf_draw_rectangle_gradient_v", "", &rf_draw_rectangle_gradient_v },
|
||||
{ "rf_draw_rectangle_gradient_h", "", &rf_draw_rectangle_gradient_h },
|
||||
{ "rf_draw_rectangle_gradient", "", &rf_draw_rectangle_gradient },
|
||||
{ "rf_draw_rectangle_outline", "", &rf_draw_rectangle_outline },
|
||||
{ "rf_draw_rectangle_rounded", "", &rf_draw_rectangle_rounded },
|
||||
{ "rf_draw_rectangle_rounded_lines", "", &rf_draw_rectangle_rounded_lines },
|
||||
{ "rf_draw_triangle", "", &rf_draw_triangle },
|
||||
{ "rf_draw_triangle_lines", "", &rf_draw_triangle_lines },
|
||||
{ "rf_draw_triangle_fan", "", &rf_draw_triangle_fan },
|
||||
{ "rf_draw_triangle_strip", "", &rf_draw_triangle_strip },
|
||||
{ "rf_draw_poly", "", &rf_draw_poly },
|
||||
{ "rf_draw_texture", "", &rf_draw_texture },
|
||||
{ "rf_draw_texture_ex", "", &rf_draw_texture_ex },
|
||||
{ "rf_draw_texture_region", "", &rf_draw_texture_region },
|
||||
{ "rf_draw_texture_npatch", "", &rf_draw_texture_npatch },
|
||||
{ "rf_draw_string", "", &rf_draw_string },
|
||||
{ "rf_draw_string_ex", "", &rf_draw_string_ex },
|
||||
{ "rf_draw_string_wrap", "", &rf_draw_string_wrap },
|
||||
{ "rf_draw_string_rec", "", &rf_draw_string_rec },
|
||||
{ "rf_draw_text", "", &rf_draw_text },
|
||||
{ "rf_draw_text_ex", "", &rf_draw_text_ex },
|
||||
{ "rf_draw_text_wrap", "", &rf_draw_text_wrap },
|
||||
{ "rf_draw_text_rec", "", &rf_draw_text_rec },
|
||||
{ "rf_draw_line3d", "", &rf_draw_line3d },
|
||||
{ "rf_draw_circle3d", "", &rf_draw_circle3d },
|
||||
{ "rf_draw_cube", "", &rf_draw_cube },
|
||||
{ "rf_draw_cube_wires", "", &rf_draw_cube_wires },
|
||||
{ "rf_draw_cube_texture", "", &rf_draw_cube_texture },
|
||||
{ "rf_draw_sphere", "", &rf_draw_sphere },
|
||||
{ "rf_draw_sphere_ex", "", &rf_draw_sphere_ex },
|
||||
{ "rf_draw_sphere_wires", "", &rf_draw_sphere_wires },
|
||||
{ "rf_draw_cylinder", "", &rf_draw_cylinder },
|
||||
{ "rf_draw_cylinder_wires", "", &rf_draw_cylinder_wires },
|
||||
{ "rf_draw_plane", "", &rf_draw_plane },
|
||||
{ "rf_draw_ray", "", &rf_draw_ray },
|
||||
{ "rf_draw_grid", "", &rf_draw_grid },
|
||||
{ "rf_draw_gizmo", "", &rf_draw_gizmo },
|
||||
{ "rf_draw_model", "", &rf_draw_model },
|
||||
{ "rf_draw_model_ex", "", &rf_draw_model_ex },
|
||||
{ "rf_draw_model_wires", "", &rf_draw_model_wires },
|
||||
{ "rf_draw_bounding_box", "", &rf_draw_bounding_box },
|
||||
{ "rf_draw_billboard", "", &rf_draw_billboard },
|
||||
{ "rf_draw_billboard_rec", "", &rf_draw_billboard_rec },
|
||||
{ "rf_mesh_bounding_box", "r", &rf_mesh_bounding_box },
|
||||
{ "rf_mesh_compute_tangents", "", &rf_mesh_compute_tangents },
|
||||
{ "rf_mesh_compute_binormals", "", &rf_mesh_compute_binormals },
|
||||
{ "rf_unload_mesh", "", &rf_unload_mesh },
|
||||
{ "rf_load_model", "r", &rf_load_model },
|
||||
{ "rf_load_model_from_obj", "r", &rf_load_model_from_obj },
|
||||
{ "rf_load_model_from_iqm", "r", &rf_load_model_from_iqm },
|
||||
{ "rf_load_model_from_gltf", "r", &rf_load_model_from_gltf },
|
||||
{ "rf_load_model_from_mesh", "r", &rf_load_model_from_mesh },
|
||||
{ "rf_unload_model", "", &rf_unload_model },
|
||||
{ "rf_load_materials_from_mtl", "r", &rf_load_materials_from_mtl },
|
||||
{ "rf_set_material_texture", "", &rf_set_material_texture },
|
||||
{ "rf_set_model_mesh_material", "", &rf_set_model_mesh_material },
|
||||
{ "rf_unload_material", "", &rf_unload_material },
|
||||
{ "rf_load_model_animations_from_iqm_file", "r", &rf_load_model_animations_from_iqm_file },
|
||||
{ "rf_load_model_animations_from_iqm", "r", &rf_load_model_animations_from_iqm },
|
||||
{ "rf_update_model_animation", "", &rf_update_model_animation },
|
||||
{ "rf_is_model_animation_valid", "", &rf_is_model_animation_valid },
|
||||
{ "rf_unload_model_animation", "", &rf_unload_model_animation },
|
||||
{ "rf_gen_mesh_cube", "r", &rf_gen_mesh_cube },
|
||||
{ "rf_gen_mesh_poly", "r", &rf_gen_mesh_poly },
|
||||
{ "rf_gen_mesh_plane", "r", &rf_gen_mesh_plane },
|
||||
{ "rf_gen_mesh_sphere", "r", &rf_gen_mesh_sphere },
|
||||
{ "rf_gen_mesh_hemi_sphere", "r", &rf_gen_mesh_hemi_sphere },
|
||||
{ "rf_gen_mesh_cylinder", "r", &rf_gen_mesh_cylinder },
|
||||
{ "rf_gen_mesh_torus", "r", &rf_gen_mesh_torus },
|
||||
{ "rf_gen_mesh_knot", "r", &rf_gen_mesh_knot },
|
||||
{ "rf_gen_mesh_heightmap", "r", &rf_gen_mesh_heightmap },
|
||||
{ "rf_gen_mesh_cubicmap", "r", &rf_gen_mesh_cubicmap },
|
||||
{ "rf_init_context", "", &rf_init_context },
|
||||
{ "rf_init_gfx", "", &rf_init_gfx },
|
||||
{ "rf_init_audio", "", &rf_init_audio },
|
||||
{ "rf_load_default_material", "r", &rf_load_default_material },
|
||||
{ "rf_load_default_shader", "r", &rf_load_default_shader },
|
||||
{ "rf_get_current_render_batch", "r", &rf_get_current_render_batch },
|
||||
{ "rf_get_default_font", "r", &rf_get_default_font },
|
||||
{ "rf_get_default_shader", "r", &rf_get_default_shader },
|
||||
{ "rf_get_default_texture", "r", &rf_get_default_texture },
|
||||
{ "rf_get_context", "r", &rf_get_context },
|
||||
{ "rf_get_screen_data", "r", &rf_get_screen_data },
|
||||
{ "rf_set_global_context_pointer", "", &rf_set_global_context_pointer },
|
||||
{ "rf_set_viewport", "", &rf_set_viewport },
|
||||
{ "rf_set_shapes_texture", "", &rf_set_shapes_texture },
|
||||
{ "rf_load_default_material_ez", "r", &rf_load_default_material_ez },
|
||||
{ "rf_get_screen_data_ez", "r", &rf_get_screen_data_ez },
|
||||
{ "rf_decode_base64_ez", "r", &rf_decode_base64_ez },
|
||||
{ "rf_gfx_read_texture_pixels_ez", "r", &rf_gfx_read_texture_pixels_ez },
|
||||
{ "rf_image_pixels_to_rgba32_ez", "r", &rf_image_pixels_to_rgba32_ez },
|
||||
{ "rf_image_compute_pixels_to_normalized_ez", "r", &rf_image_compute_pixels_to_normalized_ez },
|
||||
{ "rf_image_extract_palette_ez", "r", &rf_image_extract_palette_ez },
|
||||
{ "rf_load_image_from_file_data_ez", "r", &rf_load_image_from_file_data_ez },
|
||||
{ "rf_load_image_from_hdr_file_data_ez", "r", &rf_load_image_from_hdr_file_data_ez },
|
||||
{ "rf_load_image_from_file_ez", "r", &rf_load_image_from_file_ez },
|
||||
{ "rf_unload_image_ez", "", &rf_unload_image_ez },
|
||||
{ "rf_image_copy_ez", "r", &rf_image_copy_ez },
|
||||
{ "rf_image_crop_ez", "r", &rf_image_crop_ez },
|
||||
{ "rf_image_resize_ez", "r", &rf_image_resize_ez },
|
||||
{ "rf_image_resize_nn_ez", "r", &rf_image_resize_nn_ez },
|
||||
{ "rf_image_format_ez", "r", &rf_image_format_ez },
|
||||
{ "rf_image_alpha_clear_ez", "r", &rf_image_alpha_clear_ez },
|
||||
{ "rf_image_alpha_premultiply_ez", "r", &rf_image_alpha_premultiply_ez },
|
||||
{ "rf_image_alpha_crop_ez", "r", &rf_image_alpha_crop_ez },
|
||||
{ "rf_image_dither_ez", "r", &rf_image_dither_ez },
|
||||
{ "rf_image_flip_vertical_ez", "r", &rf_image_flip_vertical_ez },
|
||||
{ "rf_image_flip_horizontal_ez", "r", &rf_image_flip_horizontal_ez },
|
||||
{ "rf_get_seed_for_cellular_image_ez", "r", &rf_get_seed_for_cellular_image_ez },
|
||||
{ "rf_gen_image_color_ez", "r", &rf_gen_image_color_ez },
|
||||
{ "rf_gen_image_gradient_v_ez", "r", &rf_gen_image_gradient_v_ez },
|
||||
{ "rf_gen_image_gradient_h_ez", "r", &rf_gen_image_gradient_h_ez },
|
||||
{ "rf_gen_image_gradient_radial_ez", "r", &rf_gen_image_gradient_radial_ez },
|
||||
{ "rf_gen_image_checked_ez", "r", &rf_gen_image_checked_ez },
|
||||
{ "rf_gen_image_white_noise_ez", "r", &rf_gen_image_white_noise_ez },
|
||||
{ "rf_gen_image_perlin_noise_ez", "r", &rf_gen_image_perlin_noise_ez },
|
||||
{ "rf_gen_image_cellular_ez", "r", &rf_gen_image_cellular_ez },
|
||||
{ "rf_image_gen_mipmaps_ez", "r", &rf_image_gen_mipmaps_ez },
|
||||
{ "rf_unload_mipmaps_image_ez", "", &rf_unload_mipmaps_image_ez },
|
||||
{ "rf_load_dds_image_ez", "r", &rf_load_dds_image_ez },
|
||||
{ "rf_load_dds_image_from_file_ez", "r", &rf_load_dds_image_from_file_ez },
|
||||
{ "rf_load_pkm_image_ez", "r", &rf_load_pkm_image_ez },
|
||||
{ "rf_load_pkm_image_from_file_ez", "r", &rf_load_pkm_image_from_file_ez },
|
||||
{ "rf_load_ktx_image_ez", "r", &rf_load_ktx_image_ez },
|
||||
{ "rf_load_ktx_image_from_file_ez", "r", &rf_load_ktx_image_from_file_ez },
|
||||
{ "rf_load_animated_gif_ez", "r", &rf_load_animated_gif_ez },
|
||||
{ "rf_load_animated_gif_file_ez", "r", &rf_load_animated_gif_file_ez },
|
||||
{ "rf_unload_gif_ez", "", &rf_unload_gif_ez },
|
||||
{ "rf_load_texture_from_file_ez", "r", &rf_load_texture_from_file_ez },
|
||||
{ "rf_load_texture_from_file_data_ez", "r", &rf_load_texture_from_file_data_ez },
|
||||
{ "rf_load_texture_cubemap_from_image_ez", "r", &rf_load_texture_cubemap_from_image_ez },
|
||||
{ "rf_load_ttf_font_from_data_ez", "r", &rf_load_ttf_font_from_data_ez },
|
||||
{ "rf_load_ttf_font_from_file_ez", "r", &rf_load_ttf_font_from_file_ez },
|
||||
{ "rf_load_image_font_ez", "r", &rf_load_image_font_ez },
|
||||
{ "rf_load_image_font_from_file_ez", "r", &rf_load_image_font_from_file_ez },
|
||||
{ "rf_unload_font_ez", "", &rf_unload_font_ez },
|
||||
{ "rf_decode_utf8_ez", "r", &rf_decode_utf8_ez },
|
||||
{ "rf_image_draw_ez", "", &rf_image_draw_ez },
|
||||
{ "rf_image_draw_rectangle_ez", "", &rf_image_draw_rectangle_ez },
|
||||
{ "rf_image_draw_rectangle_lines_ez", "", &rf_image_draw_rectangle_lines_ez },
|
||||
{ "rf_mesh_compute_tangents_ez", "", &rf_mesh_compute_tangents_ez },
|
||||
{ "rf_unload_mesh_ez", "", &rf_unload_mesh_ez },
|
||||
{ "rf_load_model_ez", "r", &rf_load_model_ez },
|
||||
{ "rf_load_model_from_obj_ez", "r", &rf_load_model_from_obj_ez },
|
||||
{ "rf_load_model_from_iqm_ez", "r", &rf_load_model_from_iqm_ez },
|
||||
{ "rf_load_model_from_gltf_ez", "r", &rf_load_model_from_gltf_ez },
|
||||
{ "rf_load_model_from_mesh_ez", "r", &rf_load_model_from_mesh_ez },
|
||||
{ "rf_unload_model_ez", "", &rf_unload_model_ez },
|
||||
{ "rf_load_materials_from_mtl_ez", "r", &rf_load_materials_from_mtl_ez },
|
||||
{ "rf_unload_material_ez", "", &rf_unload_material_ez },
|
||||
{ "rf_load_model_animations_from_iqm_file_ez", "r", &rf_load_model_animations_from_iqm_file_ez },
|
||||
{ "rf_load_model_animations_from_iqm_ez", "r", &rf_load_model_animations_from_iqm_ez },
|
||||
{ "rf_unload_model_animation_ez", "", &rf_unload_model_animation_ez },
|
||||
{ "rf_gen_mesh_cube_ez", "r", &rf_gen_mesh_cube_ez },
|
||||
{ "rf_gen_mesh_poly_ez", "r", &rf_gen_mesh_poly_ez },
|
||||
{ "rf_gen_mesh_plane_ez", "r", &rf_gen_mesh_plane_ez },
|
||||
{ "rf_gen_mesh_sphere_ez", "r", &rf_gen_mesh_sphere_ez },
|
||||
{ "rf_gen_mesh_hemi_sphere_ez", "r", &rf_gen_mesh_hemi_sphere_ez },
|
||||
{ "rf_gen_mesh_cylinder_ez", "r", &rf_gen_mesh_cylinder_ez },
|
||||
{ "rf_gen_mesh_torus_ez", "r", &rf_gen_mesh_torus_ez },
|
||||
{ "rf_gen_mesh_knot_ez", "r", &rf_gen_mesh_knot_ez },
|
||||
{ "rf_gen_mesh_heightmap_ez", "r", &rf_gen_mesh_heightmap_ez },
|
||||
{ "rf_gen_mesh_cubicmap_ez", "r", &rf_gen_mesh_cubicmap_ez },
|
||||
{ NULL, NULL, NULL },
|
||||
};
|
1
raylib
1
raylib
@ -1 +0,0 @@
|
||||
Subproject commit be03613d1b6f9b0051d78c790f97df069150c65f
|
@ -17,23 +17,23 @@
|
||||
-- math metamethods
|
||||
local new = ffi.new
|
||||
|
||||
ffi.metatype("Vector2", {
|
||||
ffi.metatype("rf_vec2", {
|
||||
__add = function (a, b)
|
||||
if ffi.istype("Vector2", b) then
|
||||
return new("Vector2", a.x + b.x, a.y + b.y)
|
||||
if ffi.istype("rf_vec2", b) then
|
||||
return new("rf_vec2", a.x + b.x, a.y + b.y)
|
||||
else
|
||||
error "Invalid operation."
|
||||
end
|
||||
end,
|
||||
__sub = function (a, b)
|
||||
if ffi.istype("Vector2", b) then
|
||||
return new("Vector2", a.x - b.x, a.y - b.y)
|
||||
if ffi.istype("rf_vec2", b) then
|
||||
return new("rf_vec2", a.x - b.x, a.y - b.y)
|
||||
else
|
||||
error "Invalid operation."
|
||||
end
|
||||
end,
|
||||
__unm = function (a)
|
||||
return new("Vector2", -a.x, -a.y)
|
||||
return new("rf_vec2", -a.x, -a.y)
|
||||
end,
|
||||
__len = function (a)
|
||||
return math.sqrt(a.x * a.x + a.y * a.y)
|
||||
@ -44,43 +44,43 @@ ffi.metatype("Vector2", {
|
||||
a, b = b, a
|
||||
end
|
||||
|
||||
if ffi.istype("Vector2", b) then -- dot product
|
||||
if ffi.istype("rf_vec2", b) then -- dot product
|
||||
return a.x * b.x + a.y * b.y
|
||||
elseif type(b) == "number" then
|
||||
return new("Vector2", a.x * b, a.y * b)
|
||||
return new("rf_vec2", a.x * b, a.y * b)
|
||||
else
|
||||
error "Invalid operation."
|
||||
end
|
||||
end,
|
||||
__div = function (a, b)
|
||||
if type(b) == "number" then
|
||||
return new("Vector2", a.x / b, a.y / b)
|
||||
return new("rf_vec2", a.x / b, a.y / b)
|
||||
else
|
||||
error "Invalid operation"
|
||||
end
|
||||
end,
|
||||
__tostring = function (a)
|
||||
return string.format("Vector2: (%g %g)", a.x, a.y)
|
||||
return string.format("rf_vec2: (%g %g)", a.x, a.y)
|
||||
end
|
||||
})
|
||||
|
||||
ffi.metatype("Vector3", {
|
||||
ffi.metatype("rf_vec3", {
|
||||
__add = function (a, b)
|
||||
if ffi.istype("Vector3", b) then
|
||||
return new("Vector3", a.x + b.x, a.y + b.y, a.z + b.z)
|
||||
if ffi.istype("rf_vec3", b) then
|
||||
return new("rf_vec3", a.x + b.x, a.y + b.y, a.z + b.z)
|
||||
else
|
||||
error "Invalid operation."
|
||||
end
|
||||
end,
|
||||
__sub = function (a, b)
|
||||
if ffi.istype("Vector3", b) then
|
||||
return new("Vector3", a.x - b.x, a.y - b.y, a.z - b.z)
|
||||
if ffi.istype("rf_vec3", b) then
|
||||
return new("rf_vec3", a.x - b.x, a.y - b.y, a.z - b.z)
|
||||
else
|
||||
error "Invalid operation."
|
||||
end
|
||||
end,
|
||||
__unm = function (a)
|
||||
return new("Vector3", -a.x, -a.y, -a.z)
|
||||
return new("rf_vec3", -a.x, -a.y, -a.z)
|
||||
end,
|
||||
__len = function (a)
|
||||
return math.sqrt(a.x * a.x + a.y * a.y + a.z * a.z)
|
||||
@ -91,23 +91,23 @@ ffi.metatype("Vector3", {
|
||||
a, b = b, a
|
||||
end
|
||||
|
||||
if ffi.istype("Vector3", b) then -- dot product
|
||||
if ffi.istype("rf_vec3", b) then -- dot product
|
||||
return a.x * b.x + a.y * b.y + a.z * b.z
|
||||
elseif type(b) == "number" then
|
||||
return new("Vector3", a.x * b, a.y * b, a.z * b)
|
||||
return new("rf_vec3", a.x * b, a.y * b, a.z * b)
|
||||
else
|
||||
error "Invalid operation."
|
||||
end
|
||||
end,
|
||||
__div = function (a, b)
|
||||
if type(b) == "number" then
|
||||
return new("Vector3", a.x / b, a.y / b, a.z / b)
|
||||
return new("rf_vec3", a.x / b, a.y / b, a.z / b)
|
||||
else
|
||||
error "Invalid operation"
|
||||
end
|
||||
end,
|
||||
__tostring = function (a)
|
||||
return string.format("Vector3: (%g %g %g)", a.x, a.y, a.z)
|
||||
return string.format("rf_vec3: (%g %g %g)", a.x, a.y, a.z)
|
||||
end
|
||||
})
|
||||
|
||||
|
41616
src/lib/rayfork.c
Normal file
41616
src/lib/rayfork.c
Normal file
File diff suppressed because it is too large
Load Diff
2662
src/lib/rayfork.h
Normal file
2662
src/lib/rayfork.h
Normal file
File diff suppressed because it is too large
Load Diff
1722
src/raylib.lua
1722
src/raylib.lua
File diff suppressed because it is too large
Load Diff
18
src/raylua.c
18
src/raylua.c
@ -20,21 +20,7 @@
|
||||
#include <lauxlib.h>
|
||||
#include <lualib.h>
|
||||
|
||||
#include <raylib.h>
|
||||
#include <rlgl.h>
|
||||
|
||||
#include <raymath.h>
|
||||
#include <easings.h>
|
||||
#include <gestures.h>
|
||||
|
||||
#define RAYGUI_SUPPORT_ICONS
|
||||
#define RAYGUI_IMPLEMENTATION
|
||||
#define RAYGUI_STATIC
|
||||
#include <raygui.h>
|
||||
|
||||
#define PHYSAC_IMPLEMENTATION
|
||||
#define PHYSAC_NO_THREADS
|
||||
#include <physac.h>
|
||||
#include "lib/rayfork.h"
|
||||
|
||||
#include "autogen/bind.c"
|
||||
#include "autogen/boot.c"
|
||||
@ -59,7 +45,7 @@ void raylua_boot(lua_State *L, lua_CFunction loadfile, lua_CFunction listfiles,
|
||||
}
|
||||
|
||||
lua_pushstring(L, "bind_entries");
|
||||
lua_pushlightuserdata(L, raylua_entries);
|
||||
lua_pushlightuserdata(L, rayfork_entries);
|
||||
lua_settable(L, -3);
|
||||
|
||||
lua_pushstring(L, "isrepl");
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
local load = loadstring
|
||||
|
||||
raylua.version = "v3.1-dev1"
|
||||
raylua.version = "v0.9 rayfork"
|
||||
|
||||
function raylua.repl()
|
||||
print("> raylua " .. raylua.version .. " <")
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <lualib.h>
|
||||
#include <lauxlib.h>
|
||||
|
||||
#include <raylib.h>
|
||||
#include "lib/rayfork.h"
|
||||
|
||||
#include "raylua.h"
|
||||
#include "lib/miniz.h"
|
||||
@ -103,7 +103,7 @@ unsigned char *raylua_loadFileData(const char *path, unsigned int *out_size)
|
||||
}
|
||||
|
||||
size_t size = stat.m_uncomp_size;
|
||||
unsigned char *buffer = RL_MALLOC(size);
|
||||
unsigned char *buffer = malloc(size);
|
||||
if (buffer == NULL) {
|
||||
printf("RAYLUA: WARN: Can't allocate file buffer for '%s'.", path);
|
||||
return NULL;
|
||||
@ -130,7 +130,7 @@ char *raylua_loadFileText(const char *path)
|
||||
}
|
||||
|
||||
size_t size = stat.m_uncomp_size;
|
||||
char *buffer = RL_MALLOC(size + 1);
|
||||
char *buffer = malloc(size + 1);
|
||||
if (buffer == NULL) {
|
||||
printf("RAYLUA: WARN: Can't allocate file buffer for '%s'.", path);
|
||||
return NULL;
|
||||
@ -174,11 +174,6 @@ int main(int argc, const char **argv)
|
||||
|
||||
lua_setglobal(L, "arg");
|
||||
|
||||
SetFilesystemOverride((FilesystemOverride){
|
||||
.loadFileData = &raylua_loadFileData,
|
||||
.loadFileText = &raylua_loadFileText,
|
||||
});
|
||||
|
||||
FILE *self = raylua_open_self(argv[0]);
|
||||
|
||||
if (self == NULL) {
|
||||
|
449
tools/api.h
449
tools/api.h
@ -1,449 +0,0 @@
|
||||
void InitWindow(int width, int height, const char *title)
|
||||
bool WindowShouldClose(void)
|
||||
void CloseWindow(void)
|
||||
bool IsWindowReady(void)
|
||||
bool IsWindowMinimized(void)
|
||||
bool IsWindowMaximized(void)
|
||||
bool IsWindowFocused(void)
|
||||
bool IsWindowResized(void)
|
||||
bool IsWindowHidden(void)
|
||||
bool IsWindowFullscreen(void)
|
||||
void ToggleFullscreen(void)
|
||||
void UnhideWindow(void)
|
||||
void HideWindow(void)
|
||||
void DecorateWindow(void)
|
||||
void UndecorateWindow(void)
|
||||
void MaximizeWindow(void)
|
||||
void RestoreWindow(void)
|
||||
void SetWindowIcon(Image image)
|
||||
void SetWindowTitle(const char *title)
|
||||
void SetWindowPosition(int x, int y)
|
||||
void SetWindowMonitor(int monitor)
|
||||
void SetWindowMinSize(int width, int height)
|
||||
void SetWindowSize(int width, int height)
|
||||
void *GetWindowHandle(void)
|
||||
int GetScreenWidth(void)
|
||||
int GetScreenHeight(void)
|
||||
int GetMonitorCount(void)
|
||||
int GetMonitorWidth(int monitor)
|
||||
int GetMonitorHeight(int monitor)
|
||||
int GetMonitorPhysicalWidth(int monitor)
|
||||
int GetMonitorPhysicalHeight(int monitor)
|
||||
int GetMonitorRefreshRate(int monitor)
|
||||
Vector2 GetWindowPosition(void)
|
||||
Vector2 GetWindowScaleDPI(void)
|
||||
const char *GetMonitorName(int monitor)
|
||||
const char *GetClipboardText(void)
|
||||
void SetClipboardText(const char *text)
|
||||
void ShowCursor(void)
|
||||
void HideCursor(void)
|
||||
bool IsCursorHidden(void)
|
||||
void EnableCursor(void)
|
||||
void DisableCursor(void)
|
||||
bool IsCursorOnScreen(void)
|
||||
void ClearBackground(Color color)
|
||||
void BeginDrawing(void)
|
||||
void EndDrawing(void)
|
||||
void BeginMode2D(Camera2D camera)
|
||||
void EndMode2D(void)
|
||||
void BeginMode3D(Camera3D camera)
|
||||
void EndMode3D(void)
|
||||
void BeginTextureMode(RenderTexture2D target)
|
||||
void EndTextureMode(void)
|
||||
void BeginScissorMode(int x, int y, int width, int height)
|
||||
void EndScissorMode(void)
|
||||
Ray GetMouseRay(Vector2 mousePosition, Camera camera)
|
||||
Matrix GetCameraMatrix(Camera camera)
|
||||
Matrix GetCameraMatrix2D(Camera2D camera)
|
||||
Vector2 GetWorldToScreen(Vector3 position, Camera camera)
|
||||
Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height)
|
||||
Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera)
|
||||
Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera)
|
||||
void SetTargetFPS(int fps)
|
||||
int GetFPS(void)
|
||||
float GetFrameTime(void)
|
||||
double GetTime(void)
|
||||
int ColorToInt(Color color)
|
||||
Vector4 ColorNormalize(Color color)
|
||||
Color ColorFromNormalized(Vector4 normalized)
|
||||
Vector3 ColorToHSV(Color color)
|
||||
Color ColorFromHSV(Vector3 hsv)
|
||||
Color GetColor(int hexValue)
|
||||
Color Fade(Color color, float alpha)
|
||||
void SetConfigFlags(unsigned int flags)
|
||||
void SetTraceLogLevel(int logType)
|
||||
void SetTraceLogExit(int logType)
|
||||
void SetTraceLogCallback(TraceLogCallback callback)
|
||||
void TraceLog(int logType, const char *text, ...)
|
||||
void TakeScreenshot(const char *fileName)
|
||||
int GetRandomValue(int min, int max)
|
||||
unsigned char *LoadFileData(const char *fileName, int *bytesRead)
|
||||
void SaveFileData(const char *fileName, void *data, int bytesToWrite)
|
||||
char *LoadFileText(const char *fileName)
|
||||
void SaveFileText(const char *fileName, char *text)
|
||||
bool FileExists(const char *fileName)
|
||||
bool IsFileExtension(const char *fileName, const char *ext)
|
||||
bool DirectoryExists(const char *dirPath)
|
||||
const char *GetExtension(const char *fileName)
|
||||
const char *GetFileName(const char *filePath)
|
||||
const char *GetFileNameWithoutExt(const char *filePath)
|
||||
const char *GetDirectoryPath(const char *filePath)
|
||||
const char *GetPrevDirectoryPath(const char *dirPath)
|
||||
const char *GetWorkingDirectory(void)
|
||||
char **GetDirectoryFiles(const char *dirPath, int *count)
|
||||
void ClearDirectoryFiles(void)
|
||||
bool ChangeDirectory(const char *dir)
|
||||
bool IsFileDropped(void)
|
||||
char **GetDroppedFiles(int *count)
|
||||
void ClearDroppedFiles(void)
|
||||
long GetFileModTime(const char *fileName)
|
||||
unsigned char *CompressData(unsigned char *data, int dataLength, int *compDataLength)
|
||||
unsigned char *DecompressData(unsigned char *compData, int compDataLength, int *dataLength)
|
||||
void SaveStorageValue(int position, int value)
|
||||
int LoadStorageValue(int position)
|
||||
void OpenURL(const char *url)
|
||||
bool IsKeyPressed(int key)
|
||||
bool IsKeyDown(int key)
|
||||
bool IsKeyReleased(int key)
|
||||
bool IsKeyUp(int key)
|
||||
void SetExitKey(int key)
|
||||
int GetKeyPressed(void)
|
||||
bool IsGamepadAvailable(int gamepad)
|
||||
bool IsGamepadName(int gamepad, const char *name)
|
||||
const char *GetGamepadName(int gamepad)
|
||||
bool IsGamepadButtonPressed(int gamepad, int button)
|
||||
bool IsGamepadButtonDown(int gamepad, int button)
|
||||
bool IsGamepadButtonReleased(int gamepad, int button)
|
||||
bool IsGamepadButtonUp(int gamepad, int button)
|
||||
int GetGamepadButtonPressed(void)
|
||||
int GetGamepadAxisCount(int gamepad)
|
||||
float GetGamepadAxisMovement(int gamepad, int axis)
|
||||
bool IsMouseButtonPressed(int button)
|
||||
bool IsMouseButtonDown(int button)
|
||||
bool IsMouseButtonReleased(int button)
|
||||
bool IsMouseButtonUp(int button)
|
||||
int GetMouseX(void)
|
||||
int GetMouseY(void)
|
||||
Vector2 GetMousePosition(void)
|
||||
void SetMousePosition(int x, int y)
|
||||
void SetMouseOffset(int offsetX, int offsetY)
|
||||
void SetMouseScale(float scaleX, float scaleY)
|
||||
int GetMouseWheelMove(void)
|
||||
int GetTouchX(void)
|
||||
int GetTouchY(void)
|
||||
Vector2 GetTouchPosition(int index)
|
||||
void SetGesturesEnabled(unsigned int gestureFlags)
|
||||
bool IsGestureDetected(int gesture)
|
||||
int GetGestureDetected(void)
|
||||
int GetTouchPointsCount(void)
|
||||
float GetGestureHoldDuration(void)
|
||||
Vector2 GetGestureDragVector(void)
|
||||
float GetGestureDragAngle(void)
|
||||
Vector2 GetGesturePinchVector(void)
|
||||
float GetGesturePinchAngle(void)
|
||||
void SetCameraMode(Camera camera, int mode)
|
||||
void UpdateCamera(Camera *camera)
|
||||
void SetCameraPanControl(int panKey)
|
||||
void SetCameraAltControl(int altKey)
|
||||
void SetCameraSmoothZoomControl(int szKey)
|
||||
void SetCameraMoveControls(int frontKey, int backKey, int rightKey, int leftKey, int upKey, int downKey)
|
||||
void DrawPixel(int posX, int posY, Color color)
|
||||
void DrawPixelV(Vector2 position, Color color)
|
||||
void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color)
|
||||
void DrawLineV(Vector2 startPos, Vector2 endPos, Color color)
|
||||
void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color)
|
||||
void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color)
|
||||
void DrawLineStrip(Vector2 *points, int numPoints, Color color)
|
||||
void DrawCircle(int centerX, int centerY, float radius, Color color)
|
||||
void DrawCircleSector(Vector2 center, float radius, int startAngle, int endAngle, int segments, Color color)
|
||||
void DrawCircleSectorLines(Vector2 center, float radius, int startAngle, int endAngle, int segments, Color color)
|
||||
void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2)
|
||||
void DrawCircleV(Vector2 center, float radius, Color color)
|
||||
void DrawCircleLines(int centerX, int centerY, float radius, Color color)
|
||||
void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color)
|
||||
void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color)
|
||||
void DrawRing(Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color)
|
||||
void DrawRingLines(Vector2 center, float innerRadius, float outerRadius, int startAngle, int endAngle, int segments, Color color)
|
||||
void DrawRectangle(int posX, int posY, int width, int height, Color color)
|
||||
void DrawRectangleV(Vector2 position, Vector2 size, Color color)
|
||||
void DrawRectangleRec(Rectangle rec, Color color)
|
||||
void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color)
|
||||
void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2)
|
||||
void DrawRectangleGradientH(int posX, int posY, int width, int height, Color color1, Color color2)
|
||||
void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4)
|
||||
void DrawRectangleLines(int posX, int posY, int width, int height, Color color)
|
||||
void DrawRectangleLinesEx(Rectangle rec, int lineThick, Color color)
|
||||
void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color)
|
||||
void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, int lineThick, Color color)
|
||||
void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color)
|
||||
void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color)
|
||||
void DrawTriangleFan(Vector2 *points, int numPoints, Color color)
|
||||
void DrawTriangleStrip(Vector2 *points, int pointsCount, Color color)
|
||||
void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color)
|
||||
void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color)
|
||||
bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2)
|
||||
bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2)
|
||||
bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec)
|
||||
Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2)
|
||||
bool CheckCollisionPointRec(Vector2 point, Rectangle rec)
|
||||
bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius)
|
||||
bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3)
|
||||
Image LoadImage(const char *fileName)
|
||||
Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize)
|
||||
Image LoadImageAnim(const char *fileName, int *frames)
|
||||
void ExportImage(Image image, const char *fileName)
|
||||
void ExportImageAsCode(Image image, const char *fileName)
|
||||
Texture2D LoadTexture(const char *fileName)
|
||||
Texture2D LoadTextureFromImage(Image image)
|
||||
TextureCubemap LoadTextureCubemap(Image image, int layoutType)
|
||||
RenderTexture2D LoadRenderTexture(int width, int height)
|
||||
void UnloadImage(Image image)
|
||||
void UnloadTexture(Texture2D texture)
|
||||
void UnloadRenderTexture(RenderTexture2D target)
|
||||
Color *GetImageData(Image image)
|
||||
Vector4 *GetImageDataNormalized(Image image)
|
||||
Rectangle GetImageAlphaBorder(Image image, float threshold)
|
||||
int GetPixelDataSize(int width, int height, int format)
|
||||
Image GetTextureData(Texture2D texture)
|
||||
Image GetScreenData(void)
|
||||
void UpdateTexture(Texture2D texture, const void *pixels)
|
||||
void UpdateTextureRec(Texture2D texture, Rectangle rec, const void *pixels)
|
||||
Image ImageCopy(Image image)
|
||||
Image ImageFromImage(Image image, Rectangle rec)
|
||||
void ImageToPOT(Image *image, Color fillColor)
|
||||
void ImageFormat(Image *image, int newFormat)
|
||||
void ImageAlphaMask(Image *image, Image alphaMask)
|
||||
void ImageAlphaClear(Image *image, Color color, float threshold)
|
||||
void ImageAlphaCrop(Image *image, float threshold)
|
||||
void ImageAlphaPremultiply(Image *image)
|
||||
void ImageCrop(Image *image, Rectangle crop)
|
||||
void ImageResize(Image *image, int newWidth, int newHeight)
|
||||
void ImageResizeNN(Image *image, int newWidth,int newHeight)
|
||||
void ImageResizeCanvas(Image *image, int newWidth, int newHeight, int offsetX, int offsetY, Color color)
|
||||
void ImageMipmaps(Image *image)
|
||||
void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp)
|
||||
Color *GetImagePalette(Image image, int maxPaletteSize, int *extractCount)
|
||||
Image ImageText(const char *text, int fontSize, Color color)
|
||||
Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint)
|
||||
void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec, Color tint)
|
||||
void ImageDrawRectangle(Image *dst, int posX, int posY, int width, int height, Color color)
|
||||
void ImageDrawRectangleV(Image *dst, Vector2 position, Vector2 size, Color color)
|
||||
void ImageDrawRectangleRec(Image *dst, Rectangle rec, Color color)
|
||||
void ImageDrawRectangleLines(Image *dst, Rectangle rec, int thick, Color color)
|
||||
void ImageClearBackground(Image *dst, Color color)
|
||||
void ImageDrawPixel(Image *dst, int posX, int posY, Color color)
|
||||
void ImageDrawPixelV(Image *dst, Vector2 position, Color color)
|
||||
void ImageDrawCircle(Image *dst, int centerX, int centerY, int radius, Color color)
|
||||
void ImageDrawCircleV(Image *dst, Vector2 center, int radius, Color color)
|
||||
void ImageDrawLine(Image *dst, int startPosX, int startPosY, int endPosX, int endPosY, Color color)
|
||||
void ImageDrawLineV(Image *dst, Vector2 start, Vector2 end, Color color)
|
||||
void ImageDrawText(Image *dst, const char *text, int posX, int posY, int fontSize, Color color)
|
||||
void ImageDrawTextEx(Image *dst, Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint)
|
||||
void ImageFlipVertical(Image *image)
|
||||
void ImageFlipHorizontal(Image *image)
|
||||
void ImageRotateCW(Image *image)
|
||||
void ImageRotateCCW(Image *image)
|
||||
void ImageColorTint(Image *image, Color color)
|
||||
void ImageColorInvert(Image *image)
|
||||
void ImageColorGrayscale(Image *image)
|
||||
void ImageColorContrast(Image *image, float contrast)
|
||||
void ImageColorBrightness(Image *image, int brightness)
|
||||
void ImageColorReplace(Image *image, Color color, Color replace)
|
||||
Image GenImageColor(int width, int height, Color color)
|
||||
Image GenImageGradientV(int width, int height, Color top, Color bottom)
|
||||
Image GenImageGradientH(int width, int height, Color left, Color right)
|
||||
Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer)
|
||||
Image GenImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2)
|
||||
Image GenImageWhiteNoise(int width, int height, float factor)
|
||||
Image GenImagePerlinNoise(int width, int height, int offsetX, int offsetY, float scale)
|
||||
Image GenImageCellular(int width, int height, int tileSize)
|
||||
void GenTextureMipmaps(Texture2D *texture)
|
||||
void SetTextureFilter(Texture2D texture, int filterMode)
|
||||
void SetTextureWrap(Texture2D texture, int wrapMode)
|
||||
void DrawTexture(Texture2D texture, int posX, int posY, Color tint)
|
||||
void DrawTextureV(Texture2D texture, Vector2 position, Color tint)
|
||||
void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint)
|
||||
void DrawTextureRec(Texture2D texture, Rectangle sourceRec, Vector2 position, Color tint)
|
||||
void DrawTextureQuad(Texture2D texture, Vector2 tiling, Vector2 offset, Rectangle quad, Color tint)
|
||||
void DrawTexturePro(Texture2D texture, Rectangle sourceRec, Rectangle destRec, Vector2 origin, float rotation, Color tint)
|
||||
void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle destRec, Vector2 origin, float rotation, Color tint)
|
||||
Font GetFontDefault(void)
|
||||
Font LoadFont(const char *fileName)
|
||||
Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int charsCount)
|
||||
Font LoadFontFromImage(Image image, Color key, int firstChar)
|
||||
CharInfo *LoadFontData(const char *fileName, int fontSize, int *fontChars, int charsCount, int type)
|
||||
Image GenImageFontAtlas(const CharInfo *chars, Rectangle **recs, int charsCount, int fontSize, int padding, int packMethod)
|
||||
void UnloadFont(Font font)
|
||||
void DrawFPS(int posX, int posY)
|
||||
void DrawText(const char *text, int posX, int posY, int fontSize, Color color)
|
||||
void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint)
|
||||
void DrawTextRec(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint)
|
||||
void DrawTextRecEx(Font font, const char *text, Rectangle rec, float fontSize, float spacing, bool wordWrap, Color tint, int selectStart, int selectLength, Color selectTint, Color selectBackTint)
|
||||
void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float scale, Color tint)
|
||||
int MeasureText(const char *text, int fontSize)
|
||||
Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing)
|
||||
int GetGlyphIndex(Font font, int codepoint)
|
||||
int TextCopy(char *dst, const char *src)
|
||||
bool TextIsEqual(const char *text1, const char *text2)
|
||||
unsigned int TextLength(const char *text)
|
||||
const char *TextFormat(const char *text, ...)
|
||||
const char *TextSubtext(const char *text, int position, int length)
|
||||
char *TextReplace(char *text, const char *replace, const char *by)
|
||||
char *TextInsert(const char *text, const char *insert, int position)
|
||||
const char *TextJoin(const char **textList, int count, const char *delimiter)
|
||||
const char **TextSplit(const char *text, char delimiter, int *count)
|
||||
void TextAppend(char *text, const char *append, int *position)
|
||||
int TextFindIndex(const char *text, const char *find)
|
||||
const char *TextToUpper(const char *text)
|
||||
const char *TextToLower(const char *text)
|
||||
const char *TextToPascal(const char *text)
|
||||
int TextToInteger(const char *text)
|
||||
char *TextToUtf8(int *codepoints, int length)
|
||||
int *GetCodepoints(const char *text, int *count)
|
||||
int GetCodepointsCount(const char *text)
|
||||
int GetNextCodepoint(const char *text, int *bytesProcessed)
|
||||
const char *CodepointToUtf8(int codepoint, int *byteLength)
|
||||
void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color)
|
||||
void DrawPoint3D(Vector3 position, Color color)
|
||||
void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color)
|
||||
void DrawCube(Vector3 position, float width, float height, float length, Color color)
|
||||
void DrawCubeV(Vector3 position, Vector3 size, Color color)
|
||||
void DrawCubeWires(Vector3 position, float width, float height, float length, Color color)
|
||||
void DrawCubeWiresV(Vector3 position, Vector3 size, Color color)
|
||||
void DrawCubeTexture(Texture2D texture, Vector3 position, float width, float height, float length, Color color)
|
||||
void DrawSphere(Vector3 centerPos, float radius, Color color)
|
||||
void DrawSphereEx(Vector3 centerPos, float radius, int rings, int slices, Color color)
|
||||
void DrawSphereWires(Vector3 centerPos, float radius, int rings, int slices, Color color)
|
||||
void DrawCylinder(Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color)
|
||||
void DrawCylinderWires(Vector3 position, float radiusTop, float radiusBottom, float height, int slices, Color color)
|
||||
void DrawPlane(Vector3 centerPos, Vector2 size, Color color)
|
||||
void DrawRay(Ray ray, Color color)
|
||||
void DrawGrid(int slices, float spacing)
|
||||
void DrawGizmo(Vector3 position)
|
||||
Model LoadModel(const char *fileName)
|
||||
Model LoadModelFromMesh(Mesh mesh)
|
||||
void UnloadModel(Model model)
|
||||
Mesh *LoadMeshes(const char *fileName, int *meshCount)
|
||||
void ExportMesh(Mesh mesh, const char *fileName)
|
||||
void UnloadMesh(Mesh mesh)
|
||||
Material *LoadMaterials(const char *fileName, int *materialCount)
|
||||
Material LoadMaterialDefault(void)
|
||||
void UnloadMaterial(Material material)
|
||||
void SetMaterialTexture(Material *material, int mapType, Texture2D texture)
|
||||
void SetModelMeshMaterial(Model *model, int meshId, int materialId)
|
||||
ModelAnimation *LoadModelAnimations(const char *fileName, int *animsCount)
|
||||
void UpdateModelAnimation(Model model, ModelAnimation anim, int frame)
|
||||
void UnloadModelAnimation(ModelAnimation anim)
|
||||
bool IsModelAnimationValid(Model model, ModelAnimation anim)
|
||||
Mesh GenMeshPoly(int sides, float radius)
|
||||
Mesh GenMeshPlane(float width, float length, int resX, int resZ)
|
||||
Mesh GenMeshCube(float width, float height, float length)
|
||||
Mesh GenMeshSphere(float radius, int rings, int slices)
|
||||
Mesh GenMeshHemiSphere(float radius, int rings, int slices)
|
||||
Mesh GenMeshCylinder(float radius, float height, int slices)
|
||||
Mesh GenMeshTorus(float radius, float size, int radSeg, int sides)
|
||||
Mesh GenMeshKnot(float radius, float size, int radSeg, int sides)
|
||||
Mesh GenMeshHeightmap(Image heightmap, Vector3 size)
|
||||
Mesh GenMeshCubicmap(Image cubicmap, Vector3 cubeSize)
|
||||
BoundingBox MeshBoundingBox(Mesh mesh)
|
||||
void MeshTangents(Mesh *mesh)
|
||||
void MeshBinormals(Mesh *mesh)
|
||||
void MeshNormalsSmooth(Mesh *mesh)
|
||||
void DrawModel(Model model, Vector3 position, float scale, Color tint)
|
||||
void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint)
|
||||
void DrawModelWires(Model model, Vector3 position, float scale, Color tint)
|
||||
void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint)
|
||||
void DrawBoundingBox(BoundingBox box, Color color)
|
||||
void DrawBillboard(Camera camera, Texture2D texture, Vector3 center, float size, Color tint)
|
||||
void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle sourceRec, Vector3 center, float size, Color tint)
|
||||
bool CheckCollisionSpheres(Vector3 centerA, float radiusA, Vector3 centerB, float radiusB)
|
||||
bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2)
|
||||
bool CheckCollisionBoxSphere(BoundingBox box, Vector3 center, float radius)
|
||||
bool CheckCollisionRaySphereEx(Ray ray, Vector3 center, float radius, Vector3 *collisionPoint)
|
||||
bool CheckCollisionRayBox(Ray ray, BoundingBox box)
|
||||
RayHitInfo GetCollisionRayModel(Ray ray, Model model)
|
||||
RayHitInfo GetCollisionRayTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3)
|
||||
RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight)
|
||||
Shader LoadShader(const char *vsFileName, const char *fsFileName)
|
||||
Shader LoadShaderCode(const char *vsCode, const char *fsCode)
|
||||
void UnloadShader(Shader shader)
|
||||
Shader GetShaderDefault(void)
|
||||
Texture2D GetTextureDefault(void)
|
||||
Texture2D GetShapesTexture(void)
|
||||
Rectangle GetShapesTextureRec(void)
|
||||
void SetShapesTexture(Texture2D texture, Rectangle source)
|
||||
int GetShaderLocation(Shader shader, const char *uniformName)
|
||||
void SetShaderValue(Shader shader, int uniformLoc, const void *value, int uniformType)
|
||||
void SetShaderValueV(Shader shader, int uniformLoc, const void *value, int uniformType, int count)
|
||||
void SetShaderValueMatrix(Shader shader, int uniformLoc, Matrix mat)
|
||||
void SetShaderValueTexture(Shader shader, int uniformLoc, Texture2D texture)
|
||||
void SetMatrixProjection(Matrix proj)
|
||||
void SetMatrixModelview(Matrix view)
|
||||
Matrix GetMatrixModelview(void)
|
||||
Matrix GetMatrixProjection(void)
|
||||
Texture2D GenTextureCubemap(Shader shader, Texture2D map, int size)
|
||||
Texture2D GenTextureIrradiance(Shader shader, Texture2D cubemap, int size)
|
||||
Texture2D GenTexturePrefilter(Shader shader, Texture2D cubemap, int size)
|
||||
Texture2D GenTextureBRDF(Shader shader, int size)
|
||||
void BeginShaderMode(Shader shader)
|
||||
void EndShaderMode(void)
|
||||
void BeginBlendMode(int mode)
|
||||
void EndBlendMode(void)
|
||||
void InitVrSimulator(void)
|
||||
void CloseVrSimulator(void)
|
||||
void UpdateVrTracking(Camera *camera)
|
||||
void SetVrConfiguration(VrDeviceInfo info, Shader distortion)
|
||||
bool IsVrSimulatorReady(void)
|
||||
void ToggleVrMode(void)
|
||||
void BeginVrDrawing(void)
|
||||
void EndVrDrawing(void)
|
||||
void InitAudioDevice(void)
|
||||
void CloseAudioDevice(void)
|
||||
bool IsAudioDeviceReady(void)
|
||||
void SetMasterVolume(float volume)
|
||||
Wave LoadWave(const char *fileName)
|
||||
Sound LoadSound(const char *fileName)
|
||||
Sound LoadSoundFromWave(Wave wave)
|
||||
void UpdateSound(Sound sound, const void *data, int samplesCount)
|
||||
void UnloadWave(Wave wave)
|
||||
void UnloadSound(Sound sound)
|
||||
void ExportWave(Wave wave, const char *fileName)
|
||||
void ExportWaveAsCode(Wave wave, const char *fileName)
|
||||
void PlaySound(Sound sound)
|
||||
void StopSound(Sound sound)
|
||||
void PauseSound(Sound sound)
|
||||
void ResumeSound(Sound sound)
|
||||
void PlaySoundMulti(Sound sound)
|
||||
void StopSoundMulti(void)
|
||||
int GetSoundsPlaying(void)
|
||||
bool IsSoundPlaying(Sound sound)
|
||||
void SetSoundVolume(Sound sound, float volume)
|
||||
void SetSoundPitch(Sound sound, float pitch)
|
||||
void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels)
|
||||
Wave WaveCopy(Wave wave)
|
||||
void WaveCrop(Wave *wave, int initSample, int finalSample)
|
||||
float *GetWaveData(Wave wave)
|
||||
Music LoadMusicStream(const char *fileName)
|
||||
void UnloadMusicStream(Music music)
|
||||
void PlayMusicStream(Music music)
|
||||
void UpdateMusicStream(Music music)
|
||||
void StopMusicStream(Music music)
|
||||
void PauseMusicStream(Music music)
|
||||
void ResumeMusicStream(Music music)
|
||||
bool IsMusicPlaying(Music music)
|
||||
void SetMusicVolume(Music music, float volume)
|
||||
void SetMusicPitch(Music music, float pitch)
|
||||
float GetMusicTimeLength(Music music)
|
||||
float GetMusicTimePlayed(Music music)
|
||||
AudioStream InitAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels)
|
||||
void UpdateAudioStream(AudioStream stream, const void *data, int samplesCount)
|
||||
void CloseAudioStream(AudioStream stream)
|
||||
bool IsAudioStreamProcessed(AudioStream stream)
|
||||
void PlayAudioStream(AudioStream stream)
|
||||
void PauseAudioStream(AudioStream stream)
|
||||
void ResumeAudioStream(AudioStream stream)
|
||||
bool IsAudioStreamPlaying(AudioStream stream)
|
||||
void StopAudioStream(AudioStream stream)
|
||||
void SetAudioStreamVolume(AudioStream stream, float volume)
|
||||
void SetAudioStreamPitch(AudioStream stream, float pitch)
|
||||
void SetAudioStreamBufferSizeDefault(int size)
|
@ -1,28 +0,0 @@
|
||||
float EaseLinearNone(float t, float b, float c, float d)
|
||||
float EaseLinearIn(float t, float b, float c, float d)
|
||||
float EaseLinearOut(float t, float b, float c, float d)
|
||||
float EaseLinearInOut(float t,float b, float c, float d)
|
||||
float EaseSineIn(float t, float b, float c, float d)
|
||||
float EaseSineOut(float t, float b, float c, float d)
|
||||
float EaseSineInOut(float t, float b, float c, float d)
|
||||
float EaseCircIn(float t, float b, float c, float d)
|
||||
float EaseCircOut(float t, float b, float c, float d)
|
||||
float EaseCircInOut(float t, float b, float c, float d)
|
||||
float EaseCubicIn(float t, float b, float c, float d)
|
||||
float EaseCubicOut(float t, float b, float c, float d)
|
||||
float EaseCubicInOut(float t, float b, float c, float d)
|
||||
float EaseQuadIn(float t, float b, float c, float d)
|
||||
float EaseQuadOut(float t, float b, float c, float d)
|
||||
float EaseQuadInOut(float t, float b, float c, float d)
|
||||
float EaseExpoIn(float t, float b, float c, float d)
|
||||
float EaseExpoOut(float t, float b, float c, float d)
|
||||
float EaseExpoInOut(float t, float b, float c, float d)
|
||||
float EaseBackIn(float t, float b, float c, float d)
|
||||
float EaseBackOut(float t, float b, float c, float d)
|
||||
float EaseBackInOut(float t, float b, float c, float d)
|
||||
float EaseBounceOut(float t, float b, float c, float d)
|
||||
float EaseBounceIn(float t, float b, float c, float d)
|
||||
float EaseBounceInOut(float t, float b, float c, float d)
|
||||
float EaseElasticIn(float t, float b, float c, float d)
|
||||
float EaseElasticOut(float t, float b, float c, float d)
|
||||
float EaseElasticInOut(float t, float b, float c, float d)
|
@ -1,30 +1,18 @@
|
||||
local keywords = {
|
||||
"int", "long", "short", "char", "float", "double",
|
||||
"uint8_t", "uint16_t", "uint32_t", "uint64_t",
|
||||
"const", "unsigned", "register",
|
||||
"const", "unsigned", "register", "va_list";
|
||||
"void", "intptr_t", "bool"
|
||||
}
|
||||
|
||||
local structs = {
|
||||
"Vector2", "Vector3", "Vector4", "Quaternion",
|
||||
"Matrix", "Color", "Rectangle", "Image", "Texture", "Texture2D",
|
||||
"RenderTexture", "NPatchInfo", "CharInfo", "Font",
|
||||
"Camera", "Camera2D", "Mesh", "Shader", "MaterialMap",
|
||||
"Material", "Model", "Transform", "BoneInfo", "ModelAnimation",
|
||||
"Ray", "RayHitInfo", "BoundingBox", "Wave", "Sound", "Music",
|
||||
"AudioStream", "VrDeviceInfo", "Camera3D", "RenderTexture2D",
|
||||
"TextureCubemap", "TraceLogCallback", "PhysicsBody",
|
||||
"GestureEvent", "GuiStyle", "GuiTextBoxState"
|
||||
}
|
||||
|
||||
local functions = {}
|
||||
local proto = {}
|
||||
|
||||
local counter = 0
|
||||
|
||||
local custom_support = {
|
||||
["rlgl"] = function (line)
|
||||
return line:gsub("[%s*]+(rl%w+)", function (part)
|
||||
["rayfork"] = function (line)
|
||||
return line:gsub("(rf_[^( ]+)(%()", function (part)
|
||||
functions[#functions + 1] = part
|
||||
counter = counter + 1
|
||||
|
||||
@ -32,16 +20,16 @@ local custom_support = {
|
||||
print("WARN: Multiple matches for: " .. line)
|
||||
end
|
||||
|
||||
return "(*)"
|
||||
return "(*)("
|
||||
end)
|
||||
end
|
||||
}
|
||||
|
||||
local file = io.open(arg[1], "wb")
|
||||
local modules = { "api" }
|
||||
local modules = { }
|
||||
|
||||
for i=2,#arg do
|
||||
modules[i] = arg[i]
|
||||
for i=1,#arg do
|
||||
modules[i] = arg[i + 1]
|
||||
end
|
||||
|
||||
for _,modname in ipairs(modules) do
|
||||
@ -50,31 +38,16 @@ for _,modname in ipairs(modules) do
|
||||
line = custom_support[modname](line)
|
||||
end
|
||||
|
||||
line = line:gsub("(%W)([%l%d][%w_]*)", function (before, part)
|
||||
for i,keyword in ipairs(keywords) do
|
||||
counter = 0
|
||||
|
||||
line = line:gsub("[^ *(),]+", function (part)
|
||||
for _,keyword in pairs(keywords) do
|
||||
if part == keyword then
|
||||
return before .. part
|
||||
end
|
||||
end
|
||||
|
||||
return before
|
||||
end)
|
||||
|
||||
line = line:gsub("%u%w+", function (part)
|
||||
for i,struct in ipairs(structs) do
|
||||
if part == struct then
|
||||
return part
|
||||
end
|
||||
end
|
||||
|
||||
functions[#functions + 1] = part
|
||||
counter = counter + 1
|
||||
|
||||
if count == 2 then
|
||||
print("WARN: Multiple matches for: " .. line)
|
||||
end
|
||||
|
||||
return "(*)"
|
||||
return part:sub(0, 3) == "rf_" and part or ""
|
||||
end)
|
||||
|
||||
-- Strip spaces
|
||||
@ -89,13 +62,13 @@ assert(#proto == #functions, "Mismatching proto and function count : " ..
|
||||
#proto .. " ~= " .. #functions)
|
||||
|
||||
file:write [[
|
||||
struct raylua_bind_entry {
|
||||
struct rf_lua_bind_entry {
|
||||
const char *name;
|
||||
const char *proto;
|
||||
void *ptr;
|
||||
};
|
||||
|
||||
struct raylua_bind_entry raylua_entries[] = {
|
||||
struct rf_lua_bind_entry rayfork_entries[] = {
|
||||
]]
|
||||
|
||||
for i=1,#proto do
|
||||
|
@ -1,2 +0,0 @@
|
||||
void ProcessGestureEvent(GestureEvent event)
|
||||
void UpdateGestures(void)
|
546
tools/rayfork.h
Normal file
546
tools/rayfork.h
Normal file
@ -0,0 +1,546 @@
|
||||
void* rf_calloc_wrapper(rf_allocator allocator, rf_int amount, rf_int size);
|
||||
void* rf_libc_allocator_wrapper(struct rf_allocator* this_allocator, rf_source_location source_location, rf_allocator_mode mode, rf_allocator_args args);
|
||||
rf_int rf_libc_get_file_size(void* user_data, const char* filename);
|
||||
bool rf_libc_load_file_into_buffer(void* user_data, const char* filename, void* dst, rf_int dst_size);
|
||||
rf_recorded_error rf_get_last_recorded_error();
|
||||
const char* rf_log_type_string(rf_log_type);
|
||||
void rf_set_logger(rf_logger logger);
|
||||
void rf_set_logger_filter(rf_log_type);
|
||||
void rf_libc_printf_logger(struct rf_logger* logger, rf_source_location source_location, rf_log_type log_type, const char* msg, rf_error_type error_type, va_list args);
|
||||
rf_int rf_libc_rand_wrapper(rf_int min, rf_int max);
|
||||
rf_decoded_rune rf_decode_utf8_char(const char* text, rf_int len);
|
||||
rf_decoded_utf8_stats rf_count_utf8_chars(const char* text, rf_int len);
|
||||
rf_decoded_string rf_decode_utf8_to_buffer(const char* text, rf_int len, rf_rune* dst, rf_int dst_size);
|
||||
rf_decoded_string rf_decode_utf8(const char* text, rf_int len, rf_allocator allocator);
|
||||
float rf_next_pot(float it);
|
||||
rf_vec2 rf_center_to_screen(float w, float h);
|
||||
rf_vec2 rf_center_to_object(rf_sizef center_this, rf_rec to_this);
|
||||
float rf_clamp(float value, float min, float max);
|
||||
float rf_lerp(float start, float end, float amount);
|
||||
rf_vec2 rf_vec2_add(rf_vec2 v1, rf_vec2 v2);
|
||||
rf_vec2 rf_vec2_sub(rf_vec2 v1, rf_vec2 v2);
|
||||
float rf_vec2_len(rf_vec2 v);
|
||||
float rf_vec2_dot_product(rf_vec2 v1, rf_vec2 v2);
|
||||
float rf_vec2_distance(rf_vec2 v1, rf_vec2 v2);
|
||||
float rf_vec2_angle(rf_vec2 v1, rf_vec2 v2);
|
||||
rf_vec2 rf_vec2_scale(rf_vec2 v, float scale);
|
||||
rf_vec2 rf_vec2_mul_v(rf_vec2 v1, rf_vec2 v2);
|
||||
rf_vec2 rf_vec2_negate(rf_vec2 v);
|
||||
rf_vec2 rf_vec2_div(rf_vec2 v, float div);
|
||||
rf_vec2 rf_vec2_div_v(rf_vec2 v1, rf_vec2 v2);
|
||||
rf_vec2 rf_vec2_normalize(rf_vec2 v);
|
||||
rf_vec2 rf_vec2_lerp(rf_vec2 v1, rf_vec2 v2, float amount);
|
||||
rf_vec3 rf_vec3_add(rf_vec3 v1, rf_vec3 v2);
|
||||
rf_vec3 rf_vec3_sub(rf_vec3 v1, rf_vec3 v2);
|
||||
rf_vec3 rf_vec3_mul(rf_vec3 v, float scalar);
|
||||
rf_vec3 rf_vec3_mul_v(rf_vec3 v1, rf_vec3 v2);
|
||||
rf_vec3 rf_vec3_cross_product(rf_vec3 v1, rf_vec3 v2);
|
||||
rf_vec3 rf_vec3_perpendicular(rf_vec3 v);
|
||||
float rf_vec3_len(rf_vec3 v);
|
||||
float rf_vec3_dot_product(rf_vec3 v1, rf_vec3 v2);
|
||||
float rf_vec3_distance(rf_vec3 v1, rf_vec3 v2);
|
||||
rf_vec3 rf_vec3_scale(rf_vec3 v, float scale);
|
||||
rf_vec3 rf_vec3_negate(rf_vec3 v);
|
||||
rf_vec3 rf_vec3_div(rf_vec3 v, float div);
|
||||
rf_vec3 rf_vec3_div_v(rf_vec3 v1, rf_vec3 v2);
|
||||
rf_vec3 rf_vec3_normalize(rf_vec3 v);
|
||||
void rf_vec3_ortho_normalize(rf_vec3* v1, rf_vec3* v2);
|
||||
rf_vec3 rf_vec3_transform(rf_vec3 v, rf_mat mat);
|
||||
rf_vec3 rf_vec3_rotate_by_quaternion(rf_vec3 v, rf_quaternion q);
|
||||
rf_vec3 rf_vec3_lerp(rf_vec3 v1, rf_vec3 v2, float amount);
|
||||
rf_vec3 rf_vec3_reflect(rf_vec3 v, rf_vec3 normal);
|
||||
rf_vec3 rf_vec3_min(rf_vec3 v1, rf_vec3 v2);
|
||||
rf_vec3 rf_vec3_max(rf_vec3 v1, rf_vec3 v2);
|
||||
rf_vec3 rf_vec3_barycenter(rf_vec3 p, rf_vec3 a, rf_vec3 b, rf_vec3 c);
|
||||
float rf_mat_determinant(rf_mat mat);
|
||||
float rf_mat_trace(rf_mat mat);
|
||||
rf_mat rf_mat_transpose(rf_mat mat);
|
||||
rf_mat rf_mat_invert(rf_mat mat);
|
||||
rf_mat rf_mat_normalize(rf_mat mat);
|
||||
rf_mat rf_mat_identity(void);
|
||||
rf_mat rf_mat_add(rf_mat left, rf_mat right);
|
||||
rf_mat rf_mat_sub(rf_mat left, rf_mat right);
|
||||
rf_mat rf_mat_translate(float x, float y, float z);
|
||||
rf_mat rf_mat_rotate(rf_vec3 axis, float angle);
|
||||
rf_mat rf_mat_rotate_xyz(rf_vec3 ang);
|
||||
rf_mat rf_mat_rotate_x(float angle);
|
||||
rf_mat rf_mat_rotate_y(float angle);
|
||||
rf_mat rf_mat_rotate_z(float angle);
|
||||
rf_mat rf_mat_scale(float x, float y, float z);
|
||||
rf_mat rf_mat_mul(rf_mat left, rf_mat right);
|
||||
rf_mat rf_mat_frustum(double left, double right, double bottom, double top, double near_val, double far_val);
|
||||
rf_mat rf_mat_perspective(double fovy, double aspect, double near_val, double far_val);
|
||||
rf_mat rf_mat_ortho(double left, double right, double bottom, double top, double near_val, double far_val);
|
||||
rf_mat rf_mat_look_at(rf_vec3 eye, rf_vec3 target, rf_vec3 up);
|
||||
rf_float16 rf_mat_to_float16(rf_mat mat);
|
||||
rf_quaternion rf_quaternion_identity(void);
|
||||
float rf_quaternion_len(rf_quaternion q);
|
||||
rf_quaternion rf_quaternion_normalize(rf_quaternion q);
|
||||
rf_quaternion rf_quaternion_invert(rf_quaternion q);
|
||||
rf_quaternion rf_quaternion_mul(rf_quaternion q1, rf_quaternion q2);
|
||||
rf_quaternion rf_quaternion_lerp(rf_quaternion q1, rf_quaternion q2, float amount);
|
||||
rf_quaternion rf_quaternion_nlerp(rf_quaternion q1, rf_quaternion q2, float amount);
|
||||
rf_quaternion rf_quaternion_slerp(rf_quaternion q1, rf_quaternion q2, float amount);
|
||||
rf_quaternion rf_quaternion_from_vector3_to_vector3(rf_vec3 from, rf_vec3 to);
|
||||
rf_quaternion rf_quaternion_from_matrix(rf_mat mat);
|
||||
rf_mat rf_quaternion_to_matrix(rf_quaternion q);
|
||||
rf_quaternion rf_quaternion_from_axis_angle(rf_vec3 axis, float angle);
|
||||
void rf_quaternion_to_axis_angle(rf_quaternion q, rf_vec3* outAxis, float* outAngle);
|
||||
rf_quaternion rf_quaternion_from_euler(float roll, float pitch, float yaw);
|
||||
rf_vec3 rf_quaternion_to_euler(rf_quaternion q);
|
||||
rf_quaternion rf_quaternion_transform(rf_quaternion q, rf_mat mat);
|
||||
bool rf_check_collision_recs(rf_rec rec1, rf_rec rec2);
|
||||
bool rf_check_collision_circles(rf_vec2 center1, float radius1, rf_vec2 center2, float radius2);
|
||||
bool rf_check_collision_circle_rec(rf_vec2 center, float radius, rf_rec rec);
|
||||
bool rf_check_collision_point_rec(rf_vec2 point, rf_rec rec);
|
||||
bool rf_check_collision_point_circle(rf_vec2 point, rf_vec2 center, float radius);
|
||||
bool rf_check_collision_point_triangle(rf_vec2 point, rf_vec2 p1, rf_vec2 p2, rf_vec2 p3);
|
||||
rf_rec rf_get_collision_rec(rf_rec rec1, rf_rec rec2);
|
||||
bool rf_check_collision_spheres(rf_vec3 center_a, float radius_a, rf_vec3 center_b, float radius_b);
|
||||
bool rf_check_collision_boxes(rf_bounding_box box1, rf_bounding_box box2);
|
||||
bool rf_check_collision_box_sphere(rf_bounding_box box, rf_vec3 center, float radius);
|
||||
bool rf_check_collision_ray_sphere(rf_ray ray, rf_vec3 center, float radius);
|
||||
bool rf_check_collision_ray_sphere_ex(rf_ray ray, rf_vec3 center, float radius, rf_vec3* collision_point);
|
||||
bool rf_check_collision_ray_box(rf_ray ray, rf_bounding_box box);
|
||||
rf_ray_hit_info rf_collision_ray_model(rf_ray ray, struct rf_model model);
|
||||
rf_ray_hit_info rf_collision_ray_triangle(rf_ray ray, rf_vec3 p1, rf_vec3 p2, rf_vec3 p3);
|
||||
rf_ray_hit_info rf_collision_ray_ground(rf_ray ray, float ground_height);
|
||||
int rf_get_size_base64(const unsigned char* input);
|
||||
rf_base64_output rf_decode_base64(const unsigned char* input, rf_allocator allocator);
|
||||
const char* rf_pixel_format_string(rf_pixel_format format);
|
||||
bool rf_is_uncompressed_format(rf_pixel_format format);
|
||||
bool rf_is_compressed_format(rf_pixel_format format);
|
||||
int rf_bits_per_pixel(rf_pixel_format format);
|
||||
int rf_bytes_per_pixel(rf_uncompressed_pixel_format format);
|
||||
int rf_pixel_buffer_size(int width, int height, rf_pixel_format format);
|
||||
bool rf_format_pixels_to_normalized(const void* src, rf_int src_size, rf_uncompressed_pixel_format src_format, rf_vec4* dst, rf_int dst_size);
|
||||
bool rf_format_pixels_to_rgba32(const void* src, rf_int src_size, rf_uncompressed_pixel_format src_format, rf_color* dst, rf_int dst_size);
|
||||
bool rf_format_pixels(const void* src, rf_int src_size, rf_uncompressed_pixel_format src_format, void* dst, rf_int dst_size, rf_uncompressed_pixel_format dst_format);
|
||||
rf_vec4 rf_format_one_pixel_to_normalized(const void* src, rf_uncompressed_pixel_format src_format);
|
||||
rf_color rf_format_one_pixel_to_rgba32(const void* src, rf_uncompressed_pixel_format src_format);
|
||||
void rf_format_one_pixel(const void* src, rf_uncompressed_pixel_format src_format, void* dst, rf_uncompressed_pixel_format dst_format);
|
||||
bool rf_color_match_rgb(rf_color a, rf_color b);
|
||||
bool rf_color_match(rf_color a, rf_color b);
|
||||
int rf_color_to_int(rf_color color);
|
||||
rf_vec4 rf_color_normalize(rf_color color);
|
||||
rf_color rf_color_from_normalized(rf_vec4 normalized);
|
||||
rf_vec3 rf_color_to_hsv(rf_color color);
|
||||
rf_color rf_color_from_hsv(rf_vec3 hsv);
|
||||
rf_color rf_color_from_int(int hex_value);
|
||||
rf_color rf_fade(rf_color color, float alpha);
|
||||
rf_vec3 rf_unproject(rf_vec3 source, rf_mat proj, rf_mat view);
|
||||
rf_ray rf_get_mouse_ray(rf_sizei screen_size, rf_vec2 mouse_position, rf_camera3d camera);
|
||||
rf_mat rf_get_camera_matrix(rf_camera3d camera);
|
||||
rf_mat rf_get_camera_matrix2d(rf_camera2d camera);
|
||||
rf_vec2 rf_get_world_to_screen(rf_sizei screen_size, rf_vec3 position, rf_camera3d camera);
|
||||
rf_vec2 rf_get_world_to_screen2d(rf_vec2 position, rf_camera2d camera);
|
||||
rf_vec2 rf_get_screen_to_world2d(rf_vec2 position, rf_camera2d camera);
|
||||
void rf_set_camera3d_mode(rf_camera3d_state* state, rf_camera3d camera, rf_builtin_camera3d_mode mode);
|
||||
void rf_update_camera3d(rf_camera3d* camera, rf_camera3d_state* state, rf_input_state_for_update_camera input_state);
|
||||
int rf_image_size(rf_image image);
|
||||
int rf_image_size_in_format(rf_image image, rf_pixel_format format);
|
||||
bool rf_image_get_pixels_as_rgba32_to_buffer(rf_image image, rf_color* dst, rf_int dst_size);
|
||||
bool rf_image_get_pixels_as_normalized_to_buffer(rf_image image, rf_vec4* dst, rf_int dst_size);
|
||||
rf_color* rf_image_pixels_to_rgba32(rf_image image, rf_allocator allocator);
|
||||
rf_vec4* rf_image_compute_pixels_to_normalized(rf_image image, rf_allocator allocator);
|
||||
void rf_image_extract_palette_to_buffer(rf_image image, rf_color* palette_dst, rf_int palette_size);
|
||||
rf_palette rf_image_extract_palette(rf_image image, rf_int palette_size, rf_allocator allocator);
|
||||
rf_rec rf_image_alpha_border(rf_image image, float threshold);
|
||||
bool rf_supports_image_file_type(const char* filename);
|
||||
rf_image rf_load_image_from_file_data_to_buffer(const void* src, rf_int src_size, void* dst, rf_int dst_size, rf_desired_channels channels, rf_allocator temp_allocator);
|
||||
rf_image rf_load_image_from_file_data(const void* src, rf_int src_size, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
rf_image rf_load_image_from_hdr_file_data_to_buffer(const void* src, rf_int src_size, void* dst, rf_int dst_size, rf_desired_channels channels, rf_allocator temp_allocator);
|
||||
rf_image rf_load_image_from_hdr_file_data(const void* src, rf_int src_size, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
rf_image rf_load_image_from_format_to_buffer(const void* src, rf_int src_size, int src_width, int src_height, rf_uncompressed_pixel_format src_format, void* dst, rf_int dst_size, rf_uncompressed_pixel_format dst_format);
|
||||
rf_image rf_load_image_from_file(const char* filename, rf_allocator allocator, rf_allocator temp_allocator, rf_io_callbacks io);
|
||||
void rf_unload_image(rf_image image, rf_allocator allocator);
|
||||
int rf_mipmaps_image_size(rf_mipmaps_image image);
|
||||
rf_mipmaps_stats rf_compute_mipmaps_stats(rf_image image, int desired_mipmaps_count);
|
||||
rf_mipmaps_image rf_image_gen_mipmaps_to_buffer(rf_image image, int gen_mipmaps_count, void* dst, rf_int dst_size, rf_allocator temp_allocator);
|
||||
rf_mipmaps_image rf_image_gen_mipmaps(rf_image image, int desired_mipmaps_count, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
void rf_unload_mipmaps_image(rf_mipmaps_image image, rf_allocator allocator);
|
||||
rf_int rf_get_dds_image_size(const void* src, rf_int src_size);
|
||||
rf_mipmaps_image rf_load_dds_image_to_buffer(const void* src, rf_int src_size, void* dst, rf_int dst_size);
|
||||
rf_mipmaps_image rf_load_dds_image(const void* src, rf_int src_size, rf_allocator allocator);
|
||||
rf_mipmaps_image rf_load_dds_image_from_file(const char* file, rf_allocator allocator, rf_allocator temp_allocator, rf_io_callbacks io);
|
||||
rf_int rf_get_pkm_image_size(const void* src, rf_int src_size);
|
||||
rf_image rf_load_pkm_image_to_buffer(const void* src, rf_int src_size, void* dst, rf_int dst_size);
|
||||
rf_image rf_load_pkm_image(const void* src, rf_int src_size, rf_allocator allocator);
|
||||
rf_image rf_load_pkm_image_from_file(const char* file, rf_allocator allocator, rf_allocator temp_allocator, rf_io_callbacks io);
|
||||
rf_int rf_get_ktx_image_size(const void* src, rf_int src_size);
|
||||
rf_mipmaps_image rf_load_ktx_image_to_buffer(const void* src, rf_int src_size, void* dst, rf_int dst_size);
|
||||
rf_mipmaps_image rf_load_ktx_image(const void* src, rf_int src_size, rf_allocator allocator);
|
||||
rf_mipmaps_image rf_load_ktx_image_from_file(const char* file, rf_allocator allocator, rf_allocator temp_allocator, rf_io_callbacks io);
|
||||
rf_gif rf_load_animated_gif(const void* data, rf_int data_size, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
rf_gif rf_load_animated_gif_file(const char* filename, rf_allocator allocator, rf_allocator temp_allocator, rf_io_callbacks io);
|
||||
rf_sizei rf_gif_frame_size(rf_gif gif);
|
||||
rf_image rf_get_frame_from_gif(rf_gif gif, int frame);
|
||||
void rf_unload_gif(rf_gif gif, rf_allocator allocator);
|
||||
rf_vec2 rf_get_seed_for_cellular_image(int seeds_per_row, int tile_size, int i, rf_rand_proc rand);
|
||||
rf_image rf_gen_image_color_to_buffer(int width, int height, rf_color color, rf_color* dst, rf_int dst_size);
|
||||
rf_image rf_gen_image_color(int width, int height, rf_color color, rf_allocator allocator);
|
||||
rf_image rf_gen_image_gradient_v_to_buffer(int width, int height, rf_color top, rf_color bottom, rf_color* dst, rf_int dst_size);
|
||||
rf_image rf_gen_image_gradient_v(int width, int height, rf_color top, rf_color bottom, rf_allocator allocator);
|
||||
rf_image rf_gen_image_gradient_h_to_buffer(int width, int height, rf_color left, rf_color right, rf_color* dst, rf_int dst_size);
|
||||
rf_image rf_gen_image_gradient_h(int width, int height, rf_color left, rf_color right, rf_allocator allocator);
|
||||
rf_image rf_gen_image_gradient_radial_to_buffer(int width, int height, float density, rf_color inner, rf_color outer, rf_color* dst, rf_int dst_size);
|
||||
rf_image rf_gen_image_gradient_radial(int width, int height, float density, rf_color inner, rf_color outer, rf_allocator allocator);
|
||||
rf_image rf_gen_image_checked_to_buffer(int width, int height, int checks_x, int checks_y, rf_color col1, rf_color col2, rf_color* dst, rf_int dst_size);
|
||||
rf_image rf_gen_image_checked(int width, int height, int checks_x, int checks_y, rf_color col1, rf_color col2, rf_allocator allocator);
|
||||
rf_image rf_gen_image_white_noise_to_buffer(int width, int height, float factor, rf_rand_proc rand, rf_color* dst, rf_int dst_size);
|
||||
rf_image rf_gen_image_white_noise(int width, int height, float factor, rf_rand_proc rand, rf_allocator allocator);
|
||||
rf_image rf_gen_image_perlin_noise_to_buffer(int width, int height, int offset_x, int offset_y, float scale, rf_color* dst, rf_int dst_size);
|
||||
rf_image rf_gen_image_perlin_noise(int width, int height, int offset_x, int offset_y, float scale, rf_allocator allocator);
|
||||
rf_image rf_gen_image_cellular_to_buffer(int width, int height, int tile_size, rf_rand_proc rand, rf_color* dst, rf_int dst_size);
|
||||
rf_image rf_gen_image_cellular(int width, int height, int tile_size, rf_rand_proc rand, rf_allocator allocator);
|
||||
rf_image rf_image_copy_to_buffer(rf_image image, void* dst, rf_int dst_size);
|
||||
rf_image rf_image_copy(rf_image image, rf_allocator allocator);
|
||||
rf_image rf_image_crop_to_buffer(rf_image image, rf_rec crop, void* dst, rf_int dst_size, rf_uncompressed_pixel_format dst_format);
|
||||
rf_image rf_image_crop(rf_image image, rf_rec crop, rf_allocator allocator);
|
||||
rf_image rf_image_resize_to_buffer(rf_image image, int new_width, int new_height, void* dst, rf_int dst_size, rf_allocator temp_allocator);
|
||||
rf_image rf_image_resize(rf_image image, int new_width, int new_height, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
rf_image rf_image_resize_nn_to_buffer(rf_image image, int new_width, int new_height, void* dst, rf_int dst_size);
|
||||
rf_image rf_image_resize_nn(rf_image image, int new_width, int new_height, rf_allocator allocator);
|
||||
rf_image rf_image_format_to_buffer(rf_image image, rf_uncompressed_pixel_format dst_format, void* dst, rf_int dst_size);
|
||||
rf_image rf_image_format(rf_image image, rf_uncompressed_pixel_format new_format, rf_allocator allocator);
|
||||
rf_image rf_image_alpha_mask_to_buffer(rf_image image, rf_image alpha_mask, void* dst, rf_int dst_size);
|
||||
rf_image rf_image_alpha_clear(rf_image image, rf_color color, float threshold, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
rf_image rf_image_alpha_premultiply(rf_image image, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
rf_rec rf_image_alpha_crop_rec(rf_image image, float threshold);
|
||||
rf_image rf_image_alpha_crop(rf_image image, float threshold, rf_allocator allocator);
|
||||
rf_image rf_image_dither(rf_image image, int r_bpp, int g_bpp, int b_bpp, int a_bpp, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
rf_image rf_image_flip_vertical_to_buffer(rf_image image, void* dst, rf_int dst_size);
|
||||
rf_image rf_image_flip_vertical(rf_image image, rf_allocator allocator);
|
||||
rf_image rf_image_flip_horizontal_to_buffer(rf_image image, void* dst, rf_int dst_size);
|
||||
rf_image rf_image_flip_horizontal(rf_image image, rf_allocator allocator);
|
||||
rf_image rf_image_rotate_cw_to_buffer(rf_image image, void* dst, rf_int dst_size);
|
||||
rf_image rf_image_rotate_cw(rf_image image);
|
||||
rf_image rf_image_rotate_ccw_to_buffer(rf_image image, void* dst, rf_int dst_size);
|
||||
rf_image rf_image_rotate_ccw(rf_image image);
|
||||
rf_image rf_image_color_tint_to_buffer(rf_image image, rf_color color, void* dst, rf_int dst_size);
|
||||
rf_image rf_image_color_tint(rf_image image, rf_color color);
|
||||
rf_image rf_image_color_invert_to_buffer(rf_image image, void* dst, rf_int dst_size);
|
||||
rf_image rf_image_color_invert(rf_image image);
|
||||
rf_image rf_image_color_grayscale_to_buffer(rf_image image, void* dst, rf_int dst_size);
|
||||
rf_image rf_image_color_grayscale(rf_image image);
|
||||
rf_image rf_image_color_contrast_to_buffer(rf_image image, float contrast, void* dst, rf_int dst_size);
|
||||
rf_image rf_image_color_contrast(rf_image image, int contrast);
|
||||
rf_image rf_image_color_brightness_to_buffer(rf_image image, int brightness, void* dst, rf_int dst_size);
|
||||
rf_image rf_image_color_brightness(rf_image image, int brightness);
|
||||
rf_image rf_image_color_replace_to_buffer(rf_image image, rf_color color, rf_color replace, void* dst, rf_int dst_size);
|
||||
rf_image rf_image_color_replace(rf_image image, rf_color color, rf_color replace);
|
||||
void rf_image_draw(rf_image* dst, rf_image src, rf_rec src_rec, rf_rec dst_rec, rf_color tint, rf_allocator temp_allocator);
|
||||
void rf_image_draw_rectangle(rf_image* dst, rf_rec rec, rf_color color, rf_allocator temp_allocator);
|
||||
void rf_image_draw_rectangle_lines(rf_image* dst, rf_rec rec, int thick, rf_color color, rf_allocator temp_allocator);
|
||||
rf_shader rf_gfx_load_shader(const char* vs_code, const char* fs_code);
|
||||
void rf_gfx_unload_shader(rf_shader shader);
|
||||
int rf_gfx_get_shader_location(rf_shader shader, const char* uniform_name);
|
||||
void rf_gfx_set_shader_value(rf_shader shader, int uniform_loc, const void* value, int uniform_name);
|
||||
void rf_gfx_set_shader_value_v(rf_shader shader, int uniform_loc, const void* value, int uniform_name, int count);
|
||||
void rf_gfx_set_shader_value_matrix(rf_shader shader, int uniform_loc, rf_mat mat);
|
||||
void rf_gfx_set_shader_value_texture(rf_shader shader, int uniform_loc, rf_texture2d texture);
|
||||
rf_mat rf_gfx_get_matrix_projection();
|
||||
rf_mat rf_gfx_get_matrix_modelview();
|
||||
void rf_gfx_set_matrix_projection(rf_mat proj);
|
||||
void rf_gfx_set_matrix_modelview(rf_mat view);
|
||||
void rf_gfx_blend_mode(rf_blend_mode mode);
|
||||
void rf_gfx_matrix_mode(rf_matrix_mode mode);
|
||||
void rf_gfx_push_matrix();
|
||||
void rf_gfx_pop_matrix();
|
||||
void rf_gfx_load_identity();
|
||||
void rf_gfx_translatef(float x, float y, float z);
|
||||
void rf_gfx_rotatef(float angleDeg, float x, float y, float z);
|
||||
void rf_gfx_scalef(float x, float y, float z);
|
||||
void rf_gfx_mult_matrixf(float* matf);
|
||||
void rf_gfx_frustum(double left, double right, double bottom, double top, double znear, double zfar);
|
||||
void rf_gfx_ortho(double left, double right, double bottom, double top, double znear, double zfar);
|
||||
void rf_gfx_viewport(int x, int y, int width, int height);
|
||||
void rf_gfx_begin(rf_drawing_mode mode);
|
||||
void rf_gfx_end();
|
||||
void rf_gfx_vertex2i(int x, int y);
|
||||
void rf_gfx_vertex2f(float x, float y);
|
||||
void rf_gfx_vertex3f(float x, float y, float z);
|
||||
void rf_gfx_tex_coord2f(float x, float y);
|
||||
void rf_gfx_normal3f(float x, float y, float z);
|
||||
void rf_gfx_color4ub(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
|
||||
void rf_gfx_color3f(float x, float y, float z);
|
||||
void rf_gfx_color4f(float x, float y, float z, float w);
|
||||
void rf_gfx_enable_texture(unsigned int id);
|
||||
void rf_gfx_disable_texture();
|
||||
void rf_gfx_set_texture_wrap(rf_texture2d texture, rf_texture_wrap_mode wrap_mode);
|
||||
void rf_gfx_set_texture_filter(rf_texture2d texture, rf_texture_filter_mode filter_mode);
|
||||
void rf_gfx_enable_render_texture(unsigned int id);
|
||||
void rf_gfx_disable_render_texture(void);
|
||||
void rf_gfx_enable_depth_test(void);
|
||||
void rf_gfx_disable_depth_test(void);
|
||||
void rf_gfx_enable_backface_culling(void);
|
||||
void rf_gfx_disable_backface_culling(void);
|
||||
void rf_gfx_enable_scissor_test(void);
|
||||
void rf_gfx_disable_scissor_test(void);
|
||||
void rf_gfx_scissor(int x, int y, int width, int height);
|
||||
void rf_gfx_enable_wire_mode(void);
|
||||
void rf_gfx_disable_wire_mode(void);
|
||||
void rf_gfx_delete_textures(unsigned int id);
|
||||
void rf_gfx_delete_render_textures(rf_render_texture2d target);
|
||||
void rf_gfx_delete_shader(unsigned int id);
|
||||
void rf_gfx_delete_vertex_arrays(unsigned int id);
|
||||
void rf_gfx_delete_buffers(unsigned int id);
|
||||
void rf_gfx_clear_color(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
|
||||
void rf_gfx_clear_screen_buffers(void);
|
||||
void rf_gfx_update_buffer(int buffer_id, void* data, int data_size);
|
||||
unsigned int rf_gfx_load_attrib_buffer(unsigned int vao_id, int shader_loc, void* buffer, int size, bool dynamic);
|
||||
void rf_gfx_init_vertex_buffer(struct rf_vertex_buffer* vertex_buffer);
|
||||
void rf_gfx_close();
|
||||
void rf_gfx_draw();
|
||||
bool rf_gfx_check_buffer_limit(int v_count);
|
||||
void rf_gfx_set_debug_marker(const char* text);
|
||||
unsigned int rf_gfx_load_texture(void* data, int width, int height, rf_pixel_format format, int mipmap_count);
|
||||
unsigned int rf_gfx_load_texture_depth(int width, int height, int bits, bool use_render_buffer);
|
||||
unsigned int rf_gfx_load_texture_cubemap(void* data, int size, rf_pixel_format format);
|
||||
void rf_gfx_update_texture(unsigned int id, int width, int height, rf_pixel_format format, const void* pixels, int pixels_size);
|
||||
rf_gfx_pixel_format rf_gfx_get_internal_texture_formats(rf_pixel_format format);
|
||||
void rf_gfx_unload_texture(unsigned int id);
|
||||
void rf_gfx_generate_mipmaps(rf_texture2d* texture);
|
||||
rf_image rf_gfx_read_texture_pixels_to_buffer(rf_texture2d texture, void* dst, int dst_size);
|
||||
rf_image rf_gfx_read_texture_pixels(rf_texture2d texture, rf_allocator allocator);
|
||||
void rf_gfx_read_screen_pixels(rf_color* dst, int width, int height);
|
||||
rf_render_texture2d rf_gfx_load_render_texture(int width, int height, rf_pixel_format format, int depth_bits, bool use_depth_texture);
|
||||
void rf_gfx_render_texture_attach(rf_render_texture2d target, unsigned int id, int attach_type);
|
||||
bool rf_gfx_render_texture_complete(rf_render_texture2d target);
|
||||
void rf_gfx_load_mesh(struct rf_mesh* mesh, bool dynamic);
|
||||
void rf_gfx_update_mesh(struct rf_mesh mesh, int buffer, int num);
|
||||
void rf_gfx_update_mesh_at(struct rf_mesh mesh, int buffer, int num, int index);
|
||||
void rf_gfx_draw_mesh(struct rf_mesh mesh, struct rf_material material, rf_mat transform);
|
||||
void rf_gfx_unload_mesh(struct rf_mesh mesh);
|
||||
rf_render_batch rf_create_custom_render_batch_from_buffers(rf_vertex_buffer* vertex_buffers, rf_int vertex_buffers_count, rf_draw_call* draw_calls, rf_int draw_calls_count);
|
||||
rf_render_batch rf_create_custom_render_batch(rf_int vertex_buffers_count, rf_int draw_calls_count, rf_int vertex_buffer_elements_count, rf_allocator allocator);
|
||||
rf_render_batch rf_create_default_render_batch(rf_allocator allocator);
|
||||
void rf_set_active_render_batch(rf_render_batch* batch);
|
||||
void rf_unload_render_batch(rf_render_batch batch, rf_allocator allocator);
|
||||
rf_texture2d rf_load_texture_from_file(const char* filename, rf_allocator temp_allocator, rf_io_callbacks io);
|
||||
rf_texture2d rf_load_texture_from_file_data(const void* data, rf_int dst_size, rf_allocator temp_allocator);
|
||||
rf_texture2d rf_load_texture_from_image(rf_image image);
|
||||
rf_texture2d rf_load_texture_from_image_with_mipmaps(rf_mipmaps_image image);
|
||||
rf_texture_cubemap rf_load_texture_cubemap_from_image(rf_image image, rf_cubemap_layout_type layout_type, rf_allocator temp_allocator);
|
||||
rf_render_texture2d rf_load_render_texture(int width, int height);
|
||||
void rf_update_texture(rf_texture2d texture, const void* pixels, rf_int pixels_size);
|
||||
void rf_gen_texture_mipmaps(rf_texture2d* texture);
|
||||
void rf_set_texture_filter(rf_texture2d texture, rf_texture_filter_mode filter_mode);
|
||||
void rf_set_texture_wrap(rf_texture2d texture, rf_texture_wrap_mode wrap_mode);
|
||||
void rf_unload_texture(rf_texture2d texture);
|
||||
void rf_unload_render_texture(rf_render_texture2d target);
|
||||
rf_texture2d rf_gen_texture_cubemap(rf_shader shader, rf_texture2d sky_hdr, rf_int size);
|
||||
rf_texture2d rf_gen_texture_irradiance(rf_shader shader, rf_texture2d cubemap, rf_int size);
|
||||
rf_texture2d rf_gen_texture_prefilter(rf_shader shader, rf_texture2d cubemap, rf_int size);
|
||||
rf_texture2d rf_gen_texture_brdf(rf_shader shader, rf_int size);
|
||||
rf_ttf_font_info rf_parse_ttf_font(const void* ttf_data, rf_int font_size);
|
||||
void rf_compute_ttf_font_glyph_metrics(rf_ttf_font_info* font_info, const int* codepoints, rf_int codepoints_count, rf_glyph_info* dst, rf_int dst_count);
|
||||
int rf_compute_ttf_font_atlas_width(int padding, rf_glyph_info* glyph_metrics, rf_int glyphs_count);
|
||||
rf_image rf_generate_ttf_font_atlas(rf_ttf_font_info* font_info, int atlas_width, int padding, rf_glyph_info* glyphs, rf_int glyphs_count, rf_font_antialias antialias, unsigned short* dst, rf_int dst_count, rf_allocator temp_allocator);
|
||||
rf_font rf_ttf_font_from_atlas(int font_size, rf_image atlas, rf_glyph_info* glyph_metrics, rf_int glyphs_count);
|
||||
rf_font rf_load_ttf_font_from_data(const void* font_file_data, int font_size, rf_font_antialias antialias, const int* chars, rf_int char_count, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
rf_font rf_load_ttf_font_from_file(const char* filename, int font_size, rf_font_antialias antialias, rf_allocator allocator, rf_allocator temp_allocator, rf_io_callbacks io);
|
||||
bool rf_compute_glyph_metrics_from_image(rf_image image, rf_color key, const int* codepoints, rf_glyph_info* dst, rf_int codepoints_and_dst_count);
|
||||
rf_font rf_load_image_font_from_data(rf_image image, rf_glyph_info* glyphs, rf_int glyphs_count);
|
||||
rf_font rf_load_image_font(rf_image image, rf_color key, rf_allocator allocator);
|
||||
rf_font rf_load_image_font_from_file(const char* path, rf_color key, rf_allocator allocator, rf_allocator temp_allocator, rf_io_callbacks io);
|
||||
void rf_unload_font(rf_font font, rf_allocator allocator);
|
||||
rf_glyph_index rf_get_glyph_index(rf_font font, int character);
|
||||
int rf_font_height(rf_font font, float font_size);
|
||||
rf_sizef rf_measure_text(rf_font font, const char* text, float font_size, float extra_spacing);
|
||||
rf_sizef rf_measure_text_rec(rf_font font, const char* text, rf_rec rec, float font_size, float extra_spacing, bool wrap);
|
||||
rf_sizef rf_measure_string(rf_font font, const char* text, int len, float font_size, float extra_spacing);
|
||||
rf_sizef rf_measure_string_rec(rf_font font, const char* text, int text_len, rf_rec rec, float font_size, float extra_spacing, bool wrap);
|
||||
void rf_clear(rf_color color);
|
||||
void rf_begin();
|
||||
void rf_end();
|
||||
void rf_begin_2d(rf_camera2d camera);
|
||||
void rf_end_2d();
|
||||
void rf_begin_3d(rf_camera3d camera);
|
||||
void rf_end_3d();
|
||||
void rf_begin_render_to_texture(rf_render_texture2d target);
|
||||
void rf_end_render_to_texture();
|
||||
void rf_begin_scissor_mode(int x, int y, int width, int height);
|
||||
void rf_end_scissor_mode();
|
||||
void rf_begin_shader(rf_shader shader);
|
||||
void rf_end_shader();
|
||||
void rf_begin_blend_mode(rf_blend_mode mode);
|
||||
void rf_end_blend_mode();
|
||||
void rf_draw_pixel(int pos_x, int pos_y, rf_color color);
|
||||
void rf_draw_pixel_v(rf_vec2 position, rf_color color);
|
||||
void rf_draw_line(int startPosX, int startPosY, int endPosX, int endPosY, rf_color color);
|
||||
void rf_draw_line_v(rf_vec2 startPos, rf_vec2 endPos, rf_color color);
|
||||
void rf_draw_line_ex(rf_vec2 startPos, rf_vec2 endPos, float thick, rf_color color);
|
||||
void rf_draw_line_bezier(rf_vec2 start_pos, rf_vec2 end_pos, float thick, rf_color color);
|
||||
void rf_draw_line_strip(rf_vec2* points, int num_points, rf_color color);
|
||||
void rf_draw_circle(int center_x, int center_y, float radius, rf_color color);
|
||||
void rf_draw_circle_v(rf_vec2 center, float radius, rf_color color);
|
||||
void rf_draw_circle_sector(rf_vec2 center, float radius, int start_angle, int end_angle, int segments, rf_color color);
|
||||
void rf_draw_circle_sector_lines(rf_vec2 center, float radius, int start_angle, int end_angle, int segments, rf_color color);
|
||||
void rf_draw_circle_gradient(int center_x, int center_y, float radius, rf_color color1, rf_color color2);
|
||||
void rf_draw_circle_lines(int center_x, int center_y, float radius, rf_color color);
|
||||
void rf_draw_ring(rf_vec2 center, float inner_radius, float outer_radius, int start_angle, int end_angle, int segments, rf_color color);
|
||||
void rf_draw_ring_lines(rf_vec2 center, float inner_radius, float outer_radius, int start_angle, int end_angle, int segments, rf_color color);
|
||||
void rf_draw_rectangle(int posX, int posY, int width, int height, rf_color color);
|
||||
void rf_draw_rectangle_v(rf_vec2 position, rf_vec2 size, rf_color color);
|
||||
void rf_draw_rectangle_rec(rf_rec rec, rf_color color);
|
||||
void rf_draw_rectangle_pro(rf_rec rec, rf_vec2 origin, float rotation, rf_color color);
|
||||
void rf_draw_rectangle_gradient_v(int pos_x, int pos_y, int width, int height, rf_color color1, rf_color color2);// Draw a vertical-gradient-filled rectangle
|
||||
void rf_draw_rectangle_gradient_h(int pos_x, int pos_y, int width, int height, rf_color color1, rf_color color2);// Draw a horizontal-gradient-filled rectangle
|
||||
void rf_draw_rectangle_gradient(rf_rec rec, rf_color col1, rf_color col2, rf_color col3, rf_color col4);
|
||||
void rf_draw_rectangle_outline(rf_rec rec, int line_thick, rf_color color);
|
||||
void rf_draw_rectangle_rounded(rf_rec rec, float roundness, int segments, rf_color color);
|
||||
void rf_draw_rectangle_rounded_lines(rf_rec rec, float roundness, int segments, int line_thick, rf_color color);
|
||||
void rf_draw_triangle(rf_vec2 v1, rf_vec2 v2, rf_vec2 v3, rf_color color);
|
||||
void rf_draw_triangle_lines(rf_vec2 v1, rf_vec2 v2, rf_vec2 v3, rf_color color);
|
||||
void rf_draw_triangle_fan(rf_vec2* points, int num_points, rf_color color);
|
||||
void rf_draw_triangle_strip(rf_vec2* points, int points_count, rf_color color);
|
||||
void rf_draw_poly(rf_vec2 center, int sides, float radius, float rotation, rf_color color);
|
||||
void rf_draw_texture(rf_texture2d texture, int x, int y, rf_color tint);
|
||||
void rf_draw_texture_ex(rf_texture2d texture, int x, int y, int w, int h, float rotation, rf_color tint);
|
||||
void rf_draw_texture_region(rf_texture2d texture, rf_rec source_rec, rf_rec dest_rec, rf_vec2 origin, float rotation, rf_color tint);
|
||||
void rf_draw_texture_npatch(rf_texture2d texture, rf_npatch_info n_patch_info, rf_rec dest_rec, rf_vec2 origin, float rotation, rf_color tint);
|
||||
void rf_draw_string(const char* string, int string_len, int posX, int posY, int font_size, rf_color color);
|
||||
void rf_draw_string_ex(rf_font font, const char* string, int string_len, rf_vec2 position, float fontSize, float spacing, rf_color tint);
|
||||
void rf_draw_string_wrap(rf_font font, const char* string, int string_len, rf_vec2 position, float font_size, float spacing, rf_color tint, float wrap_width, rf_text_wrap_mode mode);
|
||||
void rf_draw_string_rec(rf_font font, const char* string, int string_len, rf_rec rec, float font_size, float spacing, rf_text_wrap_mode wrap, rf_color tint);
|
||||
void rf_draw_text(const char* text, int posX, int posY, int font_size, rf_color color);
|
||||
void rf_draw_text_ex(rf_font font, const char* text, rf_vec2 position, float fontSize, float spacing, rf_color tint);
|
||||
void rf_draw_text_wrap(rf_font font, const char* text, rf_vec2 position, float font_size, float spacing, rf_color tint, float wrap_width, rf_text_wrap_mode mode);
|
||||
void rf_draw_text_rec(rf_font font, const char* text, rf_rec rec, float font_size, float spacing, rf_text_wrap_mode wrap, rf_color tint);
|
||||
void rf_draw_line3d(rf_vec3 start_pos, rf_vec3 end_pos, rf_color color);
|
||||
void rf_draw_circle3d(rf_vec3 center, float radius, rf_vec3 rotation_axis, float rotation_angle, rf_color color);
|
||||
void rf_draw_cube(rf_vec3 position, float width, float height, float length, rf_color color);
|
||||
void rf_draw_cube_wires(rf_vec3 position, float width, float height, float length, rf_color color);
|
||||
void rf_draw_cube_texture(rf_texture2d texture, rf_vec3 position, float width, float height, float length, rf_color color);
|
||||
void rf_draw_sphere(rf_vec3 center_pos, float radius, rf_color color);
|
||||
void rf_draw_sphere_ex(rf_vec3 center_pos, float radius, int rings, int slices, rf_color color);
|
||||
void rf_draw_sphere_wires(rf_vec3 center_pos, float radius, int rings, int slices, rf_color color);
|
||||
void rf_draw_cylinder(rf_vec3 position, float radius_top, float radius_bottom, float height, int slices, rf_color color);
|
||||
void rf_draw_cylinder_wires(rf_vec3 position, float radius_top, float radius_bottom, float height, int slices, rf_color color);
|
||||
void rf_draw_plane(rf_vec3 center_pos, rf_vec2 size, rf_color color);
|
||||
void rf_draw_ray(rf_ray ray, rf_color color);
|
||||
void rf_draw_grid(int slices, float spacing);
|
||||
void rf_draw_gizmo(rf_vec3 position);
|
||||
void rf_draw_model(rf_model model, rf_vec3 position, float scale, rf_color tint);
|
||||
void rf_draw_model_ex(rf_model model, rf_vec3 position, rf_vec3 rotation_axis, float rotation_angle, rf_vec3 scale, rf_color tint);
|
||||
void rf_draw_model_wires(rf_model model, rf_vec3 position, rf_vec3 rotation_axis, float rotation_angle, rf_vec3 scale, rf_color tint);
|
||||
void rf_draw_bounding_box(rf_bounding_box box, rf_color color);
|
||||
void rf_draw_billboard(rf_camera3d camera, rf_texture2d texture, rf_vec3 center, float size, rf_color tint);
|
||||
void rf_draw_billboard_rec(rf_camera3d camera, rf_texture2d texture, rf_rec source_rec, rf_vec3 center, float size, rf_color tint);
|
||||
rf_bounding_box rf_mesh_bounding_box(rf_mesh mesh);
|
||||
void rf_mesh_compute_tangents(rf_mesh* mesh, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
void rf_mesh_compute_binormals(rf_mesh* mesh);
|
||||
void rf_unload_mesh(rf_mesh mesh, rf_allocator allocator);
|
||||
rf_model rf_load_model(const char* filename, rf_allocator allocator, rf_allocator temp_allocator, rf_io_callbacks io);
|
||||
rf_model rf_load_model_from_obj(const char* filename, rf_allocator allocator, rf_allocator temp_allocator, rf_io_callbacks io);
|
||||
rf_model rf_load_model_from_iqm(const char* filename, rf_allocator allocator, rf_allocator temp_allocator, rf_io_callbacks io);
|
||||
rf_model rf_load_model_from_gltf(const char* filename, rf_allocator allocator, rf_allocator temp_allocator, rf_io_callbacks io);
|
||||
rf_model rf_load_model_from_mesh(rf_mesh mesh, rf_allocator allocator);
|
||||
void rf_unload_model(rf_model model, rf_allocator allocator);
|
||||
rf_materials_array rf_load_materials_from_mtl(const char* filename, rf_allocator allocator, rf_io_callbacks io);
|
||||
void rf_unload_material(rf_material material, rf_allocator allocator);
|
||||
rf_model_animation_array rf_load_model_animations_from_iqm_file(const char* filename, rf_allocator allocator, rf_allocator temp_allocator, rf_io_callbacks io);
|
||||
rf_model_animation_array rf_load_model_animations_from_iqm(const unsigned char* data, int data_size, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
void rf_update_model_animation(rf_model model, rf_model_animation anim, int frame);
|
||||
bool rf_is_model_animation_valid(rf_model model, rf_model_animation anim);
|
||||
void rf_unload_model_animation(rf_model_animation anim, rf_allocator allocator);
|
||||
rf_mesh rf_gen_mesh_cube(float width, float height, float length, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
rf_mesh rf_gen_mesh_poly(int sides, float radius, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
rf_mesh rf_gen_mesh_plane(float width, float length, int res_x, int res_z, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
rf_mesh rf_gen_mesh_sphere(float radius, int rings, int slices, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
rf_mesh rf_gen_mesh_hemi_sphere(float radius, int rings, int slices, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
rf_mesh rf_gen_mesh_cylinder(float radius, float height, int slices, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
rf_mesh rf_gen_mesh_torus(float radius, float size, int rad_seg, int sides, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
rf_mesh rf_gen_mesh_knot(float radius, float size, int rad_seg, int sides, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
rf_mesh rf_gen_mesh_heightmap(rf_image heightmap, rf_vec3 size, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
rf_mesh rf_gen_mesh_cubicmap(rf_image cubicmap, rf_vec3 cube_size, rf_allocator allocator, rf_allocator temp_allocator);
|
||||
void rf_init_context(rf_context* ctx);
|
||||
void rf_init_gfx(int screen_width, int screen_height, rf_gfx_backend_data* gfx_data);
|
||||
rf_material rf_load_default_material(rf_allocator allocator);
|
||||
rf_shader rf_load_default_shader();
|
||||
rf_font rf_get_default_font();
|
||||
rf_shader rf_get_default_shader();
|
||||
rf_texture2d rf_get_default_texture();
|
||||
rf_context* rf_get_context();
|
||||
rf_image rf_get_screen_data(rf_color* dst, rf_int dst_size);
|
||||
void rf_set_global_context_pointer(rf_context* ctx);
|
||||
void rf_set_viewport(int width, int height);
|
||||
void rf_set_shapes_texture(rf_texture2d texture, rf_rec source);
|
||||
rf_material rf_load_default_material_ez();
|
||||
rf_image rf_get_screen_data_ez();
|
||||
rf_base64_output rf_decode_base64_ez(const unsigned char* input);
|
||||
rf_image rf_gfx_read_texture_pixels_ez(rf_texture2d texture);
|
||||
rf_color* rf_image_pixels_to_rgba32_ez(rf_image image);
|
||||
rf_vec4* rf_image_compute_pixels_to_normalized_ez(rf_image image);
|
||||
rf_palette rf_image_extract_palette_ez(rf_image image, int palette_size);
|
||||
rf_image rf_load_image_from_file_data_ez(const void* src, int src_size);
|
||||
rf_image rf_load_image_from_hdr_file_data_ez(const void* src, int src_size);
|
||||
rf_image rf_load_image_from_file_ez(const char* filename);
|
||||
void rf_unload_image_ez(rf_image image);
|
||||
rf_image rf_image_copy_ez(rf_image image);
|
||||
rf_image rf_image_crop_ez(rf_image image, rf_rec crop);
|
||||
rf_image rf_image_resize_ez(rf_image image, int new_width, int new_height);
|
||||
rf_image rf_image_resize_nn_ez(rf_image image, int new_width, int new_height);
|
||||
rf_image rf_image_format_ez(rf_image image, rf_uncompressed_pixel_format new_format);
|
||||
rf_image rf_image_alpha_clear_ez(rf_image image, rf_color color, float threshold);
|
||||
rf_image rf_image_alpha_premultiply_ez(rf_image image);
|
||||
rf_image rf_image_alpha_crop_ez(rf_image image, float threshold);
|
||||
rf_image rf_image_dither_ez(rf_image image, int r_bpp, int g_bpp, int b_bpp, int a_bpp);
|
||||
rf_image rf_image_flip_vertical_ez(rf_image image);
|
||||
rf_image rf_image_flip_horizontal_ez(rf_image image);
|
||||
rf_vec2 rf_get_seed_for_cellular_image_ez(int seeds_per_row, int tile_size, int i);
|
||||
rf_image rf_gen_image_color_ez(int width, int height, rf_color color);
|
||||
rf_image rf_gen_image_gradient_v_ez(int width, int height, rf_color top, rf_color bottom);
|
||||
rf_image rf_gen_image_gradient_h_ez(int width, int height, rf_color left, rf_color right);
|
||||
rf_image rf_gen_image_gradient_radial_ez(int width, int height, float density, rf_color inner, rf_color outer);
|
||||
rf_image rf_gen_image_checked_ez(int width, int height, int checks_x, int checks_y, rf_color col1, rf_color col2);
|
||||
rf_image rf_gen_image_white_noise_ez(int width, int height, float factor);
|
||||
rf_image rf_gen_image_perlin_noise_ez(int width, int height, int offset_x, int offset_y, float scale);
|
||||
rf_image rf_gen_image_cellular_ez(int width, int height, int tile_size);
|
||||
rf_mipmaps_image rf_image_gen_mipmaps_ez(rf_image image, int gen_mipmaps_count);
|
||||
void rf_unload_mipmaps_image_ez(rf_mipmaps_image image);
|
||||
rf_mipmaps_image rf_load_dds_image_ez(const void* src, int src_size);
|
||||
rf_mipmaps_image rf_load_dds_image_from_file_ez(const char* file);
|
||||
rf_image rf_load_pkm_image_ez(const void* src, int src_size);
|
||||
rf_image rf_load_pkm_image_from_file_ez(const char* file);
|
||||
rf_mipmaps_image rf_load_ktx_image_ez(const void* src, int src_size);
|
||||
rf_mipmaps_image rf_load_ktx_image_from_file_ez(const char* file);
|
||||
rf_gif rf_load_animated_gif_ez(const void* data, int data_size);
|
||||
rf_gif rf_load_animated_gif_file_ez(const char* filename);
|
||||
void rf_unload_gif_ez(rf_gif gif);
|
||||
rf_texture2d rf_load_texture_from_file_ez(const char* filename);
|
||||
rf_texture2d rf_load_texture_from_file_data_ez(const void* data, int dst_size);
|
||||
rf_texture_cubemap rf_load_texture_cubemap_from_image_ez(rf_image image, rf_cubemap_layout_type layout_type);
|
||||
rf_font rf_load_ttf_font_from_data_ez(const void* font_file_data, int font_size, rf_font_antialias antialias, const int* chars, int chars_count);
|
||||
rf_font rf_load_ttf_font_from_file_ez(const char* filename, int font_size, rf_font_antialias antialias);
|
||||
rf_font rf_load_image_font_ez(rf_image image, rf_color key);
|
||||
rf_font rf_load_image_font_from_file_ez(const char* path, rf_color key);
|
||||
void rf_unload_font_ez(rf_font font);
|
||||
rf_decoded_string rf_decode_utf8_ez(const char* text, int len);
|
||||
void rf_image_draw_ez(rf_image* dst, rf_image src, rf_rec src_rec, rf_rec dst_rec, rf_color tint);
|
||||
void rf_image_draw_rectangle_ez(rf_image* dst, rf_rec rec, rf_color color);
|
||||
void rf_image_draw_rectangle_lines_ez(rf_image* dst, rf_rec rec, int thick, rf_color color);
|
||||
void rf_mesh_compute_tangents_ez(rf_mesh* mesh);
|
||||
void rf_unload_mesh_ez(rf_mesh mesh);
|
||||
rf_model rf_load_model_ez(const char* filename);
|
||||
rf_model rf_load_model_from_obj_ez(const char* filename);
|
||||
rf_model rf_load_model_from_iqm_ez(const char* filename);
|
||||
rf_model rf_load_model_from_gltf_ez(const char* filename);
|
||||
rf_model rf_load_model_from_mesh_ez(rf_mesh mesh);
|
||||
void rf_unload_model_ez(rf_model model);
|
||||
rf_materials_array rf_load_materials_from_mtl_ez(const char* filename);
|
||||
void rf_unload_material_ez(rf_material material);
|
||||
rf_model_animation_array rf_load_model_animations_from_iqm_file_ez(const char* filename);
|
||||
rf_model_animation_array rf_load_model_animations_from_iqm_ez(const unsigned char* data, int data_size);
|
||||
void rf_unload_model_animation_ez(rf_model_animation anim);
|
||||
rf_mesh rf_gen_mesh_cube_ez(float width, float height, float length);
|
||||
rf_mesh rf_gen_mesh_poly_ez(int sides, float radius);
|
||||
rf_mesh rf_gen_mesh_plane_ez(float width, float length, int res_x, int res_z);
|
||||
rf_mesh rf_gen_mesh_sphere_ez(float radius, int rings, int slices);
|
||||
rf_mesh rf_gen_mesh_hemi_sphere_ez(float radius, int rings, int slices);
|
||||
rf_mesh rf_gen_mesh_cylinder_ez(float radius, float height, int slices);
|
||||
rf_mesh rf_gen_mesh_torus_ez(float radius, float size, int rad_seg, int sides);
|
||||
rf_mesh rf_gen_mesh_knot_ez(float radius, float size, int rad_seg, int sides);
|
||||
rf_mesh rf_gen_mesh_heightmap_ez(rf_image heightmap, rf_vec3 size);
|
||||
rf_mesh rf_gen_mesh_cubicmap_ez(rf_image cubicmap, rf_vec3 cube_size);
|
@ -1,91 +0,0 @@
|
||||
float Clamp(float value, float min, float max)
|
||||
float Lerp(float start, float end, float amount)
|
||||
float Normalize(float value, float start, float end)
|
||||
float Remap(float value, float inputStart, float inputEnd, float outputStart, float outputEnd)
|
||||
Vector2 Vector2Zero(void)
|
||||
Vector2 Vector2One(void)
|
||||
Vector2 Vector2Add(Vector2 v1, Vector2 v2)
|
||||
Vector2 Vector2AddValue(Vector2 v, float add)
|
||||
Vector2 Vector2Subtract(Vector2 v1, Vector2 v2)
|
||||
Vector2 Vector2SubtractValue(Vector2 v, float sub)
|
||||
float Vector2Length(Vector2 v)
|
||||
float Vector2DotProduct(Vector2 v1, Vector2 v2)
|
||||
float Vector2Distance(Vector2 v1, Vector2 v2)
|
||||
float Vector2Angle(Vector2 v1, Vector2 v2)
|
||||
Vector2 Vector2Scale(Vector2 v, float scale)
|
||||
Vector2 Vector2Multiply(Vector2 v1, Vector2 v2)
|
||||
Vector2 Vector2Negate(Vector2 v)
|
||||
Vector2 Vector2Divide(Vector2 v1, Vector2 v2)
|
||||
Vector2 Vector2Normalize(Vector2 v)
|
||||
Vector2 Vector2Lerp(Vector2 v1, Vector2 v2, float amount)
|
||||
Vector2 Vector2Rotate(Vector2 v, float degs)
|
||||
Vector2 Vector2MoveTowards(Vector2 v, Vector2 target, float maxDistance)
|
||||
Vector3 Vector3Zero(void)
|
||||
Vector3 Vector3One(void)
|
||||
Vector3 Vector3Add(Vector3 v1, Vector3 v2)
|
||||
Vector3 Vector3AddValue(Vector3 v, float add)
|
||||
Vector3 Vector3Subtract(Vector3 v1, Vector3 v2)
|
||||
Vector3 Vector3SubtractValue(Vector3 v, float sub)
|
||||
Vector3 Vector3Scale(Vector3 v, float scalar)
|
||||
Vector3 Vector3Multiply(Vector3 v1, Vector3 v2)
|
||||
Vector3 Vector3CrossProduct(Vector3 v1, Vector3 v2)
|
||||
Vector3 Vector3Perpendicular(Vector3 v)
|
||||
float Vector3Length(const Vector3 v)
|
||||
float Vector3DotProduct(Vector3 v1, Vector3 v2)
|
||||
float Vector3Distance(Vector3 v1, Vector3 v2)
|
||||
Vector3 Vector3Negate(Vector3 v)
|
||||
Vector3 Vector3Divide(Vector3 v1, Vector3 v2)
|
||||
Vector3 Vector3Normalize(Vector3 v)
|
||||
void Vector3OrthoNormalize(Vector3 *v1, Vector3 *v2)
|
||||
Vector3 Vector3Transform(Vector3 v, Matrix mat)
|
||||
Vector3 Vector3RotateByQuaternion(Vector3 v, Quaternion q)
|
||||
Vector3 Vector3Lerp(Vector3 v1, Vector3 v2, float amount)
|
||||
Vector3 Vector3Reflect(Vector3 v, Vector3 normal)
|
||||
Vector3 Vector3Min(Vector3 v1, Vector3 v2)
|
||||
Vector3 Vector3Max(Vector3 v1, Vector3 v2)
|
||||
Vector3 Vector3Barycenter(Vector3 p, Vector3 a, Vector3 b, Vector3 c)
|
||||
float3 Vector3ToFloatV(Vector3 v)
|
||||
float MatrixDeterminant(Matrix mat)
|
||||
float MatrixTrace(Matrix mat)
|
||||
Matrix MatrixTranspose(Matrix mat)
|
||||
Matrix MatrixInvert(Matrix mat)
|
||||
Matrix MatrixNormalize(Matrix mat)
|
||||
Matrix MatrixIdentity(void)
|
||||
Matrix MatrixAdd(Matrix left, Matrix right)
|
||||
Matrix MatrixSubtract(Matrix left, Matrix right)
|
||||
Matrix MatrixTranslate(float x, float y, float z)
|
||||
Matrix MatrixRotate(Vector3 axis, float angle)
|
||||
Matrix MatrixRotateXYZ(Vector3 ang)
|
||||
Matrix MatrixRotateX(float angle)
|
||||
Matrix MatrixRotateY(float angle)
|
||||
Matrix MatrixRotateZ(float angle)
|
||||
Matrix MatrixScale(float x, float y, float z)
|
||||
Matrix MatrixMultiply(Matrix left, Matrix right)
|
||||
Matrix MatrixFrustum(double left, double right, double bottom, double top, double near, double far)
|
||||
Matrix MatrixPerspective(double fovy, double aspect, double near, double far)
|
||||
Matrix MatrixOrtho(double left, double right, double bottom, double top, double near, double far)
|
||||
Matrix MatrixLookAt(Vector3 eye, Vector3 target, Vector3 up)
|
||||
float16 MatrixToFloatV(Matrix mat)
|
||||
Quaternion QuaternionAdd(Quaternion q1, Quaternion q2)
|
||||
Quaternion QuaternionAddValue(Quaternion q, float add)
|
||||
Quaternion QuaternionSubtract(Quaternion q1, Quaternion q2)
|
||||
Quaternion QuaternionSubtractValue(Quaternion q, float sub)
|
||||
Quaternion QuaternionIdentity(void)
|
||||
float QuaternionLength(Quaternion q)
|
||||
Quaternion QuaternionNormalize(Quaternion q)
|
||||
Quaternion QuaternionInvert(Quaternion q)
|
||||
Quaternion QuaternionMultiply(Quaternion q1, Quaternion q2)
|
||||
Quaternion QuaternionScale(Quaternion q, float mul)
|
||||
Quaternion QuaternionDivide(Quaternion q1, Quaternion q2)
|
||||
Quaternion QuaternionLerp(Quaternion q1, Quaternion q2, float amount)
|
||||
Quaternion QuaternionNlerp(Quaternion q1, Quaternion q2, float amount)
|
||||
Quaternion QuaternionSlerp(Quaternion q1, Quaternion q2, float amount)
|
||||
Quaternion QuaternionFromVector3ToVector3(Vector3 from, Vector3 to)
|
||||
Quaternion QuaternionFromMatrix(Matrix mat)
|
||||
Matrix QuaternionToMatrix(Quaternion q)
|
||||
Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle)
|
||||
void QuaternionToAxisAngle(Quaternion q, Vector3 *outAxis, float *outAngle)
|
||||
Quaternion QuaternionFromEuler(float roll, float pitch, float yaw)
|
||||
Vector3 QuaternionToEuler(Quaternion q)
|
||||
Quaternion QuaternionTransform(Quaternion q, Matrix mat)
|
||||
Vector3 Vector3Unproject(Vector3 source, Matrix projection, Matrix view)
|
70
tools/rlgl.h
70
tools/rlgl.h
@ -1,70 +0,0 @@
|
||||
void rlMatrixMode(int mode)
|
||||
void rlPushMatrix(void)
|
||||
void rlPopMatrix(void)
|
||||
void rlLoadIdentity(void)
|
||||
void rlTranslatef(float x, float y, float z)
|
||||
void rlRotatef(float angleDeg, float x, float y, float z)
|
||||
void rlScalef(float x, float y, float z)
|
||||
void rlMultMatrixf(float *matf)
|
||||
void rlFrustum(double left, double right, double bottom, double top, double znear, double zfar)
|
||||
void rlOrtho(double left, double right, double bottom, double top, double znear, double zfar)
|
||||
void rlViewport(int x, int y, int width, int height)
|
||||
void rlBegin(int mode)
|
||||
void rlEnd(void)
|
||||
void rlVertex2i(int x, int y)
|
||||
void rlVertex2f(float x, float y)
|
||||
void rlVertex3f(float x, float y, float z)
|
||||
void rlTexCoord2f(float x, float y)
|
||||
void rlNormal3f(float x, float y, float z)
|
||||
void rlColor4ub(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
|
||||
void rlColor3f(float x, float y, float z)
|
||||
void rlColor4f(float x, float y, float z, float w)
|
||||
void rlEnableTexture(unsigned int id)
|
||||
void rlDisableTexture(void)
|
||||
void rlTextureParameters(unsigned int id, int param, int value)
|
||||
void rlEnableRenderTexture(unsigned int id)
|
||||
void rlDisableRenderTexture(void)
|
||||
void rlEnableDepthTest(void)
|
||||
void rlDisableDepthTest(void)
|
||||
void rlEnableBackfaceCulling(void)
|
||||
void rlDisableBackfaceCulling(void)
|
||||
void rlEnableScissorTest(void)
|
||||
void rlDisableScissorTest(void)
|
||||
void rlScissor(int x, int y, int width, int height)
|
||||
void rlEnableWireMode(void)
|
||||
void rlDisableWireMode(void)
|
||||
void rlDeleteTextures(unsigned int id)
|
||||
void rlDeleteRenderTextures(RenderTexture2D target)
|
||||
void rlDeleteShader(unsigned int id)
|
||||
void rlDeleteVertexArrays(unsigned int id)
|
||||
void rlDeleteBuffers(unsigned int id)
|
||||
void rlClearColor(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
|
||||
void rlClearScreenBuffers(void)
|
||||
void rlUpdateBuffer(int bufferId, void *data, int dataSize)
|
||||
unsigned int rlLoadAttribBuffer(unsigned int vaoId, int shaderLoc, void *buffer, int size, bool dynamic)
|
||||
void rlglInit(int width, int height)
|
||||
void rlglClose(void)
|
||||
void rlglDraw(void)
|
||||
void rlCheckErrors(void)
|
||||
int rlGetVersion(void)
|
||||
bool rlCheckBufferLimit(int vCount)
|
||||
void rlSetDebugMarker(const char *text)
|
||||
void rlSetBlendMode(int glSrcFactor, int glDstFactor, int glEquation)
|
||||
void rlLoadExtensions(void *loader)
|
||||
unsigned int rlLoadTexture(void *data, int width, int height, int format, int mipmapCount)
|
||||
unsigned int rlLoadTextureDepth(int width, int height, int bits, bool useRenderBuffer)
|
||||
unsigned int rlLoadTextureCubemap(void *data, int size, int format)
|
||||
void rlUpdateTexture(unsigned int id, int offsetX, int offsetY, int width, int height, int format, const void *data)
|
||||
void rlGetGlTextureFormats(int format, unsigned int *glInternalFormat, unsigned int *glFormat, unsigned int *glType)
|
||||
void rlUnloadTexture(unsigned int id)
|
||||
void rlGenerateMipmaps(Texture2D *texture)
|
||||
void *rlReadTexturePixels(Texture2D texture)
|
||||
unsigned char *rlReadScreenPixels(int width, int height)
|
||||
RenderTexture2D rlLoadRenderTexture(int width, int height, int format, int depthBits, bool useDepthTexture)
|
||||
void rlRenderTextureAttach(RenderTexture target, unsigned int id, int attachType)
|
||||
bool rlRenderTextureComplete(RenderTexture target)
|
||||
void rlLoadMesh(Mesh *mesh, bool dynamic)
|
||||
void rlUpdateMesh(Mesh mesh, int buffer, int num)
|
||||
void rlUpdateMeshAt(Mesh mesh, int buffer, int num, int index)
|
||||
void rlDrawMesh(Mesh mesh, Material material, Matrix transform)
|
||||
void rlUnloadMesh(Mesh mesh)
|
Loading…
Reference in New Issue
Block a user