Gitignore zig crap
This commit is contained in:
@ -0,0 +1,480 @@
|
||||
// raylib-zig (c) Nikolas Wipper 2020-2024
|
||||
|
||||
const std = @import("std");
|
||||
const this = @This();
|
||||
const rl = @import("raylib");
|
||||
pub const emsdk = rl.emsdk;
|
||||
|
||||
pub const Options = rl.Options;
|
||||
pub const OpenglVersion = rl.OpenglVersion;
|
||||
pub const LinuxDisplayBackend = rl.LinuxDisplayBackend;
|
||||
pub const PlatformBackend = rl.PlatformBackend;
|
||||
|
||||
const Program = struct {
|
||||
name: []const u8,
|
||||
path: []const u8,
|
||||
desc: []const u8,
|
||||
};
|
||||
|
||||
fn getModule(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) *std.Build.Module {
|
||||
if (b.modules.contains("raylib")) {
|
||||
return b.modules.get("raylib").?;
|
||||
}
|
||||
return b.addModule("raylib", .{
|
||||
.root_source_file = b.path("lib/raylib.zig"),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.link_libc = true,
|
||||
});
|
||||
}
|
||||
|
||||
const gui = struct {
|
||||
fn getModule(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) *std.Build.Module {
|
||||
const raylib = this.getModule(b, target, optimize);
|
||||
return b.addModule("raygui", .{
|
||||
.root_source_file = b.path("lib/raygui.zig"),
|
||||
.imports = &.{.{ .name = "raylib-zig", .module = raylib }},
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.link_libc = true,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
pub fn build(b: *std.Build) !void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
const options = Options.getOptions(b);
|
||||
const raylib_dep = b.dependency("raylib", .{
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
.raudio = options.raudio,
|
||||
.rmodels = options.rmodels,
|
||||
.rshapes = options.rshapes,
|
||||
.rtext = options.rtext,
|
||||
.rtextures = options.rtextures,
|
||||
.platform = options.platform,
|
||||
.linkage = options.linkage,
|
||||
.linux_display_backend = options.linux_display_backend,
|
||||
.opengl_version = options.opengl_version,
|
||||
.android_api_version = options.android_api_version,
|
||||
.android_ndk = options.android_ndk,
|
||||
.config = options.config,
|
||||
.raygui = true,
|
||||
});
|
||||
|
||||
const raylib_artifact = raylib_dep.artifact("raylib");
|
||||
|
||||
b.installArtifact(raylib_artifact);
|
||||
|
||||
const raylib = this.getModule(b, target, optimize);
|
||||
const raygui = this.gui.getModule(b, target, optimize);
|
||||
|
||||
raylib.linkLibrary(raylib_artifact);
|
||||
|
||||
const examples = [_]Program{
|
||||
.{
|
||||
.name = "raw_stream",
|
||||
.path = "examples/audio/raw_stream.zig",
|
||||
.desc = "Plays a sine wave",
|
||||
},
|
||||
.{
|
||||
.name = "music_stream",
|
||||
.path = "examples/audio/music_stream.zig",
|
||||
.desc = "Use music stream to play an audio file",
|
||||
},
|
||||
.{
|
||||
.name = "sound_loading",
|
||||
.path = "examples/audio/sound_loading.zig",
|
||||
.desc = "Load and play a song",
|
||||
},
|
||||
.{
|
||||
.name = "module_playing",
|
||||
.path = "examples/audio/module_playing.zig",
|
||||
.desc = "Module playing (streaming)",
|
||||
},
|
||||
.{
|
||||
.name = "basic_screen_manager",
|
||||
.path = "examples/core/basic_screen_manager.zig",
|
||||
.desc = "Illustrates simple screen manager based on a state machine",
|
||||
},
|
||||
.{
|
||||
.name = "basic_window",
|
||||
.path = "examples/core/basic_window.zig",
|
||||
.desc = "Creates a basic window with text",
|
||||
},
|
||||
.{
|
||||
.name = "delta_time",
|
||||
.path = "examples/core/delta_time.zig",
|
||||
.desc = "Show how to use frame time (delta time)",
|
||||
},
|
||||
.{
|
||||
.name = "core_monitor_change",
|
||||
.path = "examples/core/core_monitor_change.zig",
|
||||
.desc = "Simple Monitor Manager",
|
||||
},
|
||||
.{
|
||||
.name = "basic_window_web",
|
||||
.path = "examples/core/basic_window_web.zig",
|
||||
.desc = "Creates a basic window with text (web)",
|
||||
},
|
||||
.{
|
||||
.name = "input_keys",
|
||||
.path = "examples/core/input_keys.zig",
|
||||
.desc = "Simple keyboard input",
|
||||
},
|
||||
.{
|
||||
.name = "input_mouse",
|
||||
.path = "examples/core/input_mouse.zig",
|
||||
.desc = "Simple mouse input",
|
||||
},
|
||||
.{
|
||||
.name = "input_mouse_wheel",
|
||||
.path = "examples/core/input_mouse_wheel.zig",
|
||||
.desc = "Mouse wheel input",
|
||||
},
|
||||
.{
|
||||
.name = "input_multitouch",
|
||||
.path = "examples/core/input_multitouch.zig",
|
||||
.desc = "Multitouch input",
|
||||
},
|
||||
.{
|
||||
.name = "2d_camera",
|
||||
.path = "examples/core/2d_camera.zig",
|
||||
.desc = "Shows the functionality of a 2D camera",
|
||||
},
|
||||
.{
|
||||
.name = "2d_camera_platformer",
|
||||
.path = "examples/core/2d_camera_platformer.zig",
|
||||
.desc = "2D camera platformer",
|
||||
},
|
||||
.{
|
||||
.name = "3d_camera_first_person",
|
||||
.path = "examples/core/3d_camera_first_person.zig",
|
||||
.desc = "Simple first person demo",
|
||||
},
|
||||
.{
|
||||
.name = "3d_camera_free",
|
||||
.path = "examples/core/3d_camera_free.zig",
|
||||
.desc = "Shows basic 3d camera initialization",
|
||||
},
|
||||
.{
|
||||
.name = "2d_camera_mouse_zoom",
|
||||
.path = "examples/core/2d_camera_mouse_zoom.zig",
|
||||
.desc = "Shows mouse zoom demo",
|
||||
},
|
||||
.{
|
||||
.name = "3d_picking",
|
||||
.path = "examples/core/3d_picking.zig",
|
||||
.desc = "Shows picking in 3d mode",
|
||||
},
|
||||
.{
|
||||
.name = "drop_files",
|
||||
.path = "examples/core/drop_files.zig",
|
||||
.desc = "Demonstrates how to implement a drop files functionality",
|
||||
},
|
||||
.{
|
||||
.name = "window_flags",
|
||||
.path = "examples/core/window_flags.zig",
|
||||
.desc = "Demonstrates various flags used during and after window creation",
|
||||
},
|
||||
.{
|
||||
.name = "gui_message_box",
|
||||
.path = "examples/gui/message_box.zig",
|
||||
.desc = "Demonstrates showing and hiding a message box",
|
||||
},
|
||||
.{
|
||||
.name = "floating_window",
|
||||
.path = "examples/gui/floating_window.zig",
|
||||
.desc = "Demonstrates a floating window",
|
||||
},
|
||||
.{
|
||||
.name = "raymarching",
|
||||
.path = "examples/shaders/raymarching.zig",
|
||||
.desc = "Uses a raymarching in a shader to render shapes",
|
||||
},
|
||||
.{
|
||||
.name = "shaders_ascii_rendering",
|
||||
.path = "examples/shaders/shaders_ascii_rendering.zig",
|
||||
.desc = "Post-processing to render in ASCII",
|
||||
},
|
||||
.{
|
||||
.name = "shaders_basic_pbr",
|
||||
.path = "examples/shaders/shaders_basic_pbr.zig",
|
||||
.desc = "Demonstrates physically based rendering",
|
||||
},
|
||||
.{
|
||||
.name = "shaders_hybrid_render",
|
||||
.path = "examples/shaders/shaders_hybrid_render.zig",
|
||||
.desc = "Demonstrates hybrid rendering",
|
||||
},
|
||||
.{
|
||||
.name = "texture_outline",
|
||||
.path = "examples/shaders/texture_outline.zig",
|
||||
.desc = "Uses a shader to create an outline around a sprite",
|
||||
},
|
||||
.{
|
||||
.name = "logo_raylib",
|
||||
.path = "examples/shapes/logo_raylib.zig",
|
||||
.desc = "Renders the raylib-zig logo",
|
||||
},
|
||||
.{
|
||||
.name = "logo_raylib_anim",
|
||||
.path = "examples/shapes/logo_raylib_anim.zig",
|
||||
.desc = "Animates the raylib logo",
|
||||
},
|
||||
.{
|
||||
.name = "basic_shapes",
|
||||
.path = "examples/shapes/basic_shapes.zig",
|
||||
.desc = "Renders various shapes",
|
||||
},
|
||||
.{
|
||||
.name = "bouncing_ball",
|
||||
.path = "examples/shapes/bouncing_ball.zig",
|
||||
.desc = "Bouncing ball animation with collision detection",
|
||||
},
|
||||
.{
|
||||
.name = "collision_area",
|
||||
.path = "examples/shapes/collision_area.zig",
|
||||
.desc = "Demonstrates collision detection",
|
||||
},
|
||||
.{
|
||||
.name = "colors_palette",
|
||||
.path = "examples/shapes/colors_palette.zig",
|
||||
.desc = "Renders an interactive color palette",
|
||||
},
|
||||
.{
|
||||
.name = "draw_circle_sector",
|
||||
.path = "examples/shapes/draw_circle_sector.zig",
|
||||
.desc = "Dynamically renders a circle sector using raygui",
|
||||
},
|
||||
.{
|
||||
.name = "draw_rectangle_rounded",
|
||||
.path = "examples/shapes/draw_rectangle_rounded.zig",
|
||||
.desc = "Dynamically renders a rounded rectangle using raygui",
|
||||
},
|
||||
.{
|
||||
.name = "draw_ring",
|
||||
.path = "examples/shapes/draw_ring.zig",
|
||||
.desc = "Dynaically renders a ring using raygui",
|
||||
},
|
||||
.{
|
||||
.name = "easings_ball_anim",
|
||||
.path = "examples/shapes/easings_ball_anim.zig",
|
||||
.desc = "Renders a ball that demonstrates various easing functions",
|
||||
},
|
||||
.{
|
||||
.name = "easings_box_anim",
|
||||
.path = "examples/shapes/easings_box_anim.zig",
|
||||
.desc = "Renders a box that demonstrates various easing functions",
|
||||
},
|
||||
.{
|
||||
.name = "easings_rectangle_array",
|
||||
.path = "examples/shapes/easings_rectangle_array.zig",
|
||||
.desc = "Renders a box that demonstrates various easing functions",
|
||||
},
|
||||
.{
|
||||
.name = "following_eyes",
|
||||
.path = "examples/shapes/following_eyes.zig",
|
||||
.desc = "Renders eyes that follow mouse movement",
|
||||
},
|
||||
.{
|
||||
.name = "lines_bezier",
|
||||
.path = "examples/shapes/lines_bezier.zig",
|
||||
.desc = "Renders an interactive line bezier",
|
||||
},
|
||||
.{
|
||||
.name = "rectangle_scaling",
|
||||
.path = "examples/shapes/rectangle_scaling.zig",
|
||||
.desc = "Renders a resizable rectangle",
|
||||
},
|
||||
.{
|
||||
.name = "splines_drawing",
|
||||
.path = "examples/shapes/splines_drawing.zig",
|
||||
.desc = "Renders a spline",
|
||||
},
|
||||
.{
|
||||
.name = "top_down_lights",
|
||||
.path = "examples/shapes/top_down_lights.zig",
|
||||
.desc = "Renders a sceen with shadows and a top down persepective",
|
||||
},
|
||||
.{
|
||||
.name = "sprite_anim",
|
||||
.path = "examples/textures/sprite_anim.zig",
|
||||
.desc = "Animate a sprite",
|
||||
},
|
||||
.{
|
||||
.name = "textures_background_scrolling",
|
||||
.path = "examples/textures/textures_background_scrolling.zig",
|
||||
.desc = "Background scrolling & parallax demo",
|
||||
},
|
||||
.{
|
||||
.name = "codepoints_loading",
|
||||
.path = "examples/text/codepoints_loading.zig",
|
||||
.desc = "Renders UTF-8 text",
|
||||
},
|
||||
.{
|
||||
.name = "draw_3d",
|
||||
.path = "examples/text/draw_3d.zig",
|
||||
.desc = "Renders an example of text rendered in a 3d world",
|
||||
},
|
||||
.{
|
||||
.name = "font_filters",
|
||||
.path = "examples/text/font_filters.zig",
|
||||
.desc = "Demonstrates the various font filters",
|
||||
},
|
||||
.{
|
||||
.name = "font_loading",
|
||||
.path = "examples/text/font_loading.zig",
|
||||
.desc = "Demonstrates how to load fonts",
|
||||
},
|
||||
.{
|
||||
.name = "font_sdf",
|
||||
.path = "examples/text/font_sdf.zig",
|
||||
.desc = "Demonstrates rending a sdf font",
|
||||
},
|
||||
.{
|
||||
.name = "font_spritefont",
|
||||
.path = "examples/text/font_spritefont.zig",
|
||||
.desc = "Demonstrates rendering spritefonts",
|
||||
},
|
||||
.{
|
||||
.name = "format_text",
|
||||
.path = "examples/text/format_text.zig",
|
||||
.desc = "Renders variables as text",
|
||||
},
|
||||
.{
|
||||
.name = "input_box",
|
||||
.path = "examples/text/input_box.zig",
|
||||
.desc = "Show and example of an input_box",
|
||||
},
|
||||
.{
|
||||
.name = "raylib_fonts",
|
||||
.path = "examples/text/raylib_fonts.zig",
|
||||
.desc = "Show fonts included with raylib",
|
||||
},
|
||||
.{
|
||||
.name = "rectangle_bounds",
|
||||
.path = "examples/text/rectangle_bounds.zig",
|
||||
.desc = "demonstrate a flexible, resizeable, text box",
|
||||
},
|
||||
.{
|
||||
.name = "unicode",
|
||||
.path = "examples/text/unicode.zig",
|
||||
.desc = "demonstrate rendering of unicode",
|
||||
},
|
||||
.{
|
||||
.name = "writing_anim",
|
||||
.path = "examples/text/writing_anim.zig",
|
||||
.desc = "Simple text animation",
|
||||
},
|
||||
.{
|
||||
.name = "textures_image_loading",
|
||||
.path = "examples/textures/textures_image_loading.zig",
|
||||
.desc = "Image loading and texture creation",
|
||||
},
|
||||
.{
|
||||
.name = "models_heightmap",
|
||||
.path = "examples/models/models_heightmap.zig",
|
||||
.desc = "Heightmap loading and drawing",
|
||||
},
|
||||
.{
|
||||
.name = "models_bone_socket",
|
||||
.path = "examples/models/models_bone_socket.zig",
|
||||
.desc = "Bone socket",
|
||||
},
|
||||
.{
|
||||
.name = "models_box_collisions",
|
||||
.path = "examples/models/models_box_collisions.zig",
|
||||
.desc = "Box collisions",
|
||||
},
|
||||
.{
|
||||
.name = "models_rlgl_solar_system",
|
||||
.path = "examples/models/models_rlgl_solar_system.zig",
|
||||
.desc = "Solar System",
|
||||
},
|
||||
// .{
|
||||
// .name = "shaders_basic_lighting",
|
||||
// .path = "examples/shaders/shaders_basic_lighting.zig",
|
||||
// .desc = "Loads a model and renders it",
|
||||
// },
|
||||
};
|
||||
|
||||
const raylib_test = b.addTest(.{
|
||||
.root_module = raylib,
|
||||
});
|
||||
raylib_test.root_module.link_libc = true;
|
||||
|
||||
const raygui_test = b.addTest(.{
|
||||
.root_module = raygui,
|
||||
});
|
||||
raygui_test.root_module.addImport("raylib-zig", raylib);
|
||||
raygui_test.root_module.link_libc = true;
|
||||
|
||||
const test_step = b.step("test", "Check for library compilation errors");
|
||||
test_step.dependOn(&raylib_test.step);
|
||||
test_step.dependOn(&raygui_test.step);
|
||||
|
||||
const examples_step = b.step("examples", "Builds all the examples");
|
||||
|
||||
for (examples) |ex| {
|
||||
const mod = b.createModule(.{
|
||||
.root_source_file = b.path(ex.path),
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
|
||||
if (target.query.os_tag == .emscripten) {
|
||||
const wasm = b.addLibrary(.{
|
||||
.name = ex.name,
|
||||
.root_module = mod,
|
||||
});
|
||||
wasm.root_module.addImport("raylib", raylib);
|
||||
wasm.root_module.addImport("raygui", raygui);
|
||||
|
||||
const install_dir: std.Build.InstallDir = .{ .custom = "web" };
|
||||
const emcc_flags = emsdk.emccDefaultFlags(b.allocator, .{
|
||||
.optimize = optimize,
|
||||
.asyncify = !std.mem.endsWith(u8, ex.name, "web"),
|
||||
});
|
||||
const emcc_settings = emsdk.emccDefaultSettings(b.allocator, .{
|
||||
.optimize = optimize,
|
||||
});
|
||||
|
||||
const emcc_step = emsdk.emccStep(b, raylib_artifact, wasm, .{
|
||||
.optimize = optimize,
|
||||
.flags = emcc_flags,
|
||||
.settings = emcc_settings,
|
||||
.shell_file_path = emsdk.shell(raylib_dep),
|
||||
.install_dir = install_dir,
|
||||
.embed_paths = &.{.{ .src_path = "resources/" }},
|
||||
});
|
||||
|
||||
const html_filename = try std.fmt.allocPrint(b.allocator, "{s}.html", .{wasm.name});
|
||||
const emrun_step = emsdk.emrunStep(
|
||||
b,
|
||||
b.getInstallPath(install_dir, html_filename),
|
||||
&.{},
|
||||
);
|
||||
emrun_step.dependOn(emcc_step);
|
||||
|
||||
const run_option = b.step(ex.name, ex.desc);
|
||||
run_option.dependOn(emrun_step);
|
||||
examples_step.dependOn(emcc_step);
|
||||
} else {
|
||||
const exe = b.addExecutable(.{
|
||||
.name = ex.name,
|
||||
.root_module = mod,
|
||||
});
|
||||
exe.root_module.addImport("raylib", raylib);
|
||||
exe.root_module.addImport("raygui", raygui);
|
||||
|
||||
const run_cmd = b.addRunArtifact(exe);
|
||||
const run_step = b.step(ex.name, ex.desc);
|
||||
|
||||
run_step.dependOn(&run_cmd.step);
|
||||
examples_step.dependOn(&exe.step);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
.{
|
||||
.name = .raylib_zig,
|
||||
.version = "6.0.0",
|
||||
.fingerprint = 0xc4cfa8c610114f28,
|
||||
.dependencies = .{
|
||||
.raylib = .{
|
||||
.url = "git+https://github.com/raysan5/raylib#6.0",
|
||||
.hash = "raylib-6.0.0-whq8uCSwLgWWeF3ec3dbG6Rr36SLFL-s2WJ1Q_2E22Bb",
|
||||
},
|
||||
.raygui = .{
|
||||
.url = "git+https://github.com/raysan5/raygui#3b2855842ab578a034f827c38cf8f62c042fc983",
|
||||
.hash = "N-V-__8AAHvybwBw1kyBGn0BW_s1RqIpycNjLf_XbE-fpLUF",
|
||||
},
|
||||
.emsdk = .{
|
||||
.url = "git+https://github.com/emscripten-core/emsdk#4.0.9",
|
||||
.hash = "N-V-__8AAJl1DwBezhYo_VE6f53mPVm00R-Fk28NPW7P14EQ",
|
||||
},
|
||||
.zemscripten = .{
|
||||
.url = "git+https://github.com/zig-gamedev/zemscripten#70bdafc473be2131445bb6fd977fe7cb92fd0f5f",
|
||||
.hash = "zemscripten-0.2.0-dev-sRlDqEtQAAB_1tPdqJsxQIqXxvvklcFu6VN5p6ANy8hw",
|
||||
},
|
||||
},
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.paths = .{
|
||||
"build.zig",
|
||||
"build.zig.zon",
|
||||
"emcc.zig",
|
||||
"lib/raylib.zig",
|
||||
"lib/raylib-ext.zig",
|
||||
"lib/raymath.zig",
|
||||
"lib/raymath-ext.zig",
|
||||
"lib/rlgl.zig",
|
||||
"lib/rlgl-ext.zig",
|
||||
"lib/raygui.zig",
|
||||
"lib/raygui-ext.zig",
|
||||
},
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
// raylib-zig (c) Nikolas Wipper 2024
|
||||
|
||||
const rl = @import("raylib-zig");
|
||||
const rgui = @import("raygui.zig");
|
||||
|
||||
pub extern "c" fn GuiEnable() void;
|
||||
pub extern "c" fn GuiDisable() void;
|
||||
pub extern "c" fn GuiLock() void;
|
||||
pub extern "c" fn GuiUnlock() void;
|
||||
pub extern "c" fn GuiIsLocked() bool;
|
||||
pub extern "c" fn GuiSetAlpha(alpha: f32) void;
|
||||
pub extern "c" fn GuiSetState(state: c_int) void;
|
||||
pub extern "c" fn GuiGetState() c_int;
|
||||
pub extern "c" fn GuiSetFont(font: rl.Font) void;
|
||||
pub extern "c" fn GuiGetFont() rl.Font;
|
||||
pub extern "c" fn GuiSetStyle(control: rgui.Control, property: c_int, value: c_int) void;
|
||||
pub extern "c" fn GuiGetStyle(control: rgui.Control, property: c_int) c_int;
|
||||
pub extern "c" fn GuiLoadStyle(fileName: [*c]const u8) void;
|
||||
pub extern "c" fn GuiLoadStyleDefault() void;
|
||||
pub extern "c" fn GuiEnableTooltip() void;
|
||||
pub extern "c" fn GuiDisableTooltip() void;
|
||||
pub extern "c" fn GuiSetTooltip(tooltip: [*c]const u8) void;
|
||||
pub extern "c" fn GuiIconText(iconId: c_int, text: [*c]const u8) [*c]const u8;
|
||||
pub extern "c" fn GuiSetIconScale(scale: c_int) void;
|
||||
pub extern "c" fn GuiGetIcons() [*c]c_uint;
|
||||
pub extern "c" fn GuiLoadIcons(fileName: [*c]const u8, loadIconsName: bool) [*c][*c]u8;
|
||||
pub extern "c" fn GuiDrawIcon(iconId: c_int, posX: c_int, posY: c_int, pixelSize: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn GuiGetTextWidth(text: [*c]const u8) c_int;
|
||||
pub extern "c" fn GuiWindowBox(bounds: rl.Rectangle, title: [*c]const u8) c_int;
|
||||
pub extern "c" fn GuiGroupBox(bounds: rl.Rectangle, text: [*c]const u8) c_int;
|
||||
pub extern "c" fn GuiLine(bounds: rl.Rectangle, text: [*c]const u8) c_int;
|
||||
pub extern "c" fn GuiPanel(bounds: rl.Rectangle, text: [*c]const u8) c_int;
|
||||
pub extern "c" fn GuiTabBar(bounds: rl.Rectangle, text: [*c][*c]u8, count: c_int, active: [*c]c_int) c_int;
|
||||
pub extern "c" fn GuiScrollPanel(bounds: rl.Rectangle, text: [*c]const u8, content: rl.Rectangle, scroll: [*c]rl.Vector2, view: [*c]rl.Rectangle) c_int;
|
||||
pub extern "c" fn GuiLabel(bounds: rl.Rectangle, text: [*c]const u8) c_int;
|
||||
pub extern "c" fn GuiButton(bounds: rl.Rectangle, text: [*c]const u8) c_int;
|
||||
pub extern "c" fn GuiLabelButton(bounds: rl.Rectangle, text: [*c]const u8) c_int;
|
||||
pub extern "c" fn GuiToggle(bounds: rl.Rectangle, text: [*c]const u8, active: [*c]bool) c_int;
|
||||
pub extern "c" fn GuiToggleGroup(bounds: rl.Rectangle, text: [*c]const u8, active: [*c]c_int) c_int;
|
||||
pub extern "c" fn GuiToggleSlider(bounds: rl.Rectangle, text: [*c]const u8, active: [*c]c_int) c_int;
|
||||
pub extern "c" fn GuiCheckBox(bounds: rl.Rectangle, text: [*c]const u8, checked: [*c]bool) c_int;
|
||||
pub extern "c" fn GuiComboBox(bounds: rl.Rectangle, text: [*c]const u8, active: [*c]c_int) c_int;
|
||||
pub extern "c" fn GuiDropdownBox(bounds: rl.Rectangle, text: [*c]const u8, active: [*c]c_int, editMode: bool) c_int;
|
||||
pub extern "c" fn GuiSpinner(bounds: rl.Rectangle, text: [*c]const u8, value: [*c]c_int, minValue: c_int, maxValue: c_int, editMode: bool) c_int;
|
||||
pub extern "c" fn GuiValueBox(bounds: rl.Rectangle, text: [*c]const u8, value: [*c]c_int, minValue: c_int, maxValue: c_int, editMode: bool) c_int;
|
||||
pub extern "c" fn GuiValueBoxFloat(bounds: rl.Rectangle, text: [*c]const u8, textValue: [*c]u8, value: [*c]f32, editMode: bool) c_int;
|
||||
pub extern "c" fn GuiTextBox(bounds: rl.Rectangle, text: [*c]u8, textSize: c_int, editMode: bool) c_int;
|
||||
pub extern "c" fn GuiSlider(bounds: rl.Rectangle, textLeft: [*c]const u8, textRight: [*c]const u8, value: [*c]f32, minValue: f32, maxValue: f32) c_int;
|
||||
pub extern "c" fn GuiSliderBar(bounds: rl.Rectangle, textLeft: [*c]const u8, textRight: [*c]const u8, value: [*c]f32, minValue: f32, maxValue: f32) c_int;
|
||||
pub extern "c" fn GuiProgressBar(bounds: rl.Rectangle, textLeft: [*c]const u8, textRight: [*c]const u8, value: [*c]f32, minValue: f32, maxValue: f32) c_int;
|
||||
pub extern "c" fn GuiStatusBar(bounds: rl.Rectangle, text: [*c]const u8) c_int;
|
||||
pub extern "c" fn GuiDummyRec(bounds: rl.Rectangle, text: [*c]const u8) c_int;
|
||||
pub extern "c" fn GuiGrid(bounds: rl.Rectangle, text: [*c]const u8, spacing: f32, subdivs: c_int, mouseCell: [*c]rl.Vector2) c_int;
|
||||
pub extern "c" fn GuiListView(bounds: rl.Rectangle, text: [*c]const u8, scrollIndex: [*c]c_int, active: [*c]c_int) c_int;
|
||||
pub extern "c" fn GuiListViewEx(bounds: rl.Rectangle, text: [*c][*c]u8, count: c_int, scrollIndex: [*c]c_int, active: [*c]c_int, focus: [*c]c_int) c_int;
|
||||
pub extern "c" fn GuiMessageBox(bounds: rl.Rectangle, title: [*c]const u8, message: [*c]const u8, buttons: [*c]const u8) c_int;
|
||||
pub extern "c" fn GuiTextInputBox(bounds: rl.Rectangle, title: [*c]const u8, message: [*c]const u8, buttons: [*c]const u8, text: [*c]u8, textMaxSize: c_int, secretViewActive: [*c]bool) c_int;
|
||||
pub extern "c" fn GuiColorPicker(bounds: rl.Rectangle, text: [*c]const u8, color: [*c]rl.Color) c_int;
|
||||
pub extern "c" fn GuiColorPanel(bounds: rl.Rectangle, text: [*c]const u8, color: [*c]rl.Color) c_int;
|
||||
pub extern "c" fn GuiColorBarAlpha(bounds: rl.Rectangle, text: [*c]const u8, alpha: [*c]f32) c_int;
|
||||
pub extern "c" fn GuiColorBarHue(bounds: rl.Rectangle, text: [*c]const u8, value: [*c]f32) c_int;
|
||||
pub extern "c" fn GuiColorPickerHSV(bounds: rl.Rectangle, text: [*c]const u8, colorHsv: [*c]rl.Vector3) c_int;
|
||||
pub extern "c" fn GuiColorPanelHSV(bounds: rl.Rectangle, text: [*c]const u8, colorHsv: [*c]rl.Vector3) c_int;
|
||||
@ -0,0 +1,754 @@
|
||||
const rl = @import("raylib-zig");
|
||||
const std = @import("std");
|
||||
|
||||
pub const cdef = @import("raygui-ext.zig");
|
||||
|
||||
test {
|
||||
std.testing.refAllDecls(@This());
|
||||
std.testing.refAllDecls(cdef);
|
||||
std.testing.refAllDecls(rl);
|
||||
}
|
||||
|
||||
pub const RayguiError = error{GetIcons};
|
||||
|
||||
const Vector2 = rl.Vector2;
|
||||
const Vector3 = rl.Vector3;
|
||||
const Color = rl.Color;
|
||||
const Rectangle = rl.Rectangle;
|
||||
const Font = rl.Font;
|
||||
|
||||
pub const StyleProp = extern struct {
|
||||
controlId: c_ushort,
|
||||
propertyId: c_ushort,
|
||||
propertyValue: c_int,
|
||||
};
|
||||
|
||||
pub const State = enum(c_int) {
|
||||
normal = 0,
|
||||
focused,
|
||||
pressed,
|
||||
disabled,
|
||||
};
|
||||
|
||||
pub const TextAlignment = enum(c_int) {
|
||||
left = 0,
|
||||
center,
|
||||
right,
|
||||
};
|
||||
|
||||
pub const TextAlignmentVertical = enum(c_int) {
|
||||
top = 0,
|
||||
middle,
|
||||
bottom,
|
||||
};
|
||||
|
||||
pub const TextWrapMode = enum(c_int) {
|
||||
none = 0,
|
||||
char,
|
||||
word,
|
||||
};
|
||||
|
||||
pub const Control = enum(c_int) {
|
||||
default = 0,
|
||||
label,
|
||||
button,
|
||||
toggle,
|
||||
slider,
|
||||
progressbar,
|
||||
checkbox,
|
||||
combobox,
|
||||
dropdownbox,
|
||||
textbox,
|
||||
valuebox,
|
||||
control11,
|
||||
listview,
|
||||
colorpicker,
|
||||
scrollbar,
|
||||
statusbar,
|
||||
};
|
||||
|
||||
pub const ControlProperty = enum(c_int) {
|
||||
border_color_normal = 0,
|
||||
base_color_normal,
|
||||
text_color_normal,
|
||||
border_color_focused,
|
||||
base_color_focused,
|
||||
text_color_focused,
|
||||
border_color_pressed,
|
||||
base_color_pressed,
|
||||
text_color_pressed,
|
||||
border_color_disabled,
|
||||
base_color_disabled,
|
||||
text_color_disabled,
|
||||
border_width,
|
||||
text_padding,
|
||||
text_alignment,
|
||||
};
|
||||
|
||||
pub const DefaultProperty = enum(c_int) {
|
||||
text_size = 16,
|
||||
text_spacing,
|
||||
line_color,
|
||||
background_color,
|
||||
text_line_spacing,
|
||||
text_alignment_vertical,
|
||||
text_wrap_mode,
|
||||
};
|
||||
|
||||
pub const Property = union(enum) {
|
||||
control: ControlProperty,
|
||||
default: DefaultProperty,
|
||||
toggle: ToggleProperty,
|
||||
slider: SliderProperty,
|
||||
progressBar: ProgressBarProperty,
|
||||
scrollBar: ScrollBarProperty,
|
||||
checkBox: CheckBoxProperty,
|
||||
comboBox: ComboBoxProperty,
|
||||
dropdownBox: DropdownBoxProperty,
|
||||
textBox: TextBoxProperty,
|
||||
valueBox: ValueBoxProperty,
|
||||
listView: ListViewProperty,
|
||||
colorPicker: ColorPickerProperty,
|
||||
};
|
||||
|
||||
pub const ToggleProperty = enum(c_int) {
|
||||
group_padding = 16,
|
||||
};
|
||||
|
||||
pub const SliderProperty = enum(c_int) {
|
||||
slider_width = 16,
|
||||
slider_padding,
|
||||
};
|
||||
|
||||
pub const ProgressBarProperty = enum(c_int) {
|
||||
progress_padding = 16,
|
||||
progress_side,
|
||||
};
|
||||
|
||||
pub const ScrollBarProperty = enum(c_int) {
|
||||
arrows_size = 16,
|
||||
arrows_visible,
|
||||
scroll_slider_padding,
|
||||
scroll_slider_size,
|
||||
scroll_padding,
|
||||
scroll_speed,
|
||||
};
|
||||
|
||||
pub const CheckBoxProperty = enum(c_int) {
|
||||
check_padding = 16,
|
||||
};
|
||||
|
||||
pub const ComboBoxProperty = enum(c_int) {
|
||||
combo_button_width = 16,
|
||||
combo_button_spacing,
|
||||
};
|
||||
|
||||
pub const DropdownBoxProperty = enum(c_int) {
|
||||
arrow_padding = 16,
|
||||
dropdown_items_spacing,
|
||||
dropdown_arrow_hidden,
|
||||
dropdown_roll_up,
|
||||
};
|
||||
|
||||
pub const TextBoxProperty = enum(c_int) {
|
||||
text_readonly = 16,
|
||||
};
|
||||
|
||||
pub const ValueBoxProperty = enum(c_int) {
|
||||
spin_button_width = 16,
|
||||
spin_button_spacing,
|
||||
};
|
||||
|
||||
pub const ListViewProperty = enum(c_int) {
|
||||
list_items_height = 16,
|
||||
list_items_spacing,
|
||||
scrollbar_width,
|
||||
scrollbar_side,
|
||||
list_items_border_normal,
|
||||
list_items_border_width,
|
||||
};
|
||||
|
||||
pub const ColorPickerProperty = enum(c_int) {
|
||||
color_selector_size = 16,
|
||||
huebar_width,
|
||||
huebar_padding,
|
||||
huebar_selector_height,
|
||||
huebar_selector_overflow,
|
||||
};
|
||||
|
||||
pub const scrollbar_left_side: c_int = 0;
|
||||
pub const scrollbar_right_side: c_int = 1;
|
||||
|
||||
pub const IconName = enum(c_int) {
|
||||
none = 0,
|
||||
folder_file_open = 1,
|
||||
file_save_classic = 2,
|
||||
folder_open = 3,
|
||||
folder_save = 4,
|
||||
file_open = 5,
|
||||
file_save = 6,
|
||||
file_export = 7,
|
||||
file_add = 8,
|
||||
file_delete = 9,
|
||||
filetype_text = 10,
|
||||
filetype_audio = 11,
|
||||
filetype_image = 12,
|
||||
filetype_play = 13,
|
||||
filetype_video = 14,
|
||||
filetype_info = 15,
|
||||
file_copy = 16,
|
||||
file_cut = 17,
|
||||
file_paste = 18,
|
||||
cursor_hand = 19,
|
||||
cursor_pointer = 20,
|
||||
cursor_classic = 21,
|
||||
pencil = 22,
|
||||
pencil_big = 23,
|
||||
brush_classic = 24,
|
||||
brush_painter = 25,
|
||||
water_drop = 26,
|
||||
color_picker = 27,
|
||||
rubber = 28,
|
||||
color_bucket = 29,
|
||||
text_t = 30,
|
||||
text_a = 31,
|
||||
scale = 32,
|
||||
resize = 33,
|
||||
filter_point = 34,
|
||||
filter_bilinear = 35,
|
||||
crop = 36,
|
||||
crop_alpha = 37,
|
||||
square_toggle = 38,
|
||||
symmetry = 39,
|
||||
symmetry_horizontal = 40,
|
||||
symmetry_vertical = 41,
|
||||
lens = 42,
|
||||
lens_big = 43,
|
||||
eye_on = 44,
|
||||
eye_off = 45,
|
||||
filter_top = 46,
|
||||
filter = 47,
|
||||
target_point = 48,
|
||||
target_small = 49,
|
||||
target_big = 50,
|
||||
target_move = 51,
|
||||
cursor_move = 52,
|
||||
cursor_scale = 53,
|
||||
cursor_scale_right = 54,
|
||||
cursor_scale_left = 55,
|
||||
undo = 56,
|
||||
redo = 57,
|
||||
reredo = 58,
|
||||
mutate = 59,
|
||||
rotate = 60,
|
||||
repeat = 61,
|
||||
shuffle = 62,
|
||||
emptybox = 63,
|
||||
target = 64,
|
||||
target_small_fill = 65,
|
||||
target_big_fill = 66,
|
||||
target_move_fill = 67,
|
||||
cursor_move_fill = 68,
|
||||
cursor_scale_fill = 69,
|
||||
cursor_scale_right_fill = 70,
|
||||
cursor_scale_left_fill = 71,
|
||||
undo_fill = 72,
|
||||
redo_fill = 73,
|
||||
reredo_fill = 74,
|
||||
mutate_fill = 75,
|
||||
rotate_fill = 76,
|
||||
repeat_fill = 77,
|
||||
shuffle_fill = 78,
|
||||
emptybox_small = 79,
|
||||
box = 80,
|
||||
box_top = 81,
|
||||
box_top_right = 82,
|
||||
box_right = 83,
|
||||
box_bottom_right = 84,
|
||||
box_bottom = 85,
|
||||
box_bottom_left = 86,
|
||||
box_left = 87,
|
||||
box_top_left = 88,
|
||||
box_center = 89,
|
||||
box_circle_mask = 90,
|
||||
pot = 91,
|
||||
alpha_multiply = 92,
|
||||
alpha_clear = 93,
|
||||
dithering = 94,
|
||||
mipmaps = 95,
|
||||
box_grid = 96,
|
||||
grid = 97,
|
||||
box_corners_small = 98,
|
||||
box_corners_big = 99,
|
||||
four_boxes = 100,
|
||||
grid_fill = 101,
|
||||
box_multisize = 102,
|
||||
zoom_small = 103,
|
||||
zoom_medium = 104,
|
||||
zoom_big = 105,
|
||||
zoom_all = 106,
|
||||
zoom_center = 107,
|
||||
box_dots_small = 108,
|
||||
box_dots_big = 109,
|
||||
box_concentric = 110,
|
||||
box_grid_big = 111,
|
||||
ok_tick = 112,
|
||||
cross = 113,
|
||||
arrow_left = 114,
|
||||
arrow_right = 115,
|
||||
arrow_down = 116,
|
||||
arrow_up = 117,
|
||||
arrow_left_fill = 118,
|
||||
arrow_right_fill = 119,
|
||||
arrow_down_fill = 120,
|
||||
arrow_up_fill = 121,
|
||||
audio = 122,
|
||||
fx = 123,
|
||||
wave = 124,
|
||||
wave_sinus = 125,
|
||||
wave_square = 126,
|
||||
wave_triangular = 127,
|
||||
cross_small = 128,
|
||||
player_previous = 129,
|
||||
player_play_back = 130,
|
||||
player_play = 131,
|
||||
player_pause = 132,
|
||||
player_stop = 133,
|
||||
player_next = 134,
|
||||
player_record = 135,
|
||||
magnet = 136,
|
||||
lock_close = 137,
|
||||
lock_open = 138,
|
||||
clock = 139,
|
||||
tools = 140,
|
||||
gear = 141,
|
||||
gear_big = 142,
|
||||
bin = 143,
|
||||
hand_pointer = 144,
|
||||
laser = 145,
|
||||
coin = 146,
|
||||
explosion = 147,
|
||||
@"1up" = 148,
|
||||
player = 149,
|
||||
player_jump = 150,
|
||||
key = 151,
|
||||
demon = 152,
|
||||
text_popup = 153,
|
||||
gear_ex = 154,
|
||||
crack = 155,
|
||||
crack_points = 156,
|
||||
star = 157,
|
||||
door = 158,
|
||||
exit = 159,
|
||||
mode_2d = 160,
|
||||
mode_3d = 161,
|
||||
cube = 162,
|
||||
cube_face_top = 163,
|
||||
cube_face_left = 164,
|
||||
cube_face_front = 165,
|
||||
cube_face_bottom = 166,
|
||||
cube_face_right = 167,
|
||||
cube_face_back = 168,
|
||||
camera = 169,
|
||||
special = 170,
|
||||
link_net = 171,
|
||||
link_boxes = 172,
|
||||
link_multi = 173,
|
||||
link = 174,
|
||||
link_broke = 175,
|
||||
text_notes = 176,
|
||||
notebook = 177,
|
||||
suitcase = 178,
|
||||
suitcase_zip = 179,
|
||||
mailbox = 180,
|
||||
monitor = 181,
|
||||
printer = 182,
|
||||
photo_camera = 183,
|
||||
photo_camera_flash = 184,
|
||||
house = 185,
|
||||
heart = 186,
|
||||
corner = 187,
|
||||
vertical_bars = 188,
|
||||
vertical_bars_fill = 189,
|
||||
life_bars = 190,
|
||||
info = 191,
|
||||
crossline = 192,
|
||||
help = 193,
|
||||
filetype_alpha = 194,
|
||||
filetype_home = 195,
|
||||
layers_visible = 196,
|
||||
layers = 197,
|
||||
window = 198,
|
||||
hidpi = 199,
|
||||
filetype_binary = 200,
|
||||
hex = 201,
|
||||
shield = 202,
|
||||
file_new = 203,
|
||||
folder_add = 204,
|
||||
alarm = 205,
|
||||
cpu = 206,
|
||||
rom = 207,
|
||||
step_over = 208,
|
||||
step_into = 209,
|
||||
step_out = 210,
|
||||
restart = 211,
|
||||
breakpoint_on = 212,
|
||||
breakpoint_off = 213,
|
||||
burger_menu = 214,
|
||||
case_sensitive = 215,
|
||||
reg_exp = 216,
|
||||
folder = 217,
|
||||
file = 218,
|
||||
sand_timer = 219,
|
||||
warning = 220,
|
||||
help_box = 221,
|
||||
info_box = 222,
|
||||
priority = 223,
|
||||
layers_iso = 224,
|
||||
layers2 = 225,
|
||||
mlayers = 226,
|
||||
maps = 227,
|
||||
hot = 228,
|
||||
label = 229,
|
||||
name_id = 230,
|
||||
slicing = 231,
|
||||
manual_control = 232,
|
||||
collision = 233,
|
||||
circle_add = 234,
|
||||
circle_add_fill = 235,
|
||||
circle_warning = 236,
|
||||
circle_warning_fill = 237,
|
||||
box_more = 238,
|
||||
box_more_fill = 239,
|
||||
box_minus = 240,
|
||||
box_minus_fill = 241,
|
||||
union_ = 242,
|
||||
intersection = 243,
|
||||
difference = 244,
|
||||
sphere = 245,
|
||||
cylinder = 246,
|
||||
cone = 247,
|
||||
ellipsoid = 248,
|
||||
capsule = 249,
|
||||
icon_250 = 250,
|
||||
icon_251 = 251,
|
||||
icon_252 = 252,
|
||||
icon_253 = 253,
|
||||
icon_254 = 254,
|
||||
icon_255 = 255,
|
||||
};
|
||||
|
||||
/// Set one style property
|
||||
pub fn setStyle(control: Control, comptime property: Property, value: i32) void {
|
||||
const property_int: c_int = switch (property) {
|
||||
inline else => |val| @intCast(@intFromEnum(val)),
|
||||
};
|
||||
|
||||
cdef.GuiSetStyle(control, property_int, @as(c_int, value));
|
||||
}
|
||||
|
||||
/// Get one style property
|
||||
pub fn getStyle(control: Control, comptime property: Property) i32 {
|
||||
const property_int: c_int = switch (property) {
|
||||
inline else => |val| @intCast(@intFromEnum(val)),
|
||||
};
|
||||
|
||||
return @as(i32, cdef.GuiGetStyle(control, property_int));
|
||||
}
|
||||
|
||||
/// Get raygui icons data pointer
|
||||
pub fn getIcons() RayguiError![]u32 {
|
||||
var res: []u32 = undefined;
|
||||
|
||||
const ptr = cdef.GuiGetIcons();
|
||||
if (ptr == 0) return RayguiError.GetIcons;
|
||||
|
||||
res.ptr = @as([*]u32, @ptrCast(ptr));
|
||||
res.len = @as(usize, @intCast(256 * 256)); // RAYGUI_ICON_MAX_ICONS * RAYGUI_ICON_MAX_ICONS
|
||||
return res;
|
||||
}
|
||||
|
||||
// If you REALLY need the return value of the function, you'll know what to do with it and its size yourself
|
||||
/// Load raygui icons file (.rgi) into internal icons data
|
||||
pub fn loadIcons(fileName: [*c]const u8, loadIconsName: bool) [*c][*c]u8 {
|
||||
return cdef.GuiLoadIcons(fileName, loadIconsName);
|
||||
}
|
||||
|
||||
/// Tab Bar control, returns TAB to be closed or -1
|
||||
pub fn tabBar(bounds: Rectangle, text: [][*:0]u8, active: *i32) i32 {
|
||||
return @as(i32, cdef.GuiTabBar(bounds, @as([*c][*c]u8, @ptrCast(text)), @as(c_int, @intCast(text.len)), @as([*c]c_int, @ptrCast(active))));
|
||||
}
|
||||
|
||||
/// List View with extended parameters
|
||||
pub fn listViewEx(bounds: Rectangle, text: [][*:0]u8, scrollIndex: *i32, active: *i32, focus: *i32) i32 {
|
||||
return @as(i32, cdef.GuiListViewEx(bounds, @as([*c][*c]u8, @ptrCast(text)), @as(c_int, @intCast(text.len)), @as([*c]c_int, @ptrCast(scrollIndex)), @as([*c]c_int, @ptrCast(active)), @as([*c]c_int, @ptrCast(focus))));
|
||||
}
|
||||
|
||||
/// Panel control, useful to group controls
|
||||
pub fn panel(bounds: Rectangle, text: ?[*:0]const u8) i32 {
|
||||
var textFinal = @as([*c]const u8, 0);
|
||||
if (text) |textSure| {
|
||||
textFinal = @as([*c]const u8, @ptrCast(textSure));
|
||||
}
|
||||
return @as(i32, cdef.GuiPanel(bounds, textFinal));
|
||||
}
|
||||
|
||||
/// Scroll Panel control
|
||||
pub fn scrollPanel(bounds: Rectangle, text: ?[*:0]const u8, content: Rectangle, scroll: *Vector2, view: *Rectangle) i32 {
|
||||
var textFinal = @as([*c]const u8, 0);
|
||||
if (text) |textSure| {
|
||||
textFinal = @as([*c]const u8, @ptrCast(textSure));
|
||||
}
|
||||
return @as(i32, cdef.GuiScrollPanel(bounds, textFinal, content, @as([*c]Vector2, @ptrCast(scroll)), @as([*c]Rectangle, @ptrCast(view))));
|
||||
}
|
||||
|
||||
/// Button control, returns true when clicked
|
||||
pub fn button(bounds: Rectangle, text: [:0]const u8) bool {
|
||||
return @as(i32, cdef.GuiButton(bounds, @as([*c]const u8, @ptrCast(text)))) > 0;
|
||||
}
|
||||
|
||||
/// Label button control, returns true when clicked
|
||||
pub fn labelButton(bounds: Rectangle, text: [:0]const u8) bool {
|
||||
return @as(i32, cdef.GuiLabelButton(bounds, @as([*c]const u8, @ptrCast(text)))) > 0;
|
||||
}
|
||||
|
||||
/// Check Box control, returns true when active
|
||||
pub fn checkBox(bounds: Rectangle, text: [:0]const u8, checked: *bool) bool {
|
||||
return @as(i32, cdef.GuiCheckBox(bounds, @as([*c]const u8, @ptrCast(text)), @as([*c]bool, @ptrCast(checked)))) > 0;
|
||||
}
|
||||
|
||||
/// Text Box control, updates input text
|
||||
/// Returns true on ENTER pressed (useful for data validation)
|
||||
pub fn textBox(bounds: Rectangle, text: [:0]u8, editMode: bool) bool {
|
||||
return @as(i32, cdef.GuiTextBox(bounds, @as([*c]u8, @ptrCast(text)), @as(c_int, @intCast(text.len)) + 1, editMode)) > 0;
|
||||
}
|
||||
|
||||
/// Enable gui controls (global state)
|
||||
pub fn enable() void {
|
||||
cdef.GuiEnable();
|
||||
}
|
||||
|
||||
/// Disable gui controls (global state)
|
||||
pub fn disable() void {
|
||||
cdef.GuiDisable();
|
||||
}
|
||||
|
||||
/// Lock gui controls (global state)
|
||||
pub fn lock() void {
|
||||
cdef.GuiLock();
|
||||
}
|
||||
|
||||
/// Unlock gui controls (global state)
|
||||
pub fn unlock() void {
|
||||
cdef.GuiUnlock();
|
||||
}
|
||||
|
||||
/// Check if gui is locked (global state)
|
||||
pub fn isLocked() bool {
|
||||
return cdef.GuiIsLocked();
|
||||
}
|
||||
|
||||
/// Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f
|
||||
pub fn setAlpha(alpha: f32) void {
|
||||
cdef.GuiSetAlpha(alpha);
|
||||
}
|
||||
|
||||
/// Set gui state (global state)
|
||||
pub fn setState(state: i32) void {
|
||||
cdef.GuiSetState(@as(c_int, state));
|
||||
}
|
||||
|
||||
/// Get gui state (global state)
|
||||
pub fn getState() i32 {
|
||||
return @as(i32, cdef.GuiGetState());
|
||||
}
|
||||
|
||||
/// Set gui custom font (global state)
|
||||
pub fn setFont(font: Font) void {
|
||||
cdef.GuiSetFont(font);
|
||||
}
|
||||
|
||||
/// Get gui custom font (global state)
|
||||
pub fn getFont() Font {
|
||||
return cdef.GuiGetFont();
|
||||
}
|
||||
|
||||
/// Load style file over global style variable (.rgs)
|
||||
pub fn loadStyle(fileName: [:0]const u8) void {
|
||||
cdef.GuiLoadStyle(@as([*c]const u8, @ptrCast(fileName)));
|
||||
}
|
||||
|
||||
/// Load style default over global style
|
||||
pub fn loadStyleDefault() void {
|
||||
cdef.GuiLoadStyleDefault();
|
||||
}
|
||||
|
||||
/// Enable gui tooltips (global state)
|
||||
pub fn enableTooltip() void {
|
||||
cdef.GuiEnableTooltip();
|
||||
}
|
||||
|
||||
/// Disable gui tooltips (global state)
|
||||
pub fn disableTooltip() void {
|
||||
cdef.GuiDisableTooltip();
|
||||
}
|
||||
|
||||
/// Set tooltip string
|
||||
pub fn setTooltip(tooltip: [:0]const u8) void {
|
||||
cdef.GuiSetTooltip(@as([*c]const u8, @ptrCast(tooltip)));
|
||||
}
|
||||
|
||||
/// Get text with icon id prepended (if supported)
|
||||
pub fn iconText(iconId: i32, text: [:0]const u8) [:0]const u8 {
|
||||
return std.mem.span(cdef.GuiIconText(@as(c_int, iconId), @as([*c]const u8, @ptrCast(text))));
|
||||
}
|
||||
|
||||
/// Set default icon drawing size
|
||||
pub fn setIconScale(scale: i32) void {
|
||||
cdef.GuiSetIconScale(@as(c_int, scale));
|
||||
}
|
||||
|
||||
/// Draw icon using pixel size at specified position
|
||||
pub fn drawIcon(iconId: i32, posX: i32, posY: i32, pixelSize: i32, color: Color) void {
|
||||
cdef.GuiDrawIcon(@as(c_int, iconId), @as(c_int, posX), @as(c_int, posY), @as(c_int, pixelSize), color);
|
||||
}
|
||||
|
||||
/// Get text width considering gui style and icon size (if required)
|
||||
pub fn getTextWidth(text: [:0]const u8) i32 {
|
||||
return @as(i32, cdef.GuiGetTextWidth(@as([*c]const u8, @ptrCast(text))));
|
||||
}
|
||||
|
||||
/// Window Box control, shows a window that can be closed
|
||||
pub fn windowBox(bounds: Rectangle, title: [:0]const u8) i32 {
|
||||
return @as(i32, cdef.GuiWindowBox(bounds, @as([*c]const u8, @ptrCast(title))));
|
||||
}
|
||||
|
||||
/// Group Box control with text name
|
||||
pub fn groupBox(bounds: Rectangle, text: [:0]const u8) i32 {
|
||||
return @as(i32, cdef.GuiGroupBox(bounds, @as([*c]const u8, @ptrCast(text))));
|
||||
}
|
||||
|
||||
/// Line separator control, could contain text
|
||||
pub fn line(bounds: Rectangle, text: [:0]const u8) i32 {
|
||||
return @as(i32, cdef.GuiLine(bounds, @as([*c]const u8, @ptrCast(text))));
|
||||
}
|
||||
|
||||
/// Label control
|
||||
pub fn label(bounds: Rectangle, text: [:0]const u8) i32 {
|
||||
return @as(i32, cdef.GuiLabel(bounds, @as([*c]const u8, @ptrCast(text))));
|
||||
}
|
||||
|
||||
/// Toggle Button control
|
||||
pub fn toggle(bounds: Rectangle, text: [:0]const u8, active: *bool) i32 {
|
||||
return @as(i32, cdef.GuiToggle(bounds, @as([*c]const u8, @ptrCast(text)), @as([*c]bool, @ptrCast(active))));
|
||||
}
|
||||
|
||||
/// Toggle Group control
|
||||
pub fn toggleGroup(bounds: Rectangle, text: [:0]const u8, active: *i32) i32 {
|
||||
return @as(i32, cdef.GuiToggleGroup(bounds, @as([*c]const u8, @ptrCast(text)), @as([*c]c_int, @ptrCast(active))));
|
||||
}
|
||||
|
||||
/// Toggle Slider control
|
||||
pub fn toggleSlider(bounds: Rectangle, text: [:0]const u8, active: *i32) i32 {
|
||||
return @as(i32, cdef.GuiToggleSlider(bounds, @as([*c]const u8, @ptrCast(text)), @as([*c]c_int, @ptrCast(active))));
|
||||
}
|
||||
|
||||
/// Combo Box control
|
||||
pub fn comboBox(bounds: Rectangle, text: [:0]const u8, active: *i32) i32 {
|
||||
return @as(i32, cdef.GuiComboBox(bounds, @as([*c]const u8, @ptrCast(text)), @as([*c]c_int, @ptrCast(active))));
|
||||
}
|
||||
|
||||
/// Dropdown Box control
|
||||
pub fn dropdownBox(bounds: Rectangle, text: [:0]const u8, active: *i32, editMode: bool) i32 {
|
||||
return @as(i32, cdef.GuiDropdownBox(bounds, @as([*c]const u8, @ptrCast(text)), @as([*c]c_int, @ptrCast(active)), editMode));
|
||||
}
|
||||
|
||||
/// Spinner control
|
||||
pub fn spinner(bounds: Rectangle, text: [:0]const u8, value: *i32, minValue: i32, maxValue: i32, editMode: bool) i32 {
|
||||
return @as(i32, cdef.GuiSpinner(bounds, @as([*c]const u8, @ptrCast(text)), @as([*c]c_int, @ptrCast(value)), @as(c_int, minValue), @as(c_int, maxValue), editMode));
|
||||
}
|
||||
|
||||
/// Value Box control, updates input text with numbers
|
||||
pub fn valueBox(bounds: Rectangle, text: [:0]const u8, value: *i32, minValue: i32, maxValue: i32, editMode: bool) i32 {
|
||||
return @as(i32, cdef.GuiValueBox(bounds, @as([*c]const u8, @ptrCast(text)), @as([*c]c_int, @ptrCast(value)), @as(c_int, minValue), @as(c_int, maxValue), editMode));
|
||||
}
|
||||
|
||||
/// Value box control for float values
|
||||
pub fn valueBoxFloat(bounds: Rectangle, text: [:0]const u8, textValue: [:0]u8, value: *f32, editMode: bool) i32 {
|
||||
return @as(i32, cdef.GuiValueBoxFloat(bounds, @as([*c]const u8, @ptrCast(text)), @as([*c]u8, @ptrCast(textValue)), @as([*c]f32, @ptrCast(value)), editMode));
|
||||
}
|
||||
|
||||
/// Slider control
|
||||
pub fn slider(bounds: Rectangle, textLeft: ?[:0]const u8, textRight: ?[:0]const u8, value: ?*f32, minValue: f32, maxValue: f32) i32 {
|
||||
return @as(i32, cdef.GuiSlider(bounds, @as([*c]const u8, @ptrCast(textLeft)), @as([*c]const u8, @ptrCast(textRight)), @as([*c]f32, @ptrCast(value)), minValue, maxValue));
|
||||
}
|
||||
|
||||
/// Slider Bar control
|
||||
pub fn sliderBar(bounds: Rectangle, textLeft: ?[:0]const u8, textRight: ?[:0]const u8, value: ?*f32, minValue: f32, maxValue: f32) i32 {
|
||||
return @as(i32, cdef.GuiSliderBar(bounds, @as([*c]const u8, @ptrCast(textLeft)), @as([*c]const u8, @ptrCast(textRight)), @as([*c]f32, @ptrCast(value)), minValue, maxValue));
|
||||
}
|
||||
|
||||
/// Progress Bar control
|
||||
pub fn progressBar(bounds: Rectangle, textLeft: ?[:0]const u8, textRight: ?[:0]const u8, value: ?*f32, minValue: f32, maxValue: f32) i32 {
|
||||
return @as(i32, cdef.GuiProgressBar(bounds, @as([*c]const u8, @ptrCast(textLeft)), @as([*c]const u8, @ptrCast(textRight)), @as([*c]f32, @ptrCast(value)), minValue, maxValue));
|
||||
}
|
||||
|
||||
/// Status Bar control, shows info text
|
||||
pub fn statusBar(bounds: Rectangle, text: [:0]const u8) i32 {
|
||||
return @as(i32, cdef.GuiStatusBar(bounds, @as([*c]const u8, @ptrCast(text))));
|
||||
}
|
||||
|
||||
/// Dummy control for placeholders
|
||||
pub fn dummyRec(bounds: Rectangle, text: [:0]const u8) i32 {
|
||||
return @as(i32, cdef.GuiDummyRec(bounds, @as([*c]const u8, @ptrCast(text))));
|
||||
}
|
||||
|
||||
/// Grid control
|
||||
pub fn grid(bounds: Rectangle, text: [:0]const u8, spacing: f32, subdivs: i32, mouseCell: *Vector2) i32 {
|
||||
return @as(i32, cdef.GuiGrid(bounds, @as([*c]const u8, @ptrCast(text)), spacing, @as(c_int, subdivs), @as([*c]Vector2, @ptrCast(mouseCell))));
|
||||
}
|
||||
|
||||
/// List View control
|
||||
pub fn listView(bounds: Rectangle, text: [:0]const u8, scrollIndex: *i32, active: *i32) i32 {
|
||||
return @as(i32, cdef.GuiListView(bounds, @as([*c]const u8, @ptrCast(text)), @as([*c]c_int, @ptrCast(scrollIndex)), @as([*c]c_int, @ptrCast(active))));
|
||||
}
|
||||
|
||||
/// Message Box control, displays a message
|
||||
pub fn messageBox(bounds: Rectangle, title: [:0]const u8, message: [:0]const u8, buttons: [:0]const u8) i32 {
|
||||
return @as(i32, cdef.GuiMessageBox(bounds, @as([*c]const u8, @ptrCast(title)), @as([*c]const u8, @ptrCast(message)), @as([*c]const u8, @ptrCast(buttons))));
|
||||
}
|
||||
|
||||
/// Text Input Box control, ask for text, supports secret
|
||||
pub fn textInputBox(bounds: Rectangle, title: [:0]const u8, message: [:0]const u8, buttons: [:0]const u8, text: [:0]u8, textMaxSize: i32, secretViewActive: ?*bool) i32 {
|
||||
return @as(i32, cdef.GuiTextInputBox(bounds, @as([*c]const u8, @ptrCast(title)), @as([*c]const u8, @ptrCast(message)), @as([*c]const u8, @ptrCast(buttons)), @as([*c]u8, @ptrCast(text)), @as(c_int, textMaxSize), @as([*c]bool, @ptrCast(secretViewActive))));
|
||||
}
|
||||
|
||||
/// Color Picker control (multiple color controls)
|
||||
pub fn colorPicker(bounds: Rectangle, text: [:0]const u8, color: *Color) i32 {
|
||||
return @as(i32, cdef.GuiColorPicker(bounds, @as([*c]const u8, @ptrCast(text)), @as([*c]Color, @ptrCast(color))));
|
||||
}
|
||||
|
||||
/// Color Panel control
|
||||
pub fn colorPanel(bounds: Rectangle, text: [:0]const u8, color: *Color) i32 {
|
||||
return @as(i32, cdef.GuiColorPanel(bounds, @as([*c]const u8, @ptrCast(text)), @as([*c]Color, @ptrCast(color))));
|
||||
}
|
||||
|
||||
/// Color Bar Alpha control
|
||||
pub fn colorBarAlpha(bounds: Rectangle, text: [:0]const u8, alpha: *f32) i32 {
|
||||
return @as(i32, cdef.GuiColorBarAlpha(bounds, @as([*c]const u8, @ptrCast(text)), @as([*c]f32, @ptrCast(alpha))));
|
||||
}
|
||||
|
||||
/// Color Bar Hue control
|
||||
pub fn colorBarHue(bounds: Rectangle, text: [:0]const u8, value: *f32) i32 {
|
||||
return @as(i32, cdef.GuiColorBarHue(bounds, @as([*c]const u8, @ptrCast(text)), @as([*c]f32, @ptrCast(value))));
|
||||
}
|
||||
|
||||
/// Color Picker control that avoids conversion to RGB on each call (multiple color controls)
|
||||
pub fn colorPickerHSV(bounds: Rectangle, text: [:0]const u8, colorHsv: *Vector3) i32 {
|
||||
return @as(i32, cdef.GuiColorPickerHSV(bounds, @as([*c]const u8, @ptrCast(text)), @as([*c]Vector3, @ptrCast(colorHsv))));
|
||||
}
|
||||
|
||||
/// Color Panel control that updates Hue-Saturation-Value color value, used by GuiColorPickerHSV()
|
||||
pub fn colorPanelHSV(bounds: Rectangle, text: [:0]const u8, colorHsv: *Vector3) i32 {
|
||||
return @as(i32, cdef.GuiColorPanelHSV(bounds, @as([*c]const u8, @ptrCast(text)), @as([*c]Vector3, @ptrCast(colorHsv))));
|
||||
}
|
||||
@ -0,0 +1,603 @@
|
||||
// raylib-zig (c) Nikolas Wipper 2023
|
||||
|
||||
const rl = @import("raylib.zig");
|
||||
|
||||
pub extern "c" fn InitWindow(width: c_int, height: c_int, title: [*c]const u8) void;
|
||||
pub extern "c" fn CloseWindow() void;
|
||||
pub extern "c" fn WindowShouldClose() bool;
|
||||
pub extern "c" fn IsWindowReady() bool;
|
||||
pub extern "c" fn IsWindowFullscreen() bool;
|
||||
pub extern "c" fn IsWindowHidden() bool;
|
||||
pub extern "c" fn IsWindowMinimized() bool;
|
||||
pub extern "c" fn IsWindowMaximized() bool;
|
||||
pub extern "c" fn IsWindowFocused() bool;
|
||||
pub extern "c" fn IsWindowResized() bool;
|
||||
pub extern "c" fn IsWindowState(flag: rl.ConfigFlags) bool;
|
||||
pub extern "c" fn SetWindowState(flags: rl.ConfigFlags) void;
|
||||
pub extern "c" fn ClearWindowState(flags: rl.ConfigFlags) void;
|
||||
pub extern "c" fn ToggleFullscreen() void;
|
||||
pub extern "c" fn ToggleBorderlessWindowed() void;
|
||||
pub extern "c" fn MaximizeWindow() void;
|
||||
pub extern "c" fn MinimizeWindow() void;
|
||||
pub extern "c" fn RestoreWindow() void;
|
||||
pub extern "c" fn SetWindowIcon(image: rl.Image) void;
|
||||
pub extern "c" fn SetWindowIcons(images: [*c]rl.Image, count: c_int) void;
|
||||
pub extern "c" fn SetWindowTitle(title: [*c]const u8) void;
|
||||
pub extern "c" fn SetWindowPosition(x: c_int, y: c_int) void;
|
||||
pub extern "c" fn SetWindowMonitor(monitor: c_int) void;
|
||||
pub extern "c" fn SetWindowMinSize(width: c_int, height: c_int) void;
|
||||
pub extern "c" fn SetWindowMaxSize(width: c_int, height: c_int) void;
|
||||
pub extern "c" fn SetWindowSize(width: c_int, height: c_int) void;
|
||||
pub extern "c" fn SetWindowOpacity(opacity: f32) void;
|
||||
pub extern "c" fn SetWindowFocused() void;
|
||||
pub extern "c" fn GetWindowHandle() *anyopaque;
|
||||
pub extern "c" fn GetScreenWidth() c_int;
|
||||
pub extern "c" fn GetScreenHeight() c_int;
|
||||
pub extern "c" fn GetRenderWidth() c_int;
|
||||
pub extern "c" fn GetRenderHeight() c_int;
|
||||
pub extern "c" fn GetMonitorCount() c_int;
|
||||
pub extern "c" fn GetCurrentMonitor() c_int;
|
||||
pub extern "c" fn GetMonitorPosition(monitor: c_int) rl.Vector2;
|
||||
pub extern "c" fn GetMonitorWidth(monitor: c_int) c_int;
|
||||
pub extern "c" fn GetMonitorHeight(monitor: c_int) c_int;
|
||||
pub extern "c" fn GetMonitorPhysicalWidth(monitor: c_int) c_int;
|
||||
pub extern "c" fn GetMonitorPhysicalHeight(monitor: c_int) c_int;
|
||||
pub extern "c" fn GetMonitorRefreshRate(monitor: c_int) c_int;
|
||||
pub extern "c" fn GetWindowPosition() rl.Vector2;
|
||||
pub extern "c" fn GetWindowScaleDPI() rl.Vector2;
|
||||
pub extern "c" fn GetMonitorName(monitor: c_int) [*c]const u8;
|
||||
pub extern "c" fn SetClipboardText(text: [*c]const u8) void;
|
||||
pub extern "c" fn GetClipboardText() [*c]const u8;
|
||||
pub extern "c" fn GetClipboardImage() rl.Image;
|
||||
pub extern "c" fn EnableEventWaiting() void;
|
||||
pub extern "c" fn DisableEventWaiting() void;
|
||||
pub extern "c" fn ShowCursor() void;
|
||||
pub extern "c" fn HideCursor() void;
|
||||
pub extern "c" fn IsCursorHidden() bool;
|
||||
pub extern "c" fn EnableCursor() void;
|
||||
pub extern "c" fn DisableCursor() void;
|
||||
pub extern "c" fn IsCursorOnScreen() bool;
|
||||
pub extern "c" fn ClearBackground(color: rl.Color) void;
|
||||
pub extern "c" fn BeginDrawing() void;
|
||||
pub extern "c" fn EndDrawing() void;
|
||||
pub extern "c" fn BeginMode2D(camera: rl.Camera2D) void;
|
||||
pub extern "c" fn EndMode2D() void;
|
||||
pub extern "c" fn BeginMode3D(camera: rl.Camera3D) void;
|
||||
pub extern "c" fn EndMode3D() void;
|
||||
pub extern "c" fn BeginTextureMode(target: rl.RenderTexture2D) void;
|
||||
pub extern "c" fn EndTextureMode() void;
|
||||
pub extern "c" fn BeginShaderMode(shader: rl.Shader) void;
|
||||
pub extern "c" fn EndShaderMode() void;
|
||||
pub extern "c" fn BeginBlendMode(mode: rl.BlendMode) void;
|
||||
pub extern "c" fn EndBlendMode() void;
|
||||
pub extern "c" fn BeginScissorMode(x: c_int, y: c_int, width: c_int, height: c_int) void;
|
||||
pub extern "c" fn EndScissorMode() void;
|
||||
pub extern "c" fn BeginVrStereoMode(config: rl.VrStereoConfig) void;
|
||||
pub extern "c" fn EndVrStereoMode() void;
|
||||
pub extern "c" fn LoadVrStereoConfig(device: rl.VrDeviceInfo) rl.VrStereoConfig;
|
||||
pub extern "c" fn UnloadVrStereoConfig(config: rl.VrStereoConfig) void;
|
||||
pub extern "c" fn LoadShader(vsFileName: [*c]const u8, fsFileName: [*c]const u8) rl.Shader;
|
||||
pub extern "c" fn LoadShaderFromMemory(vsCode: [*c]const u8, fsCode: [*c]const u8) rl.Shader;
|
||||
pub extern "c" fn IsShaderValid(shader: rl.Shader) bool;
|
||||
pub extern "c" fn GetShaderLocation(shader: rl.Shader, uniformName: [*c]const u8) c_int;
|
||||
pub extern "c" fn GetShaderLocationAttrib(shader: rl.Shader, attribName: [*c]const u8) c_int;
|
||||
pub extern "c" fn SetShaderValue(shader: rl.Shader, locIndex: c_int, value: *const anyopaque, uniformType: rl.ShaderUniformDataType) void;
|
||||
pub extern "c" fn SetShaderValueV(shader: rl.Shader, locIndex: c_int, value: *const anyopaque, uniformType: rl.ShaderUniformDataType, count: c_int) void;
|
||||
pub extern "c" fn SetShaderValueMatrix(shader: rl.Shader, locIndex: c_int, mat: rl.Matrix) void;
|
||||
pub extern "c" fn SetShaderValueTexture(shader: rl.Shader, locIndex: c_int, texture: rl.Texture2D) void;
|
||||
pub extern "c" fn UnloadShader(shader: rl.Shader) void;
|
||||
pub extern "c" fn GetScreenToWorldRay(position: rl.Vector2, camera: rl.Camera) rl.Ray;
|
||||
pub extern "c" fn GetScreenToWorldRayEx(position: rl.Vector2, camera: rl.Camera, width: c_int, height: c_int) rl.Ray;
|
||||
pub extern "c" fn GetWorldToScreen(position: rl.Vector3, camera: rl.Camera) rl.Vector2;
|
||||
pub extern "c" fn GetWorldToScreenEx(position: rl.Vector3, camera: rl.Camera, width: c_int, height: c_int) rl.Vector2;
|
||||
pub extern "c" fn GetWorldToScreen2D(position: rl.Vector2, camera: rl.Camera2D) rl.Vector2;
|
||||
pub extern "c" fn GetScreenToWorld2D(position: rl.Vector2, camera: rl.Camera2D) rl.Vector2;
|
||||
pub extern "c" fn GetCameraMatrix(camera: rl.Camera) rl.Matrix;
|
||||
pub extern "c" fn GetCameraMatrix2D(camera: rl.Camera2D) rl.Matrix;
|
||||
pub extern "c" fn SetTargetFPS(fps: c_int) void;
|
||||
pub extern "c" fn GetFrameTime() f32;
|
||||
pub extern "c" fn GetTime() f64;
|
||||
pub extern "c" fn GetFPS() c_int;
|
||||
pub extern "c" fn SwapScreenBuffer() void;
|
||||
pub extern "c" fn PollInputEvents() void;
|
||||
pub extern "c" fn WaitTime(seconds: f64) void;
|
||||
pub extern "c" fn SetRandomSeed(seed: c_uint) void;
|
||||
pub extern "c" fn GetRandomValue(min: c_int, max: c_int) c_int;
|
||||
pub extern "c" fn LoadRandomSequence(count: c_uint, min: c_int, max: c_int) [*c]c_int;
|
||||
pub extern "c" fn UnloadRandomSequence(sequence: [*c]c_int) void;
|
||||
pub extern "c" fn TakeScreenshot(fileName: [*c]const u8) void;
|
||||
pub extern "c" fn SetConfigFlags(flags: rl.ConfigFlags) void;
|
||||
pub extern "c" fn OpenURL(url: [*c]const u8) void;
|
||||
pub extern "c" fn SetTraceLogLevel(logLevel: rl.TraceLogLevel) void;
|
||||
pub extern "c" fn TraceLog(logLevel: rl.TraceLogLevel, text: [*c]const u8, ...) void;
|
||||
pub extern "c" fn MemAlloc(size: c_uint) *anyopaque;
|
||||
pub extern "c" fn MemRealloc(ptr: *anyopaque, size: c_uint) *anyopaque;
|
||||
pub extern "c" fn MemFree(ptr: *anyopaque) void;
|
||||
pub extern "c" fn LoadFileData(fileName: [*c]const u8, dataSize: [*c]c_int) [*c]u8;
|
||||
pub extern "c" fn UnloadFileData(data: [*c]u8) void;
|
||||
pub extern "c" fn SaveFileData(fileName: [*c]const u8, data: *anyopaque, dataSize: c_int) bool;
|
||||
pub extern "c" fn ExportDataAsCode(data: [*c]const u8, dataSize: c_int, fileName: [*c]const u8) bool;
|
||||
pub extern "c" fn LoadFileText(fileName: [*c]const u8) [*c]u8;
|
||||
pub extern "c" fn UnloadFileText(text: [*c]u8) void;
|
||||
pub extern "c" fn SaveFileText(fileName: [*c]const u8, text: [*c]const u8) bool;
|
||||
pub extern "c" fn SetLoadFileDataCallback(callback: rl.LoadFileDataCallback) void;
|
||||
pub extern "c" fn SetSaveFileDataCallback(callback: rl.SaveFileDataCallback) void;
|
||||
pub extern "c" fn SetLoadFileTextCallback(callback: rl.LoadFileTextCallback) void;
|
||||
pub extern "c" fn SetSaveFileTextCallback(callback: rl.SaveFileTextCallback) void;
|
||||
pub extern "c" fn FileRename(fileName: [*c]const u8, fileRename_: [*c]const u8) c_int;
|
||||
pub extern "c" fn FileRemove(fileName: [*c]const u8) c_int;
|
||||
pub extern "c" fn FileCopy(srcPath: [*c]const u8, dstPath: [*c]const u8) c_int;
|
||||
pub extern "c" fn FileMove(srcPath: [*c]const u8, dstPath: [*c]const u8) c_int;
|
||||
pub extern "c" fn FileTextReplace(fileName: [*c]const u8, search: [*c]const u8, replacement: [*c]const u8) c_int;
|
||||
pub extern "c" fn FileTextFindIndex(fileName: [*c]const u8, search: [*c]const u8) c_int;
|
||||
pub extern "c" fn FileExists(fileName: [*c]const u8) bool;
|
||||
pub extern "c" fn DirectoryExists(dirPath: [*c]const u8) bool;
|
||||
pub extern "c" fn IsFileExtension(fileName: [*c]const u8, ext: [*c]const u8) bool;
|
||||
pub extern "c" fn GetFileLength(fileName: [*c]const u8) c_int;
|
||||
pub extern "c" fn GetFileModTime(fileName: [*c]const u8) c_long;
|
||||
pub extern "c" fn GetFileExtension(fileName: [*c]const u8) [*c]const u8;
|
||||
pub extern "c" fn GetFileName(filePath: [*c]const u8) [*c]const u8;
|
||||
pub extern "c" fn GetFileNameWithoutExt(filePath: [*c]const u8) [*c]const u8;
|
||||
pub extern "c" fn GetDirectoryPath(filePath: [*c]const u8) [*c]const u8;
|
||||
pub extern "c" fn GetPrevDirectoryPath(dirPath: [*c]const u8) [*c]const u8;
|
||||
pub extern "c" fn GetWorkingDirectory() [*c]const u8;
|
||||
pub extern "c" fn GetApplicationDirectory() [*c]const u8;
|
||||
pub extern "c" fn MakeDirectory(dirPath: [*c]const u8) c_int;
|
||||
pub extern "c" fn ChangeDirectory(dirPath: [*c]const u8) bool;
|
||||
pub extern "c" fn IsPathFile(path: [*c]const u8) bool;
|
||||
pub extern "c" fn IsFileNameValid(fileName: [*c]const u8) bool;
|
||||
pub extern "c" fn LoadDirectoryFiles(dirPath: [*c]const u8) rl.FilePathList;
|
||||
pub extern "c" fn LoadDirectoryFilesEx(basePath: [*c]const u8, filter: [*c]const u8, scanSubdirs: bool) rl.FilePathList;
|
||||
pub extern "c" fn UnloadDirectoryFiles(files: rl.FilePathList) void;
|
||||
pub extern "c" fn IsFileDropped() bool;
|
||||
pub extern "c" fn LoadDroppedFiles() rl.FilePathList;
|
||||
pub extern "c" fn UnloadDroppedFiles(files: rl.FilePathList) void;
|
||||
pub extern "c" fn GetDirectoryFileCount(dirPath: [*c]const u8) c_uint;
|
||||
pub extern "c" fn GetDirectoryFileCountEx(basePath: [*c]const u8, filter: [*c]const u8, scanSubdirs: bool) c_uint;
|
||||
pub extern "c" fn CompressData(data: [*c]const u8, dataSize: c_int, compDataSize: [*c]c_int) [*c]u8;
|
||||
pub extern "c" fn DecompressData(compData: [*c]const u8, compDataSize: c_int, dataSize: [*c]c_int) [*c]u8;
|
||||
pub extern "c" fn EncodeDataBase64(data: [*c]const u8, dataSize: c_int, outputSize: [*c]c_int) [*c]u8;
|
||||
pub extern "c" fn DecodeDataBase64(text: [*c]const u8, outputSize: [*c]c_int) [*c]u8;
|
||||
pub extern "c" fn ComputeCRC32(data: [*c]u8, dataSize: c_int) c_uint;
|
||||
pub extern "c" fn ComputeMD5(data: [*c]u8, dataSize: c_int) [*c]c_uint;
|
||||
pub extern "c" fn ComputeSHA1(data: [*c]u8, dataSize: c_int) [*c]c_uint;
|
||||
pub extern "c" fn ComputeSHA256(data: [*c]u8, dataSize: c_int) [*c]c_uint;
|
||||
pub extern "c" fn LoadAutomationEventList(fileName: [*c]const u8) rl.AutomationEventList;
|
||||
pub extern "c" fn UnloadAutomationEventList(list: rl.AutomationEventList) void;
|
||||
pub extern "c" fn ExportAutomationEventList(list: rl.AutomationEventList, fileName: [*c]const u8) bool;
|
||||
pub extern "c" fn SetAutomationEventList(list: [*c]rl.AutomationEventList) void;
|
||||
pub extern "c" fn SetAutomationEventBaseFrame(frame: c_int) void;
|
||||
pub extern "c" fn StartAutomationEventRecording() void;
|
||||
pub extern "c" fn StopAutomationEventRecording() void;
|
||||
pub extern "c" fn PlayAutomationEvent(event: rl.AutomationEvent) void;
|
||||
pub extern "c" fn IsKeyPressed(key: rl.KeyboardKey) bool;
|
||||
pub extern "c" fn IsKeyPressedRepeat(key: rl.KeyboardKey) bool;
|
||||
pub extern "c" fn IsKeyDown(key: rl.KeyboardKey) bool;
|
||||
pub extern "c" fn IsKeyReleased(key: rl.KeyboardKey) bool;
|
||||
pub extern "c" fn IsKeyUp(key: rl.KeyboardKey) bool;
|
||||
pub extern "c" fn GetKeyPressed() rl.KeyboardKey;
|
||||
pub extern "c" fn GetCharPressed() c_int;
|
||||
pub extern "c" fn GetKeyName(key: rl.KeyboardKey) [*c]const u8;
|
||||
pub extern "c" fn SetExitKey(key: rl.KeyboardKey) void;
|
||||
pub extern "c" fn IsGamepadAvailable(gamepad: c_int) bool;
|
||||
pub extern "c" fn GetGamepadName(gamepad: c_int) [*c]const u8;
|
||||
pub extern "c" fn IsGamepadButtonPressed(gamepad: c_int, button: rl.GamepadButton) bool;
|
||||
pub extern "c" fn IsGamepadButtonDown(gamepad: c_int, button: rl.GamepadButton) bool;
|
||||
pub extern "c" fn IsGamepadButtonReleased(gamepad: c_int, button: rl.GamepadButton) bool;
|
||||
pub extern "c" fn IsGamepadButtonUp(gamepad: c_int, button: rl.GamepadButton) bool;
|
||||
pub extern "c" fn GetGamepadButtonPressed() rl.GamepadButton;
|
||||
pub extern "c" fn GetGamepadAxisCount(gamepad: c_int) c_int;
|
||||
pub extern "c" fn GetGamepadAxisMovement(gamepad: c_int, axis: rl.GamepadAxis) f32;
|
||||
pub extern "c" fn SetGamepadMappings(mappings: [*c]const u8) c_int;
|
||||
pub extern "c" fn SetGamepadVibration(gamepad: c_int, leftMotor: f32, rightMotor: f32, duration: f32) void;
|
||||
pub extern "c" fn IsMouseButtonPressed(button: rl.MouseButton) bool;
|
||||
pub extern "c" fn IsMouseButtonDown(button: rl.MouseButton) bool;
|
||||
pub extern "c" fn IsMouseButtonReleased(button: rl.MouseButton) bool;
|
||||
pub extern "c" fn IsMouseButtonUp(button: rl.MouseButton) bool;
|
||||
pub extern "c" fn GetMouseX() c_int;
|
||||
pub extern "c" fn GetMouseY() c_int;
|
||||
pub extern "c" fn GetMousePosition() rl.Vector2;
|
||||
pub extern "c" fn GetMouseDelta() rl.Vector2;
|
||||
pub extern "c" fn SetMousePosition(x: c_int, y: c_int) void;
|
||||
pub extern "c" fn SetMouseOffset(offsetX: c_int, offsetY: c_int) void;
|
||||
pub extern "c" fn SetMouseScale(scaleX: f32, scaleY: f32) void;
|
||||
pub extern "c" fn GetMouseWheelMove() f32;
|
||||
pub extern "c" fn GetMouseWheelMoveV() rl.Vector2;
|
||||
pub extern "c" fn SetMouseCursor(cursor: rl.MouseCursor) void;
|
||||
pub extern "c" fn GetTouchX() c_int;
|
||||
pub extern "c" fn GetTouchY() c_int;
|
||||
pub extern "c" fn GetTouchPosition(index: c_int) rl.Vector2;
|
||||
pub extern "c" fn GetTouchPointId(index: c_int) c_int;
|
||||
pub extern "c" fn GetTouchPointCount() c_int;
|
||||
pub extern "c" fn SetGesturesEnabled(flags: rl.Gesture) void;
|
||||
pub extern "c" fn IsGestureDetected(gesture: rl.Gesture) bool;
|
||||
pub extern "c" fn GetGestureDetected() rl.Gesture;
|
||||
pub extern "c" fn GetGestureHoldDuration() f32;
|
||||
pub extern "c" fn GetGestureDragVector() rl.Vector2;
|
||||
pub extern "c" fn GetGestureDragAngle() f32;
|
||||
pub extern "c" fn GetGesturePinchVector() rl.Vector2;
|
||||
pub extern "c" fn GetGesturePinchAngle() f32;
|
||||
pub extern "c" fn UpdateCamera(camera: [*c]rl.Camera, mode: rl.CameraMode) void;
|
||||
pub extern "c" fn UpdateCameraPro(camera: [*c]rl.Camera, movement: rl.Vector3, rotation: rl.Vector3, zoom: f32) void;
|
||||
pub extern "c" fn SetShapesTexture(texture: rl.Texture2D, source: rl.Rectangle) void;
|
||||
pub extern "c" fn GetShapesTexture() rl.Texture2D;
|
||||
pub extern "c" fn GetShapesTextureRectangle() rl.Rectangle;
|
||||
pub extern "c" fn DrawPixel(posX: c_int, posY: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawPixelV(position: rl.Vector2, color: rl.Color) void;
|
||||
pub extern "c" fn DrawLine(startPosX: c_int, startPosY: c_int, endPosX: c_int, endPosY: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawLineV(startPos: rl.Vector2, endPos: rl.Vector2, color: rl.Color) void;
|
||||
pub extern "c" fn DrawLineEx(startPos: rl.Vector2, endPos: rl.Vector2, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawLineStrip(points: [*c]const rl.Vector2, pointCount: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawLineBezier(startPos: rl.Vector2, endPos: rl.Vector2, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawLineDashed(startPos: rl.Vector2, endPos: rl.Vector2, dashSize: c_int, spaceSize: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCircle(centerX: c_int, centerY: c_int, radius: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCircleV(center: rl.Vector2, radius: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCircleGradient(center: rl.Vector2, radius: f32, inner: rl.Color, outer: rl.Color) void;
|
||||
pub extern "c" fn DrawCircleSector(center: rl.Vector2, radius: f32, startAngle: f32, endAngle: f32, segments: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCircleSectorLines(center: rl.Vector2, radius: f32, startAngle: f32, endAngle: f32, segments: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCircleLines(centerX: c_int, centerY: c_int, radius: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCircleLinesV(center: rl.Vector2, radius: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawEllipse(centerX: c_int, centerY: c_int, radiusH: f32, radiusV: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawEllipseV(center: rl.Vector2, radiusH: f32, radiusV: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawEllipseLines(centerX: c_int, centerY: c_int, radiusH: f32, radiusV: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawEllipseLinesV(center: rl.Vector2, radiusH: f32, radiusV: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawRing(center: rl.Vector2, innerRadius: f32, outerRadius: f32, startAngle: f32, endAngle: f32, segments: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawRingLines(center: rl.Vector2, innerRadius: f32, outerRadius: f32, startAngle: f32, endAngle: f32, segments: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawRectangle(posX: c_int, posY: c_int, width: c_int, height: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawRectangleV(position: rl.Vector2, size: rl.Vector2, color: rl.Color) void;
|
||||
pub extern "c" fn DrawRectangleRec(rec: rl.Rectangle, color: rl.Color) void;
|
||||
pub extern "c" fn DrawRectanglePro(rec: rl.Rectangle, origin: rl.Vector2, rotation: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawRectangleGradientV(posX: c_int, posY: c_int, width: c_int, height: c_int, top: rl.Color, bottom: rl.Color) void;
|
||||
pub extern "c" fn DrawRectangleGradientH(posX: c_int, posY: c_int, width: c_int, height: c_int, left: rl.Color, right: rl.Color) void;
|
||||
pub extern "c" fn DrawRectangleGradientEx(rec: rl.Rectangle, topLeft: rl.Color, bottomLeft: rl.Color, bottomRight: rl.Color, topRight: rl.Color) void;
|
||||
pub extern "c" fn DrawRectangleLines(posX: c_int, posY: c_int, width: c_int, height: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawRectangleLinesEx(rec: rl.Rectangle, lineThick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawRectangleRounded(rec: rl.Rectangle, roundness: f32, segments: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawRectangleRoundedLines(rec: rl.Rectangle, roundness: f32, segments: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawRectangleRoundedLinesEx(rec: rl.Rectangle, roundness: f32, segments: c_int, lineThick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawTriangle(v1: rl.Vector2, v2: rl.Vector2, v3: rl.Vector2, color: rl.Color) void;
|
||||
pub extern "c" fn DrawTriangleLines(v1: rl.Vector2, v2: rl.Vector2, v3: rl.Vector2, color: rl.Color) void;
|
||||
pub extern "c" fn DrawTriangleFan(points: [*c]const rl.Vector2, pointCount: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawTriangleStrip(points: [*c]const rl.Vector2, pointCount: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawPoly(center: rl.Vector2, sides: c_int, radius: f32, rotation: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawPolyLines(center: rl.Vector2, sides: c_int, radius: f32, rotation: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawPolyLinesEx(center: rl.Vector2, sides: c_int, radius: f32, rotation: f32, lineThick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineLinear(points: [*c]const rl.Vector2, pointCount: c_int, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineBasis(points: [*c]const rl.Vector2, pointCount: c_int, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineCatmullRom(points: [*c]const rl.Vector2, pointCount: c_int, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineBezierQuadratic(points: [*c]const rl.Vector2, pointCount: c_int, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineBezierCubic(points: [*c]const rl.Vector2, pointCount: c_int, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineSegmentLinear(p1: rl.Vector2, p2: rl.Vector2, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineSegmentBasis(p1: rl.Vector2, p2: rl.Vector2, p3: rl.Vector2, p4: rl.Vector2, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineSegmentCatmullRom(p1: rl.Vector2, p2: rl.Vector2, p3: rl.Vector2, p4: rl.Vector2, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineSegmentBezierQuadratic(p1: rl.Vector2, c2: rl.Vector2, p3: rl.Vector2, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSplineSegmentBezierCubic(p1: rl.Vector2, c2: rl.Vector2, c3: rl.Vector2, p4: rl.Vector2, thick: f32, color: rl.Color) void;
|
||||
pub extern "c" fn GetSplinePointLinear(startPos: rl.Vector2, endPos: rl.Vector2, t: f32) rl.Vector2;
|
||||
pub extern "c" fn GetSplinePointBasis(p1: rl.Vector2, p2: rl.Vector2, p3: rl.Vector2, p4: rl.Vector2, t: f32) rl.Vector2;
|
||||
pub extern "c" fn GetSplinePointCatmullRom(p1: rl.Vector2, p2: rl.Vector2, p3: rl.Vector2, p4: rl.Vector2, t: f32) rl.Vector2;
|
||||
pub extern "c" fn GetSplinePointBezierQuad(p1: rl.Vector2, c2: rl.Vector2, p3: rl.Vector2, t: f32) rl.Vector2;
|
||||
pub extern "c" fn GetSplinePointBezierCubic(p1: rl.Vector2, c2: rl.Vector2, c3: rl.Vector2, p4: rl.Vector2, t: f32) rl.Vector2;
|
||||
pub extern "c" fn CheckCollisionRecs(rec1: rl.Rectangle, rec2: rl.Rectangle) bool;
|
||||
pub extern "c" fn CheckCollisionCircles(center1: rl.Vector2, radius1: f32, center2: rl.Vector2, radius2: f32) bool;
|
||||
pub extern "c" fn CheckCollisionCircleRec(center: rl.Vector2, radius: f32, rec: rl.Rectangle) bool;
|
||||
pub extern "c" fn CheckCollisionCircleLine(center: rl.Vector2, radius: f32, p1: rl.Vector2, p2: rl.Vector2) bool;
|
||||
pub extern "c" fn CheckCollisionPointRec(point: rl.Vector2, rec: rl.Rectangle) bool;
|
||||
pub extern "c" fn CheckCollisionPointCircle(point: rl.Vector2, center: rl.Vector2, radius: f32) bool;
|
||||
pub extern "c" fn CheckCollisionPointTriangle(point: rl.Vector2, p1: rl.Vector2, p2: rl.Vector2, p3: rl.Vector2) bool;
|
||||
pub extern "c" fn CheckCollisionPointLine(point: rl.Vector2, p1: rl.Vector2, p2: rl.Vector2, threshold: c_int) bool;
|
||||
pub extern "c" fn CheckCollisionPointPoly(point: rl.Vector2, points: [*c]const rl.Vector2, pointCount: c_int) bool;
|
||||
pub extern "c" fn CheckCollisionLines(startPos1: rl.Vector2, endPos1: rl.Vector2, startPos2: rl.Vector2, endPos2: rl.Vector2, collisionPoint: [*c]rl.Vector2) bool;
|
||||
pub extern "c" fn GetCollisionRec(rec1: rl.Rectangle, rec2: rl.Rectangle) rl.Rectangle;
|
||||
pub extern "c" fn LoadImage(fileName: [*c]const u8) rl.Image;
|
||||
pub extern "c" fn LoadImageRaw(fileName: [*c]const u8, width: c_int, height: c_int, format: rl.PixelFormat, headerSize: c_int) rl.Image;
|
||||
pub extern "c" fn LoadImageAnim(fileName: [*c]const u8, frames: [*c]c_int) rl.Image;
|
||||
pub extern "c" fn LoadImageAnimFromMemory(fileType: [*c]const u8, fileData: [*c]const u8, dataSize: c_int, frames: [*c]c_int) rl.Image;
|
||||
pub extern "c" fn LoadImageFromMemory(fileType: [*c]const u8, fileData: [*c]const u8, dataSize: c_int) rl.Image;
|
||||
pub extern "c" fn LoadImageFromTexture(texture: rl.Texture2D) rl.Image;
|
||||
pub extern "c" fn LoadImageFromScreen() rl.Image;
|
||||
pub extern "c" fn IsImageValid(image: rl.Image) bool;
|
||||
pub extern "c" fn UnloadImage(image: rl.Image) void;
|
||||
pub extern "c" fn ExportImage(image: rl.Image, fileName: [*c]const u8) bool;
|
||||
pub extern "c" fn ExportImageToMemory(image: rl.Image, fileType: [*c]const u8, fileSize: [*c]c_int) [*c]u8;
|
||||
pub extern "c" fn ExportImageAsCode(image: rl.Image, fileName: [*c]const u8) bool;
|
||||
pub extern "c" fn GenImageColor(width: c_int, height: c_int, color: rl.Color) rl.Image;
|
||||
pub extern "c" fn GenImageGradientLinear(width: c_int, height: c_int, direction: c_int, start: rl.Color, end: rl.Color) rl.Image;
|
||||
pub extern "c" fn GenImageGradientRadial(width: c_int, height: c_int, density: f32, inner: rl.Color, outer: rl.Color) rl.Image;
|
||||
pub extern "c" fn GenImageGradientSquare(width: c_int, height: c_int, density: f32, inner: rl.Color, outer: rl.Color) rl.Image;
|
||||
pub extern "c" fn GenImageChecked(width: c_int, height: c_int, checksX: c_int, checksY: c_int, col1: rl.Color, col2: rl.Color) rl.Image;
|
||||
pub extern "c" fn GenImageWhiteNoise(width: c_int, height: c_int, factor: f32) rl.Image;
|
||||
pub extern "c" fn GenImagePerlinNoise(width: c_int, height: c_int, offsetX: c_int, offsetY: c_int, scale: f32) rl.Image;
|
||||
pub extern "c" fn GenImageCellular(width: c_int, height: c_int, tileSize: c_int) rl.Image;
|
||||
pub extern "c" fn GenImageText(width: c_int, height: c_int, text: [*c]const u8) rl.Image;
|
||||
pub extern "c" fn ImageCopy(image: rl.Image) rl.Image;
|
||||
pub extern "c" fn ImageFromImage(image: rl.Image, rec: rl.Rectangle) rl.Image;
|
||||
pub extern "c" fn ImageFromChannel(image: rl.Image, selectedChannel: c_int) rl.Image;
|
||||
pub extern "c" fn ImageText(text: [*c]const u8, fontSize: c_int, color: rl.Color) rl.Image;
|
||||
pub extern "c" fn ImageTextEx(font: rl.Font, text: [*c]const u8, fontSize: f32, spacing: f32, tint: rl.Color) rl.Image;
|
||||
pub extern "c" fn ImageFormat(image: [*c]rl.Image, newFormat: rl.PixelFormat) void;
|
||||
pub extern "c" fn ImageToPOT(image: [*c]rl.Image, fill: rl.Color) void;
|
||||
pub extern "c" fn ImageCrop(image: [*c]rl.Image, crop: rl.Rectangle) void;
|
||||
pub extern "c" fn ImageAlphaCrop(image: [*c]rl.Image, threshold: f32) void;
|
||||
pub extern "c" fn ImageAlphaClear(image: [*c]rl.Image, color: rl.Color, threshold: f32) void;
|
||||
pub extern "c" fn ImageAlphaMask(image: [*c]rl.Image, alphaMask: rl.Image) void;
|
||||
pub extern "c" fn ImageAlphaPremultiply(image: [*c]rl.Image) void;
|
||||
pub extern "c" fn ImageBlurGaussian(image: [*c]rl.Image, blurSize: c_int) void;
|
||||
pub extern "c" fn ImageKernelConvolution(image: [*c]rl.Image, kernel: [*c]const f32, kernelSize: c_int) void;
|
||||
pub extern "c" fn ImageResize(image: [*c]rl.Image, newWidth: c_int, newHeight: c_int) void;
|
||||
pub extern "c" fn ImageResizeNN(image: [*c]rl.Image, newWidth: c_int, newHeight: c_int) void;
|
||||
pub extern "c" fn ImageResizeCanvas(image: [*c]rl.Image, newWidth: c_int, newHeight: c_int, offsetX: c_int, offsetY: c_int, fill: rl.Color) void;
|
||||
pub extern "c" fn ImageMipmaps(image: [*c]rl.Image) void;
|
||||
pub extern "c" fn ImageDither(image: [*c]rl.Image, rBpp: c_int, gBpp: c_int, bBpp: c_int, aBpp: c_int) void;
|
||||
pub extern "c" fn ImageFlipVertical(image: [*c]rl.Image) void;
|
||||
pub extern "c" fn ImageFlipHorizontal(image: [*c]rl.Image) void;
|
||||
pub extern "c" fn ImageRotate(image: [*c]rl.Image, degrees: c_int) void;
|
||||
pub extern "c" fn ImageRotateCW(image: [*c]rl.Image) void;
|
||||
pub extern "c" fn ImageRotateCCW(image: [*c]rl.Image) void;
|
||||
pub extern "c" fn ImageColorTint(image: [*c]rl.Image, color: rl.Color) void;
|
||||
pub extern "c" fn ImageColorInvert(image: [*c]rl.Image) void;
|
||||
pub extern "c" fn ImageColorGrayscale(image: [*c]rl.Image) void;
|
||||
pub extern "c" fn ImageColorContrast(image: [*c]rl.Image, contrast: f32) void;
|
||||
pub extern "c" fn ImageColorBrightness(image: [*c]rl.Image, brightness: c_int) void;
|
||||
pub extern "c" fn ImageColorReplace(image: [*c]rl.Image, color: rl.Color, replace: rl.Color) void;
|
||||
pub extern "c" fn LoadImageColors(image: rl.Image) [*c]rl.Color;
|
||||
pub extern "c" fn LoadImagePalette(image: rl.Image, maxPaletteSize: c_int, colorCount: [*c]c_int) [*c]rl.Color;
|
||||
pub extern "c" fn UnloadImageColors(colors: [*c]rl.Color) void;
|
||||
pub extern "c" fn UnloadImagePalette(colors: [*c]rl.Color) void;
|
||||
pub extern "c" fn GetImageAlphaBorder(image: rl.Image, threshold: f32) rl.Rectangle;
|
||||
pub extern "c" fn GetImageColor(image: rl.Image, x: c_int, y: c_int) rl.Color;
|
||||
pub extern "c" fn ImageClearBackground(dst: [*c]rl.Image, color: rl.Color) void;
|
||||
pub extern "c" fn ImageDrawPixel(dst: [*c]rl.Image, posX: c_int, posY: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn ImageDrawPixelV(dst: [*c]rl.Image, position: rl.Vector2, color: rl.Color) void;
|
||||
pub extern "c" fn ImageDrawLine(dst: [*c]rl.Image, startPosX: c_int, startPosY: c_int, endPosX: c_int, endPosY: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn ImageDrawLineV(dst: [*c]rl.Image, start: rl.Vector2, end: rl.Vector2, color: rl.Color) void;
|
||||
pub extern "c" fn ImageDrawLineEx(dst: [*c]rl.Image, start: rl.Vector2, end: rl.Vector2, thick: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn ImageDrawCircle(dst: [*c]rl.Image, centerX: c_int, centerY: c_int, radius: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn ImageDrawCircleV(dst: [*c]rl.Image, center: rl.Vector2, radius: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn ImageDrawCircleLines(dst: [*c]rl.Image, centerX: c_int, centerY: c_int, radius: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn ImageDrawCircleLinesV(dst: [*c]rl.Image, center: rl.Vector2, radius: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn ImageDrawRectangle(dst: [*c]rl.Image, posX: c_int, posY: c_int, width: c_int, height: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn ImageDrawRectangleV(dst: [*c]rl.Image, position: rl.Vector2, size: rl.Vector2, color: rl.Color) void;
|
||||
pub extern "c" fn ImageDrawRectangleRec(dst: [*c]rl.Image, rec: rl.Rectangle, color: rl.Color) void;
|
||||
pub extern "c" fn ImageDrawRectangleLines(dst: [*c]rl.Image, rec: rl.Rectangle, thick: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn ImageDrawTriangle(dst: [*c]rl.Image, v1: rl.Vector2, v2: rl.Vector2, v3: rl.Vector2, color: rl.Color) void;
|
||||
pub extern "c" fn ImageDrawTriangleEx(dst: [*c]rl.Image, v1: rl.Vector2, v2: rl.Vector2, v3: rl.Vector2, c1: rl.Color, c2: rl.Color, c3: rl.Color) void;
|
||||
pub extern "c" fn ImageDrawTriangleLines(dst: [*c]rl.Image, v1: rl.Vector2, v2: rl.Vector2, v3: rl.Vector2, color: rl.Color) void;
|
||||
pub extern "c" fn ImageDrawTriangleFan(dst: [*c]rl.Image, points: [*c]const rl.Vector2, pointCount: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn ImageDrawTriangleStrip(dst: [*c]rl.Image, points: [*c]const rl.Vector2, pointCount: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn ImageDraw(dst: [*c]rl.Image, src: rl.Image, srcRec: rl.Rectangle, dstRec: rl.Rectangle, tint: rl.Color) void;
|
||||
pub extern "c" fn ImageDrawText(dst: [*c]rl.Image, text: [*c]const u8, posX: c_int, posY: c_int, fontSize: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn ImageDrawTextEx(dst: [*c]rl.Image, font: rl.Font, text: [*c]const u8, position: rl.Vector2, fontSize: f32, spacing: f32, tint: rl.Color) void;
|
||||
pub extern "c" fn LoadTexture(fileName: [*c]const u8) rl.Texture2D;
|
||||
pub extern "c" fn LoadTextureFromImage(image: rl.Image) rl.Texture2D;
|
||||
pub extern "c" fn LoadTextureCubemap(image: rl.Image, layout: rl.CubemapLayout) rl.TextureCubemap;
|
||||
pub extern "c" fn LoadRenderTexture(width: c_int, height: c_int) rl.RenderTexture2D;
|
||||
pub extern "c" fn IsTextureValid(texture: rl.Texture2D) bool;
|
||||
pub extern "c" fn UnloadTexture(texture: rl.Texture2D) void;
|
||||
pub extern "c" fn IsRenderTextureValid(target: rl.RenderTexture2D) bool;
|
||||
pub extern "c" fn UnloadRenderTexture(target: rl.RenderTexture2D) void;
|
||||
pub extern "c" fn UpdateTexture(texture: rl.Texture2D, pixels: *const anyopaque) void;
|
||||
pub extern "c" fn UpdateTextureRec(texture: rl.Texture2D, rec: rl.Rectangle, pixels: *const anyopaque) void;
|
||||
pub extern "c" fn GenTextureMipmaps(texture: [*c]rl.Texture2D) void;
|
||||
pub extern "c" fn SetTextureFilter(texture: rl.Texture2D, filter: rl.TextureFilter) void;
|
||||
pub extern "c" fn SetTextureWrap(texture: rl.Texture2D, wrap: rl.TextureWrap) void;
|
||||
pub extern "c" fn DrawTexture(texture: rl.Texture2D, posX: c_int, posY: c_int, tint: rl.Color) void;
|
||||
pub extern "c" fn DrawTextureV(texture: rl.Texture2D, position: rl.Vector2, tint: rl.Color) void;
|
||||
pub extern "c" fn DrawTextureEx(texture: rl.Texture2D, position: rl.Vector2, rotation: f32, scale: f32, tint: rl.Color) void;
|
||||
pub extern "c" fn DrawTextureRec(texture: rl.Texture2D, source: rl.Rectangle, position: rl.Vector2, tint: rl.Color) void;
|
||||
pub extern "c" fn DrawTexturePro(texture: rl.Texture2D, source: rl.Rectangle, dest: rl.Rectangle, origin: rl.Vector2, rotation: f32, tint: rl.Color) void;
|
||||
pub extern "c" fn DrawTextureNPatch(texture: rl.Texture2D, nPatchInfo: rl.NPatchInfo, dest: rl.Rectangle, origin: rl.Vector2, rotation: f32, tint: rl.Color) void;
|
||||
pub extern "c" fn ColorIsEqual(col1: rl.Color, col2: rl.Color) bool;
|
||||
pub extern "c" fn Fade(color: rl.Color, alpha: f32) rl.Color;
|
||||
pub extern "c" fn ColorToInt(color: rl.Color) c_int;
|
||||
pub extern "c" fn ColorNormalize(color: rl.Color) rl.Vector4;
|
||||
pub extern "c" fn ColorFromNormalized(normalized: rl.Vector4) rl.Color;
|
||||
pub extern "c" fn ColorToHSV(color: rl.Color) rl.Vector3;
|
||||
pub extern "c" fn ColorFromHSV(hue: f32, saturation: f32, value: f32) rl.Color;
|
||||
pub extern "c" fn ColorTint(color: rl.Color, tint: rl.Color) rl.Color;
|
||||
pub extern "c" fn ColorBrightness(color: rl.Color, factor: f32) rl.Color;
|
||||
pub extern "c" fn ColorContrast(color: rl.Color, contrast: f32) rl.Color;
|
||||
pub extern "c" fn ColorAlpha(color: rl.Color, alpha: f32) rl.Color;
|
||||
pub extern "c" fn ColorAlphaBlend(dst: rl.Color, src: rl.Color, tint: rl.Color) rl.Color;
|
||||
pub extern "c" fn ColorLerp(color1: rl.Color, color2: rl.Color, factor: f32) rl.Color;
|
||||
pub extern "c" fn GetColor(hexValue: c_uint) rl.Color;
|
||||
pub extern "c" fn GetPixelColor(srcPtr: *anyopaque, format: rl.PixelFormat) rl.Color;
|
||||
pub extern "c" fn SetPixelColor(dstPtr: *anyopaque, color: rl.Color, format: rl.PixelFormat) void;
|
||||
pub extern "c" fn GetPixelDataSize(width: c_int, height: c_int, format: rl.PixelFormat) c_int;
|
||||
pub extern "c" fn GetFontDefault() rl.Font;
|
||||
pub extern "c" fn LoadFont(fileName: [*c]const u8) rl.Font;
|
||||
pub extern "c" fn LoadFontEx(fileName: [*c]const u8, fontSize: c_int, codepoints: [*c]const c_int, codepointCount: c_int) rl.Font;
|
||||
pub extern "c" fn LoadFontFromImage(image: rl.Image, key: rl.Color, firstChar: c_int) rl.Font;
|
||||
pub extern "c" fn LoadFontFromMemory(fileType: [*c]const u8, fileData: [*c]const u8, dataSize: c_int, fontSize: c_int, codepoints: [*c]const c_int, codepointCount: c_int) rl.Font;
|
||||
pub extern "c" fn IsFontValid(font: rl.Font) bool;
|
||||
pub extern "c" fn LoadFontData(fileData: [*c]const u8, dataSize: c_int, fontSize: c_int, codepoints: [*c]const c_int, codepointCount: c_int, ty: rl.FontType, glyphCount: [*c]c_int) [*c]rl.GlyphInfo;
|
||||
pub extern "c" fn GenImageFontAtlas(glyphs: [*c]const rl.GlyphInfo, glyphRecs: [*c][*c]rl.Rectangle, glyphCount: c_int, fontSize: c_int, padding: c_int, packMethod: c_int) rl.Image;
|
||||
pub extern "c" fn UnloadFontData(glyphs: [*c]rl.GlyphInfo, glyphCount: c_int) void;
|
||||
pub extern "c" fn UnloadFont(font: rl.Font) void;
|
||||
pub extern "c" fn ExportFontAsCode(font: rl.Font, fileName: [*c]const u8) bool;
|
||||
pub extern "c" fn DrawFPS(posX: c_int, posY: c_int) void;
|
||||
pub extern "c" fn DrawText(text: [*c]const u8, posX: c_int, posY: c_int, fontSize: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawTextEx(font: rl.Font, text: [*c]const u8, position: rl.Vector2, fontSize: f32, spacing: f32, tint: rl.Color) void;
|
||||
pub extern "c" fn DrawTextPro(font: rl.Font, text: [*c]const u8, position: rl.Vector2, origin: rl.Vector2, rotation: f32, fontSize: f32, spacing: f32, tint: rl.Color) void;
|
||||
pub extern "c" fn DrawTextCodepoint(font: rl.Font, codepoint: c_int, position: rl.Vector2, fontSize: f32, tint: rl.Color) void;
|
||||
pub extern "c" fn DrawTextCodepoints(font: rl.Font, codepoints: [*c]const c_int, codepointCount: c_int, position: rl.Vector2, fontSize: f32, spacing: f32, tint: rl.Color) void;
|
||||
pub extern "c" fn SetTextLineSpacing(spacing: c_int) void;
|
||||
pub extern "c" fn MeasureText(text: [*c]const u8, fontSize: c_int) c_int;
|
||||
pub extern "c" fn MeasureTextEx(font: rl.Font, text: [*c]const u8, fontSize: f32, spacing: f32) rl.Vector2;
|
||||
pub extern "c" fn MeasureTextCodepoints(font: rl.Font, codepoints: [*c]const c_int, length: c_int, fontSize: f32, spacing: f32) rl.Vector2;
|
||||
pub extern "c" fn GetGlyphIndex(font: rl.Font, codepoint: c_int) c_int;
|
||||
pub extern "c" fn GetGlyphInfo(font: rl.Font, codepoint: c_int) rl.GlyphInfo;
|
||||
pub extern "c" fn GetGlyphAtlasRec(font: rl.Font, codepoint: c_int) rl.Rectangle;
|
||||
pub extern "c" fn LoadUTF8(codepoints: [*c]const c_int, length: c_int) [*c]u8;
|
||||
pub extern "c" fn UnloadUTF8(text: [*c]u8) void;
|
||||
pub extern "c" fn LoadCodepoints(text: [*c]const u8, count: [*c]c_int) [*c]c_int;
|
||||
pub extern "c" fn UnloadCodepoints(codepoints: [*c]c_int) void;
|
||||
pub extern "c" fn GetCodepointCount(text: [*c]const u8) c_int;
|
||||
pub extern "c" fn GetCodepoint(text: [*c]const u8, codepointSize: [*c]c_int) c_int;
|
||||
pub extern "c" fn GetCodepointNext(text: [*c]const u8, codepointSize: [*c]c_int) c_int;
|
||||
pub extern "c" fn GetCodepointPrevious(text: [*c]const u8, codepointSize: [*c]c_int) c_int;
|
||||
pub extern "c" fn CodepointToUTF8(codepoint: c_int, utf8Size: [*c]c_int) [*c]const u8;
|
||||
pub extern "c" fn LoadTextLines(text: [*c]const u8, count: [*c]c_int) [*c][*c]u8;
|
||||
pub extern "c" fn UnloadTextLines(text: [*c][*c]u8, lineCount: c_int) void;
|
||||
pub extern "c" fn TextCopy(dst: [*c]u8, src: [*c]const u8) c_int;
|
||||
pub extern "c" fn TextIsEqual(text1: [*c]const u8, text2: [*c]const u8) bool;
|
||||
pub extern "c" fn TextLength(text: [*c]const u8) c_uint;
|
||||
pub extern "c" fn TextFormat(text: [*c]const u8, ...) [*c]const u8;
|
||||
pub extern "c" fn TextSubtext(text: [*c]const u8, position: c_int, length: c_int) [*c]const u8;
|
||||
pub extern "c" fn TextRemoveSpaces(text: [*c]const u8) [*c]const u8;
|
||||
pub extern "c" fn GetTextBetween(text: [*c]const u8, begin: [*c]const u8, end: [*c]const u8) [*c]u8;
|
||||
pub extern "c" fn TextReplace(text: [*c]const u8, search: [*c]const u8, replacement: [*c]const u8) [*c]u8;
|
||||
pub extern "c" fn TextReplaceAlloc(text: [*c]const u8, search: [*c]const u8, replacement: [*c]const u8) [*c]u8;
|
||||
pub extern "c" fn TextReplaceBetween(text: [*c]const u8, begin: [*c]const u8, end: [*c]const u8, replacement: [*c]const u8) [*c]u8;
|
||||
pub extern "c" fn TextReplaceBetweenAlloc(text: [*c]const u8, begin: [*c]const u8, end: [*c]const u8, replacement: [*c]const u8) [*c]u8;
|
||||
pub extern "c" fn TextInsert(text: [*c]const u8, insert: [*c]const u8, position: c_int) [*c]u8;
|
||||
pub extern "c" fn TextInsertAlloc(text: [*c]const u8, insert: [*c]const u8, position: c_int) [*c]u8;
|
||||
pub extern "c" fn TextJoin(textList: [*c][*c]u8, count: c_int, delimiter: [*c]const u8) [*c]u8;
|
||||
pub extern "c" fn TextSplit(text: [*c]const u8, delimiter: u8, count: [*c]c_int) [*c][*c]u8;
|
||||
pub extern "c" fn TextAppend(text: [*c]u8, append: [*c]const u8, position: [*c]c_int) void;
|
||||
pub extern "c" fn TextFindIndex(text: [*c]const u8, search: [*c]const u8) c_int;
|
||||
pub extern "c" fn TextToUpper(text: [*c]const u8) [*c]u8;
|
||||
pub extern "c" fn TextToLower(text: [*c]const u8) [*c]u8;
|
||||
pub extern "c" fn TextToPascal(text: [*c]const u8) [*c]u8;
|
||||
pub extern "c" fn TextToSnake(text: [*c]const u8) [*c]u8;
|
||||
pub extern "c" fn TextToCamel(text: [*c]const u8) [*c]u8;
|
||||
pub extern "c" fn TextToInteger(text: [*c]const u8) c_int;
|
||||
pub extern "c" fn TextToFloat(text: [*c]const u8) f32;
|
||||
pub extern "c" fn DrawLine3D(startPos: rl.Vector3, endPos: rl.Vector3, color: rl.Color) void;
|
||||
pub extern "c" fn DrawPoint3D(position: rl.Vector3, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCircle3D(center: rl.Vector3, radius: f32, rotationAxis: rl.Vector3, rotationAngle: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawTriangle3D(v1: rl.Vector3, v2: rl.Vector3, v3: rl.Vector3, color: rl.Color) void;
|
||||
pub extern "c" fn DrawTriangleStrip3D(points: [*c]const rl.Vector3, pointCount: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCube(position: rl.Vector3, width: f32, height: f32, length: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCubeV(position: rl.Vector3, size: rl.Vector3, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCubeWires(position: rl.Vector3, width: f32, height: f32, length: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCubeWiresV(position: rl.Vector3, size: rl.Vector3, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSphere(centerPos: rl.Vector3, radius: f32, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSphereEx(centerPos: rl.Vector3, radius: f32, rings: c_int, slices: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawSphereWires(centerPos: rl.Vector3, radius: f32, rings: c_int, slices: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCylinder(position: rl.Vector3, radiusTop: f32, radiusBottom: f32, height: f32, slices: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCylinderEx(startPos: rl.Vector3, endPos: rl.Vector3, startRadius: f32, endRadius: f32, sides: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCylinderWires(position: rl.Vector3, radiusTop: f32, radiusBottom: f32, height: f32, slices: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCylinderWiresEx(startPos: rl.Vector3, endPos: rl.Vector3, startRadius: f32, endRadius: f32, sides: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCapsule(startPos: rl.Vector3, endPos: rl.Vector3, radius: f32, slices: c_int, rings: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawCapsuleWires(startPos: rl.Vector3, endPos: rl.Vector3, radius: f32, slices: c_int, rings: c_int, color: rl.Color) void;
|
||||
pub extern "c" fn DrawPlane(centerPos: rl.Vector3, size: rl.Vector2, color: rl.Color) void;
|
||||
pub extern "c" fn DrawRay(ray: rl.Ray, color: rl.Color) void;
|
||||
pub extern "c" fn DrawGrid(slices: c_int, spacing: f32) void;
|
||||
pub extern "c" fn LoadModel(fileName: [*c]const u8) rl.Model;
|
||||
pub extern "c" fn LoadModelFromMesh(mesh: rl.Mesh) rl.Model;
|
||||
pub extern "c" fn IsModelValid(model: rl.Model) bool;
|
||||
pub extern "c" fn UnloadModel(model: rl.Model) void;
|
||||
pub extern "c" fn GetModelBoundingBox(model: rl.Model) rl.BoundingBox;
|
||||
pub extern "c" fn DrawModel(model: rl.Model, position: rl.Vector3, scale: f32, tint: rl.Color) void;
|
||||
pub extern "c" fn DrawModelEx(model: rl.Model, position: rl.Vector3, rotationAxis: rl.Vector3, rotationAngle: f32, scale: rl.Vector3, tint: rl.Color) void;
|
||||
pub extern "c" fn DrawModelWires(model: rl.Model, position: rl.Vector3, scale: f32, tint: rl.Color) void;
|
||||
pub extern "c" fn DrawModelWiresEx(model: rl.Model, position: rl.Vector3, rotationAxis: rl.Vector3, rotationAngle: f32, scale: rl.Vector3, tint: rl.Color) void;
|
||||
pub extern "c" fn DrawBoundingBox(box: rl.BoundingBox, color: rl.Color) void;
|
||||
pub extern "c" fn DrawBillboard(camera: rl.Camera, texture: rl.Texture2D, position: rl.Vector3, scale: f32, tint: rl.Color) void;
|
||||
pub extern "c" fn DrawBillboardRec(camera: rl.Camera, texture: rl.Texture2D, source: rl.Rectangle, position: rl.Vector3, size: rl.Vector2, tint: rl.Color) void;
|
||||
pub extern "c" fn DrawBillboardPro(camera: rl.Camera, texture: rl.Texture2D, source: rl.Rectangle, position: rl.Vector3, up: rl.Vector3, size: rl.Vector2, origin: rl.Vector2, rotation: f32, tint: rl.Color) void;
|
||||
pub extern "c" fn UploadMesh(mesh: [*c]rl.Mesh, dynamic: bool) void;
|
||||
pub extern "c" fn UpdateMeshBuffer(mesh: rl.Mesh, index: c_int, data: *const anyopaque, dataSize: c_int, offset: c_int) void;
|
||||
pub extern "c" fn UnloadMesh(mesh: rl.Mesh) void;
|
||||
pub extern "c" fn DrawMesh(mesh: rl.Mesh, material: rl.Material, transform: rl.Matrix) void;
|
||||
pub extern "c" fn DrawMeshInstanced(mesh: rl.Mesh, material: rl.Material, transforms: [*c]const rl.Matrix, instances: c_int) void;
|
||||
pub extern "c" fn GetMeshBoundingBox(mesh: rl.Mesh) rl.BoundingBox;
|
||||
pub extern "c" fn GenMeshTangents(mesh: [*c]rl.Mesh) void;
|
||||
pub extern "c" fn ExportMesh(mesh: rl.Mesh, fileName: [*c]const u8) bool;
|
||||
pub extern "c" fn ExportMeshAsCode(mesh: rl.Mesh, fileName: [*c]const u8) bool;
|
||||
pub extern "c" fn GenMeshPoly(sides: c_int, radius: f32) rl.Mesh;
|
||||
pub extern "c" fn GenMeshPlane(width: f32, length: f32, resX: c_int, resZ: c_int) rl.Mesh;
|
||||
pub extern "c" fn GenMeshCube(width: f32, height: f32, length: f32) rl.Mesh;
|
||||
pub extern "c" fn GenMeshSphere(radius: f32, rings: c_int, slices: c_int) rl.Mesh;
|
||||
pub extern "c" fn GenMeshHemiSphere(radius: f32, rings: c_int, slices: c_int) rl.Mesh;
|
||||
pub extern "c" fn GenMeshCylinder(radius: f32, height: f32, slices: c_int) rl.Mesh;
|
||||
pub extern "c" fn GenMeshCone(radius: f32, height: f32, slices: c_int) rl.Mesh;
|
||||
pub extern "c" fn GenMeshTorus(radius: f32, size: f32, radSeg: c_int, sides: c_int) rl.Mesh;
|
||||
pub extern "c" fn GenMeshKnot(radius: f32, size: f32, radSeg: c_int, sides: c_int) rl.Mesh;
|
||||
pub extern "c" fn GenMeshHeightmap(heightmap: rl.Image, size: rl.Vector3) rl.Mesh;
|
||||
pub extern "c" fn GenMeshCubicmap(cubicmap: rl.Image, cubeSize: rl.Vector3) rl.Mesh;
|
||||
pub extern "c" fn LoadMaterials(fileName: [*c]const u8, materialCount: [*c]c_int) [*c]rl.Material;
|
||||
pub extern "c" fn LoadMaterialDefault() rl.Material;
|
||||
pub extern "c" fn IsMaterialValid(material: rl.Material) bool;
|
||||
pub extern "c" fn UnloadMaterial(material: rl.Material) void;
|
||||
pub extern "c" fn SetMaterialTexture(material: [*c]rl.Material, mapType: rl.MaterialMapIndex, texture: rl.Texture2D) void;
|
||||
pub extern "c" fn SetModelMeshMaterial(model: [*c]rl.Model, meshId: c_int, materialId: c_int) void;
|
||||
pub extern "c" fn LoadModelAnimations(fileName: [*c]const u8, animCount: [*c]c_int) [*c]rl.ModelAnimation;
|
||||
pub extern "c" fn UpdateModelAnimation(model: rl.Model, anim: rl.ModelAnimation, frame: f32) void;
|
||||
pub extern "c" fn UpdateModelAnimationEx(model: rl.Model, animA: rl.ModelAnimation, frameA: f32, animB: rl.ModelAnimation, frameB: f32, blend: f32) void;
|
||||
pub extern "c" fn UnloadModelAnimations(animations: [*c]rl.ModelAnimation, animCount: c_int) void;
|
||||
pub extern "c" fn IsModelAnimationValid(model: rl.Model, anim: rl.ModelAnimation) bool;
|
||||
pub extern "c" fn CheckCollisionSpheres(center1: rl.Vector3, radius1: f32, center2: rl.Vector3, radius2: f32) bool;
|
||||
pub extern "c" fn CheckCollisionBoxes(box1: rl.BoundingBox, box2: rl.BoundingBox) bool;
|
||||
pub extern "c" fn CheckCollisionBoxSphere(box: rl.BoundingBox, center: rl.Vector3, radius: f32) bool;
|
||||
pub extern "c" fn GetRayCollisionSphere(ray: rl.Ray, center: rl.Vector3, radius: f32) rl.RayCollision;
|
||||
pub extern "c" fn GetRayCollisionBox(ray: rl.Ray, box: rl.BoundingBox) rl.RayCollision;
|
||||
pub extern "c" fn GetRayCollisionMesh(ray: rl.Ray, mesh: rl.Mesh, transform: rl.Matrix) rl.RayCollision;
|
||||
pub extern "c" fn GetRayCollisionTriangle(ray: rl.Ray, p1: rl.Vector3, p2: rl.Vector3, p3: rl.Vector3) rl.RayCollision;
|
||||
pub extern "c" fn GetRayCollisionQuad(ray: rl.Ray, p1: rl.Vector3, p2: rl.Vector3, p3: rl.Vector3, p4: rl.Vector3) rl.RayCollision;
|
||||
pub extern "c" fn InitAudioDevice() void;
|
||||
pub extern "c" fn CloseAudioDevice() void;
|
||||
pub extern "c" fn IsAudioDeviceReady() bool;
|
||||
pub extern "c" fn SetMasterVolume(volume: f32) void;
|
||||
pub extern "c" fn GetMasterVolume() f32;
|
||||
pub extern "c" fn LoadWave(fileName: [*c]const u8) rl.Wave;
|
||||
pub extern "c" fn LoadWaveFromMemory(fileType: [*c]const u8, fileData: [*c]const u8, dataSize: c_int) rl.Wave;
|
||||
pub extern "c" fn IsWaveValid(wave: rl.Wave) bool;
|
||||
pub extern "c" fn LoadSound(fileName: [*c]const u8) rl.Sound;
|
||||
pub extern "c" fn LoadSoundFromWave(wave: rl.Wave) rl.Sound;
|
||||
pub extern "c" fn LoadSoundAlias(source: rl.Sound) rl.Sound;
|
||||
pub extern "c" fn IsSoundValid(sound: rl.Sound) bool;
|
||||
pub extern "c" fn UpdateSound(sound: rl.Sound, data: *const anyopaque, sampleCount: c_int) void;
|
||||
pub extern "c" fn UnloadWave(wave: rl.Wave) void;
|
||||
pub extern "c" fn UnloadSound(sound: rl.Sound) void;
|
||||
pub extern "c" fn UnloadSoundAlias(alias: rl.Sound) void;
|
||||
pub extern "c" fn ExportWave(wave: rl.Wave, fileName: [*c]const u8) bool;
|
||||
pub extern "c" fn ExportWaveAsCode(wave: rl.Wave, fileName: [*c]const u8) bool;
|
||||
pub extern "c" fn PlaySound(sound: rl.Sound) void;
|
||||
pub extern "c" fn StopSound(sound: rl.Sound) void;
|
||||
pub extern "c" fn PauseSound(sound: rl.Sound) void;
|
||||
pub extern "c" fn ResumeSound(sound: rl.Sound) void;
|
||||
pub extern "c" fn IsSoundPlaying(sound: rl.Sound) bool;
|
||||
pub extern "c" fn SetSoundVolume(sound: rl.Sound, volume: f32) void;
|
||||
pub extern "c" fn SetSoundPitch(sound: rl.Sound, pitch: f32) void;
|
||||
pub extern "c" fn SetSoundPan(sound: rl.Sound, pan: f32) void;
|
||||
pub extern "c" fn WaveCopy(wave: rl.Wave) rl.Wave;
|
||||
pub extern "c" fn WaveCrop(wave: [*c]rl.Wave, initFrame: c_int, finalFrame: c_int) void;
|
||||
pub extern "c" fn WaveFormat(wave: [*c]rl.Wave, sampleRate: c_int, sampleSize: c_int, channels: c_int) void;
|
||||
pub extern "c" fn LoadWaveSamples(wave: rl.Wave) [*c]f32;
|
||||
pub extern "c" fn UnloadWaveSamples(samples: [*c]f32) void;
|
||||
pub extern "c" fn LoadMusicStream(fileName: [*c]const u8) rl.Music;
|
||||
pub extern "c" fn LoadMusicStreamFromMemory(fileType: [*c]const u8, data: [*c]const u8, dataSize: c_int) rl.Music;
|
||||
pub extern "c" fn IsMusicValid(music: rl.Music) bool;
|
||||
pub extern "c" fn UnloadMusicStream(music: rl.Music) void;
|
||||
pub extern "c" fn PlayMusicStream(music: rl.Music) void;
|
||||
pub extern "c" fn IsMusicStreamPlaying(music: rl.Music) bool;
|
||||
pub extern "c" fn UpdateMusicStream(music: rl.Music) void;
|
||||
pub extern "c" fn StopMusicStream(music: rl.Music) void;
|
||||
pub extern "c" fn PauseMusicStream(music: rl.Music) void;
|
||||
pub extern "c" fn ResumeMusicStream(music: rl.Music) void;
|
||||
pub extern "c" fn SeekMusicStream(music: rl.Music, position: f32) void;
|
||||
pub extern "c" fn SetMusicVolume(music: rl.Music, volume: f32) void;
|
||||
pub extern "c" fn SetMusicPitch(music: rl.Music, pitch: f32) void;
|
||||
pub extern "c" fn SetMusicPan(music: rl.Music, pan: f32) void;
|
||||
pub extern "c" fn GetMusicTimeLength(music: rl.Music) f32;
|
||||
pub extern "c" fn GetMusicTimePlayed(music: rl.Music) f32;
|
||||
pub extern "c" fn LoadAudioStream(sampleRate: c_uint, sampleSize: c_uint, channels: c_uint) rl.AudioStream;
|
||||
pub extern "c" fn IsAudioStreamValid(stream: rl.AudioStream) bool;
|
||||
pub extern "c" fn UnloadAudioStream(stream: rl.AudioStream) void;
|
||||
pub extern "c" fn UpdateAudioStream(stream: rl.AudioStream, data: *const anyopaque, frameCount: c_int) void;
|
||||
pub extern "c" fn IsAudioStreamProcessed(stream: rl.AudioStream) bool;
|
||||
pub extern "c" fn PlayAudioStream(stream: rl.AudioStream) void;
|
||||
pub extern "c" fn PauseAudioStream(stream: rl.AudioStream) void;
|
||||
pub extern "c" fn ResumeAudioStream(stream: rl.AudioStream) void;
|
||||
pub extern "c" fn IsAudioStreamPlaying(stream: rl.AudioStream) bool;
|
||||
pub extern "c" fn StopAudioStream(stream: rl.AudioStream) void;
|
||||
pub extern "c" fn SetAudioStreamVolume(stream: rl.AudioStream, volume: f32) void;
|
||||
pub extern "c" fn SetAudioStreamPitch(stream: rl.AudioStream, pitch: f32) void;
|
||||
pub extern "c" fn SetAudioStreamPan(stream: rl.AudioStream, pan: f32) void;
|
||||
pub extern "c" fn SetAudioStreamBufferSizeDefault(size: c_int) void;
|
||||
pub extern "c" fn SetAudioStreamCallback(stream: rl.AudioStream, callback: rl.AudioCallback) void;
|
||||
pub extern "c" fn AttachAudioStreamProcessor(stream: rl.AudioStream, processor: rl.AudioCallback) void;
|
||||
pub extern "c" fn DetachAudioStreamProcessor(stream: rl.AudioStream, processor: rl.AudioCallback) void;
|
||||
pub extern "c" fn AttachAudioMixedProcessor(processor: rl.AudioCallback) void;
|
||||
pub extern "c" fn DetachAudioMixedProcessor(processor: rl.AudioCallback) void;
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,151 @@
|
||||
// raylib-zig (c) Nikolas Wipper 2023
|
||||
|
||||
const rl = @import("raylib.zig");
|
||||
const rlm = @import("raymath.zig");
|
||||
|
||||
pub extern "c" fn Clamp(value: f32, min: f32, max: f32) f32;
|
||||
pub extern "c" fn Lerp(start: f32, end: f32, amount: f32) f32;
|
||||
pub extern "c" fn Normalize(value: f32, start: f32, end: f32) f32;
|
||||
pub extern "c" fn Remap(value: f32, inputStart: f32, inputEnd: f32, outputStart: f32, outputEnd: f32) f32;
|
||||
pub extern "c" fn Wrap(value: f32, min: f32, max: f32) f32;
|
||||
pub extern "c" fn FloatEquals(x: f32, y: f32) c_int;
|
||||
pub extern "c" fn Vector2Zero() rl.Vector2;
|
||||
pub extern "c" fn Vector2One() rl.Vector2;
|
||||
pub extern "c" fn Vector2Add(v1: rl.Vector2, v2: rl.Vector2) rl.Vector2;
|
||||
pub extern "c" fn Vector2AddValue(v: rl.Vector2, add: f32) rl.Vector2;
|
||||
pub extern "c" fn Vector2Subtract(v1: rl.Vector2, v2: rl.Vector2) rl.Vector2;
|
||||
pub extern "c" fn Vector2SubtractValue(v: rl.Vector2, sub: f32) rl.Vector2;
|
||||
pub extern "c" fn Vector2Length(v: rl.Vector2) f32;
|
||||
pub extern "c" fn Vector2LengthSqr(v: rl.Vector2) f32;
|
||||
pub extern "c" fn Vector2DotProduct(v1: rl.Vector2, v2: rl.Vector2) f32;
|
||||
pub extern "c" fn Vector2CrossProduct(v1: rl.Vector2, v2: rl.Vector2) f32;
|
||||
pub extern "c" fn Vector2Distance(v1: rl.Vector2, v2: rl.Vector2) f32;
|
||||
pub extern "c" fn Vector2DistanceSqr(v1: rl.Vector2, v2: rl.Vector2) f32;
|
||||
pub extern "c" fn Vector2Angle(v1: rl.Vector2, v2: rl.Vector2) f32;
|
||||
pub extern "c" fn Vector2LineAngle(start: rl.Vector2, end: rl.Vector2) f32;
|
||||
pub extern "c" fn Vector2Scale(v: rl.Vector2, scale: f32) rl.Vector2;
|
||||
pub extern "c" fn Vector2Multiply(v1: rl.Vector2, v2: rl.Vector2) rl.Vector2;
|
||||
pub extern "c" fn Vector2Negate(v: rl.Vector2) rl.Vector2;
|
||||
pub extern "c" fn Vector2Divide(v1: rl.Vector2, v2: rl.Vector2) rl.Vector2;
|
||||
pub extern "c" fn Vector2Normalize(v: rl.Vector2) rl.Vector2;
|
||||
pub extern "c" fn Vector2Transform(v: rl.Vector2, mat: rl.Matrix) rl.Vector2;
|
||||
pub extern "c" fn Vector2Lerp(v1: rl.Vector2, v2: rl.Vector2, amount: f32) rl.Vector2;
|
||||
pub extern "c" fn Vector2Reflect(v: rl.Vector2, normal: rl.Vector2) rl.Vector2;
|
||||
pub extern "c" fn Vector2Min(v1: rl.Vector2, v2: rl.Vector2) rl.Vector2;
|
||||
pub extern "c" fn Vector2Max(v1: rl.Vector2, v2: rl.Vector2) rl.Vector2;
|
||||
pub extern "c" fn Vector2Rotate(v: rl.Vector2, angle: f32) rl.Vector2;
|
||||
pub extern "c" fn Vector2MoveTowards(v: rl.Vector2, target: rl.Vector2, maxDistance: f32) rl.Vector2;
|
||||
pub extern "c" fn Vector2Invert(v: rl.Vector2) rl.Vector2;
|
||||
pub extern "c" fn Vector2Clamp(v: rl.Vector2, min: rl.Vector2, max: rl.Vector2) rl.Vector2;
|
||||
pub extern "c" fn Vector2ClampValue(v: rl.Vector2, min: f32, max: f32) rl.Vector2;
|
||||
pub extern "c" fn Vector2Equals(p: rl.Vector2, q: rl.Vector2) c_int;
|
||||
pub extern "c" fn Vector2Refract(v: rl.Vector2, n: rl.Vector2, r: f32) rl.Vector2;
|
||||
pub extern "c" fn Vector3Zero() rl.Vector3;
|
||||
pub extern "c" fn Vector3One() rl.Vector3;
|
||||
pub extern "c" fn Vector3Add(v1: rl.Vector3, v2: rl.Vector3) rl.Vector3;
|
||||
pub extern "c" fn Vector3AddValue(v: rl.Vector3, add: f32) rl.Vector3;
|
||||
pub extern "c" fn Vector3Subtract(v1: rl.Vector3, v2: rl.Vector3) rl.Vector3;
|
||||
pub extern "c" fn Vector3SubtractValue(v: rl.Vector3, sub: f32) rl.Vector3;
|
||||
pub extern "c" fn Vector3Scale(v: rl.Vector3, scalar: f32) rl.Vector3;
|
||||
pub extern "c" fn Vector3Multiply(v1: rl.Vector3, v2: rl.Vector3) rl.Vector3;
|
||||
pub extern "c" fn Vector3CrossProduct(v1: rl.Vector3, v2: rl.Vector3) rl.Vector3;
|
||||
pub extern "c" fn Vector3Perpendicular(v: rl.Vector3) rl.Vector3;
|
||||
pub extern "c" fn Vector3Length(v: rl.Vector3) f32;
|
||||
pub extern "c" fn Vector3LengthSqr(v: rl.Vector3) f32;
|
||||
pub extern "c" fn Vector3DotProduct(v1: rl.Vector3, v2: rl.Vector3) f32;
|
||||
pub extern "c" fn Vector3Distance(v1: rl.Vector3, v2: rl.Vector3) f32;
|
||||
pub extern "c" fn Vector3DistanceSqr(v1: rl.Vector3, v2: rl.Vector3) f32;
|
||||
pub extern "c" fn Vector3Angle(v1: rl.Vector3, v2: rl.Vector3) f32;
|
||||
pub extern "c" fn Vector3Negate(v: rl.Vector3) rl.Vector3;
|
||||
pub extern "c" fn Vector3Divide(v1: rl.Vector3, v2: rl.Vector3) rl.Vector3;
|
||||
pub extern "c" fn Vector3Normalize(v: rl.Vector3) rl.Vector3;
|
||||
pub extern "c" fn Vector3Project(v1: rl.Vector3, v2: rl.Vector3) rl.Vector3;
|
||||
pub extern "c" fn Vector3Reject(v1: rl.Vector3, v2: rl.Vector3) rl.Vector3;
|
||||
pub extern "c" fn Vector3OrthoNormalize(v1: [*c]rl.Vector3, v2: [*c]rl.Vector3) void;
|
||||
pub extern "c" fn Vector3Transform(v: rl.Vector3, mat: rl.Matrix) rl.Vector3;
|
||||
pub extern "c" fn Vector3RotateByQuaternion(v: rl.Vector3, q: rl.Quaternion) rl.Vector3;
|
||||
pub extern "c" fn Vector3RotateByAxisAngle(v: rl.Vector3, axis: rl.Vector3, angle: f32) rl.Vector3;
|
||||
pub extern "c" fn Vector3MoveTowards(v: rl.Vector3, target: rl.Vector3, maxDistance: f32) rl.Vector3;
|
||||
pub extern "c" fn Vector3Lerp(v1: rl.Vector3, v2: rl.Vector3, amount: f32) rl.Vector3;
|
||||
pub extern "c" fn Vector3CubicHermite(v1: rl.Vector3, tangent1: rl.Vector3, v2: rl.Vector3, tangent2: rl.Vector3, amount: f32) rl.Vector3;
|
||||
pub extern "c" fn Vector3Reflect(v: rl.Vector3, normal: rl.Vector3) rl.Vector3;
|
||||
pub extern "c" fn Vector3Min(v1: rl.Vector3, v2: rl.Vector3) rl.Vector3;
|
||||
pub extern "c" fn Vector3Max(v1: rl.Vector3, v2: rl.Vector3) rl.Vector3;
|
||||
pub extern "c" fn Vector3Barycenter(p: rl.Vector3, a: rl.Vector3, b: rl.Vector3, c: rl.Vector3) rl.Vector3;
|
||||
pub extern "c" fn Vector3Unproject(source: rl.Vector3, projection: rl.Matrix, view: rl.Matrix) rl.Vector3;
|
||||
pub extern "c" fn Vector3ToFloatV(v: rl.Vector3) rlm.float3;
|
||||
pub extern "c" fn Vector3Invert(v: rl.Vector3) rl.Vector3;
|
||||
pub extern "c" fn Vector3Clamp(v: rl.Vector3, min: rl.Vector3, max: rl.Vector3) rl.Vector3;
|
||||
pub extern "c" fn Vector3ClampValue(v: rl.Vector3, min: f32, max: f32) rl.Vector3;
|
||||
pub extern "c" fn Vector3Equals(p: rl.Vector3, q: rl.Vector3) c_int;
|
||||
pub extern "c" fn Vector3Refract(v: rl.Vector3, n: rl.Vector3, r: f32) rl.Vector3;
|
||||
pub extern "c" fn Vector4Zero() rl.Vector4;
|
||||
pub extern "c" fn Vector4One() rl.Vector4;
|
||||
pub extern "c" fn Vector4Add(v1: rl.Vector4, v2: rl.Vector4) rl.Vector4;
|
||||
pub extern "c" fn Vector4AddValue(v: rl.Vector4, add: f32) rl.Vector4;
|
||||
pub extern "c" fn Vector4Subtract(v1: rl.Vector4, v2: rl.Vector4) rl.Vector4;
|
||||
pub extern "c" fn Vector4SubtractValue(v: rl.Vector4, add: f32) rl.Vector4;
|
||||
pub extern "c" fn Vector4Length(v: rl.Vector4) f32;
|
||||
pub extern "c" fn Vector4LengthSqr(v: rl.Vector4) f32;
|
||||
pub extern "c" fn Vector4DotProduct(v1: rl.Vector4, v2: rl.Vector4) f32;
|
||||
pub extern "c" fn Vector4Distance(v1: rl.Vector4, v2: rl.Vector4) f32;
|
||||
pub extern "c" fn Vector4DistanceSqr(v1: rl.Vector4, v2: rl.Vector4) f32;
|
||||
pub extern "c" fn Vector4Scale(v: rl.Vector4, scale: f32) rl.Vector4;
|
||||
pub extern "c" fn Vector4Multiply(v1: rl.Vector4, v2: rl.Vector4) rl.Vector4;
|
||||
pub extern "c" fn Vector4Negate(v: rl.Vector4) rl.Vector4;
|
||||
pub extern "c" fn Vector4Divide(v1: rl.Vector4, v2: rl.Vector4) rl.Vector4;
|
||||
pub extern "c" fn Vector4Normalize(v: rl.Vector4) rl.Vector4;
|
||||
pub extern "c" fn Vector4Min(v1: rl.Vector4, v2: rl.Vector4) rl.Vector4;
|
||||
pub extern "c" fn Vector4Max(v1: rl.Vector4, v2: rl.Vector4) rl.Vector4;
|
||||
pub extern "c" fn Vector4Lerp(v1: rl.Vector4, v2: rl.Vector4, amount: f32) rl.Vector4;
|
||||
pub extern "c" fn Vector4MoveTowards(v: rl.Vector4, target: rl.Vector4, maxDistance: f32) rl.Vector4;
|
||||
pub extern "c" fn Vector4Invert(v: rl.Vector4) rl.Vector4;
|
||||
pub extern "c" fn Vector4Equals(p: rl.Vector4, q: rl.Vector4) c_int;
|
||||
pub extern "c" fn MatrixDeterminant(mat: rl.Matrix) f32;
|
||||
pub extern "c" fn MatrixTrace(mat: rl.Matrix) f32;
|
||||
pub extern "c" fn MatrixTranspose(mat: rl.Matrix) rl.Matrix;
|
||||
pub extern "c" fn MatrixInvert(mat: rl.Matrix) rl.Matrix;
|
||||
pub extern "c" fn MatrixIdentity() rl.Matrix;
|
||||
pub extern "c" fn MatrixAdd(left: rl.Matrix, right: rl.Matrix) rl.Matrix;
|
||||
pub extern "c" fn MatrixSubtract(left: rl.Matrix, right: rl.Matrix) rl.Matrix;
|
||||
pub extern "c" fn MatrixMultiply(left: rl.Matrix, right: rl.Matrix) rl.Matrix;
|
||||
pub extern "c" fn MatrixMultiplyValue(left: rl.Matrix, value: f32) rl.Matrix;
|
||||
pub extern "c" fn MatrixTranslate(x: f32, y: f32, z: f32) rl.Matrix;
|
||||
pub extern "c" fn MatrixRotate(axis: rl.Vector3, angle: f32) rl.Matrix;
|
||||
pub extern "c" fn MatrixRotateX(angle: f32) rl.Matrix;
|
||||
pub extern "c" fn MatrixRotateY(angle: f32) rl.Matrix;
|
||||
pub extern "c" fn MatrixRotateZ(angle: f32) rl.Matrix;
|
||||
pub extern "c" fn MatrixRotateXYZ(angle: rl.Vector3) rl.Matrix;
|
||||
pub extern "c" fn MatrixRotateZYX(angle: rl.Vector3) rl.Matrix;
|
||||
pub extern "c" fn MatrixScale(x: f32, y: f32, z: f32) rl.Matrix;
|
||||
pub extern "c" fn MatrixFrustum(left: f64, right: f64, bottom: f64, top: f64, nearPlane: f64, farPlane: f64) rl.Matrix;
|
||||
pub extern "c" fn MatrixPerspective(fovY: f64, aspect: f64, nearPlane: f64, farPlane: f64) rl.Matrix;
|
||||
pub extern "c" fn MatrixOrtho(left: f64, right: f64, bottom: f64, top: f64, nearPlane: f64, farPlane: f64) rl.Matrix;
|
||||
pub extern "c" fn MatrixLookAt(eye: rl.Vector3, target: rl.Vector3, up: rl.Vector3) rl.Matrix;
|
||||
pub extern "c" fn MatrixToFloatV(mat: rl.Matrix) rlm.float16;
|
||||
pub extern "c" fn QuaternionAdd(q1: rl.Quaternion, q2: rl.Quaternion) rl.Quaternion;
|
||||
pub extern "c" fn QuaternionAddValue(q: rl.Quaternion, add: f32) rl.Quaternion;
|
||||
pub extern "c" fn QuaternionSubtract(q1: rl.Quaternion, q2: rl.Quaternion) rl.Quaternion;
|
||||
pub extern "c" fn QuaternionSubtractValue(q: rl.Quaternion, sub: f32) rl.Quaternion;
|
||||
pub extern "c" fn QuaternionIdentity() rl.Quaternion;
|
||||
pub extern "c" fn QuaternionLength(q: rl.Quaternion) f32;
|
||||
pub extern "c" fn QuaternionNormalize(q: rl.Quaternion) rl.Quaternion;
|
||||
pub extern "c" fn QuaternionInvert(q: rl.Quaternion) rl.Quaternion;
|
||||
pub extern "c" fn QuaternionMultiply(q1: rl.Quaternion, q2: rl.Quaternion) rl.Quaternion;
|
||||
pub extern "c" fn QuaternionScale(q: rl.Quaternion, mul: f32) rl.Quaternion;
|
||||
pub extern "c" fn QuaternionDivide(q1: rl.Quaternion, q2: rl.Quaternion) rl.Quaternion;
|
||||
pub extern "c" fn QuaternionLerp(q1: rl.Quaternion, q2: rl.Quaternion, amount: f32) rl.Quaternion;
|
||||
pub extern "c" fn QuaternionNlerp(q1: rl.Quaternion, q2: rl.Quaternion, amount: f32) rl.Quaternion;
|
||||
pub extern "c" fn QuaternionSlerp(q1: rl.Quaternion, q2: rl.Quaternion, amount: f32) rl.Quaternion;
|
||||
pub extern "c" fn QuaternionCubicHermiteSpline(q1: rl.Quaternion, outTangent1: rl.Quaternion, q2: rl.Quaternion, inTangent2: rl.Quaternion, t: f32) rl.Quaternion;
|
||||
pub extern "c" fn QuaternionFromVector3ToVector3(from: rl.Vector3, to: rl.Vector3) rl.Quaternion;
|
||||
pub extern "c" fn QuaternionFromMatrix(mat: rl.Matrix) rl.Quaternion;
|
||||
pub extern "c" fn QuaternionToMatrix(q: rl.Quaternion) rl.Matrix;
|
||||
pub extern "c" fn QuaternionFromAxisAngle(axis: rl.Vector3, angle: f32) rl.Quaternion;
|
||||
pub extern "c" fn QuaternionToAxisAngle(q: rl.Quaternion, outAxis: [*c]rl.Vector3, outAngle: [*c]f32) void;
|
||||
pub extern "c" fn QuaternionFromEuler(pitch: f32, yaw: f32, roll: f32) rl.Quaternion;
|
||||
pub extern "c" fn QuaternionToEuler(q: rl.Quaternion) rl.Vector3;
|
||||
pub extern "c" fn QuaternionTransform(q: rl.Quaternion, mat: rl.Matrix) rl.Quaternion;
|
||||
pub extern "c" fn QuaternionEquals(p: rl.Quaternion, q: rl.Quaternion) c_int;
|
||||
pub extern "c" fn MatrixCompose(translation: rl.Vector3, rotation: rl.Quaternion, scale: rl.Vector3) rl.Matrix;
|
||||
pub extern "c" fn MatrixDecompose(mat: rl.Matrix, translation: [*c]rl.Vector3, rotation: [*c]rl.Quaternion, scale: [*c]rl.Vector3) void;
|
||||
@ -0,0 +1,609 @@
|
||||
// raylib-zig (c) Nikolas Wipper 2023
|
||||
|
||||
const rl = @import("raylib.zig");
|
||||
const std = @import("std");
|
||||
|
||||
pub const cdef = @import("raymath-ext.zig");
|
||||
|
||||
test {
|
||||
std.testing.refAllDecls(@This());
|
||||
std.testing.refAllDecls(cdef);
|
||||
}
|
||||
|
||||
const Matrix = rl.Matrix;
|
||||
const Quaternion = rl.Quaternion;
|
||||
const Vector2 = rl.Vector2;
|
||||
const Vector3 = rl.Vector3;
|
||||
const Vector4 = rl.Vector4;
|
||||
|
||||
pub const float3 = extern struct {
|
||||
v: [3]f32,
|
||||
};
|
||||
|
||||
pub const float16 = extern struct {
|
||||
v: [16]f32,
|
||||
};
|
||||
|
||||
pub fn clamp(value: f32, min: f32, max: f32) f32 {
|
||||
return cdef.Clamp(value, min, max);
|
||||
}
|
||||
|
||||
pub fn lerp(start: f32, end: f32, amount: f32) f32 {
|
||||
return cdef.Lerp(start, end, amount);
|
||||
}
|
||||
|
||||
pub fn normalize(value: f32, start: f32, end: f32) f32 {
|
||||
return cdef.Normalize(value, start, end);
|
||||
}
|
||||
|
||||
pub fn remap(value: f32, inputStart: f32, inputEnd: f32, outputStart: f32, outputEnd: f32) f32 {
|
||||
return cdef.Remap(value, inputStart, inputEnd, outputStart, outputEnd);
|
||||
}
|
||||
|
||||
pub fn wrap(value: f32, min: f32, max: f32) f32 {
|
||||
return cdef.Wrap(value, min, max);
|
||||
}
|
||||
|
||||
pub fn floatEquals(x: f32, y: f32) bool {
|
||||
return cdef.FloatEquals(x, y) == 1;
|
||||
}
|
||||
|
||||
pub fn vector2Zero() Vector2 {
|
||||
return cdef.Vector2Zero();
|
||||
}
|
||||
|
||||
pub fn vector2One() Vector2 {
|
||||
return cdef.Vector2One();
|
||||
}
|
||||
|
||||
pub fn vector2Add(v1: Vector2, v2: Vector2) Vector2 {
|
||||
return cdef.Vector2Add(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector2AddValue(v: Vector2, add: f32) Vector2 {
|
||||
return cdef.Vector2AddValue(v, add);
|
||||
}
|
||||
|
||||
pub fn vector2Subtract(v1: Vector2, v2: Vector2) Vector2 {
|
||||
return cdef.Vector2Subtract(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector2SubtractValue(v: Vector2, sub: f32) Vector2 {
|
||||
return cdef.Vector2SubtractValue(v, sub);
|
||||
}
|
||||
|
||||
pub fn vector2Length(v: Vector2) f32 {
|
||||
return cdef.Vector2Length(v);
|
||||
}
|
||||
|
||||
pub fn vector2LengthSqr(v: Vector2) f32 {
|
||||
return cdef.Vector2LengthSqr(v);
|
||||
}
|
||||
|
||||
pub fn vector2DotProduct(v1: Vector2, v2: Vector2) f32 {
|
||||
return cdef.Vector2DotProduct(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector2CrossProduct(v1: Vector2, v2: Vector2) f32 {
|
||||
return cdef.Vector2CrossProduct(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector2Distance(v1: Vector2, v2: Vector2) f32 {
|
||||
return cdef.Vector2Distance(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector2DistanceSqr(v1: Vector2, v2: Vector2) f32 {
|
||||
return cdef.Vector2DistanceSqr(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector2Angle(v1: Vector2, v2: Vector2) f32 {
|
||||
return cdef.Vector2Angle(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector2LineAngle(start: Vector2, end: Vector2) f32 {
|
||||
return cdef.Vector2LineAngle(start, end);
|
||||
}
|
||||
|
||||
pub fn vector2Scale(v: Vector2, scale: f32) Vector2 {
|
||||
return cdef.Vector2Scale(v, scale);
|
||||
}
|
||||
|
||||
pub fn vector2Multiply(v1: Vector2, v2: Vector2) Vector2 {
|
||||
return cdef.Vector2Multiply(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector2Negate(v: Vector2) Vector2 {
|
||||
return cdef.Vector2Negate(v);
|
||||
}
|
||||
|
||||
pub fn vector2Divide(v1: Vector2, v2: Vector2) Vector2 {
|
||||
return cdef.Vector2Divide(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector2Normalize(v: Vector2) Vector2 {
|
||||
return cdef.Vector2Normalize(v);
|
||||
}
|
||||
|
||||
pub fn vector2Transform(v: Vector2, mat: Matrix) Vector2 {
|
||||
return cdef.Vector2Transform(v, mat);
|
||||
}
|
||||
|
||||
pub fn vector2Lerp(v1: Vector2, v2: Vector2, amount: f32) Vector2 {
|
||||
return cdef.Vector2Lerp(v1, v2, amount);
|
||||
}
|
||||
|
||||
pub fn vector2Reflect(v: Vector2, normal: Vector2) Vector2 {
|
||||
return cdef.Vector2Reflect(v, normal);
|
||||
}
|
||||
|
||||
pub fn vector2Min(v1: Vector2, v2: Vector2) Vector2 {
|
||||
return cdef.Vector2Min(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector2Max(v1: Vector2, v2: Vector2) Vector2 {
|
||||
return cdef.Vector2Max(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector2Rotate(v: Vector2, angle: f32) Vector2 {
|
||||
return cdef.Vector2Rotate(v, angle);
|
||||
}
|
||||
|
||||
pub fn vector2MoveTowards(v: Vector2, target: Vector2, maxDistance: f32) Vector2 {
|
||||
return cdef.Vector2MoveTowards(v, target, maxDistance);
|
||||
}
|
||||
|
||||
pub fn vector2Invert(v: Vector2) Vector2 {
|
||||
return cdef.Vector2Invert(v);
|
||||
}
|
||||
|
||||
pub fn vector2Clamp(v: Vector2, min: Vector2, max: Vector2) Vector2 {
|
||||
return cdef.Vector2Clamp(v, min, max);
|
||||
}
|
||||
|
||||
pub fn vector2ClampValue(v: Vector2, min: f32, max: f32) Vector2 {
|
||||
return cdef.Vector2ClampValue(v, min, max);
|
||||
}
|
||||
|
||||
pub fn vector2Equals(p: Vector2, q: Vector2) bool {
|
||||
return cdef.Vector2Equals(p, q) == 1;
|
||||
}
|
||||
|
||||
pub fn vector2Refract(v: Vector2, n: Vector2, r: f32) Vector2 {
|
||||
return cdef.Vector2Refract(v, n, r);
|
||||
}
|
||||
|
||||
pub fn vector3Zero() Vector3 {
|
||||
return cdef.Vector3Zero();
|
||||
}
|
||||
|
||||
pub fn vector3One() Vector3 {
|
||||
return cdef.Vector3One();
|
||||
}
|
||||
|
||||
pub fn vector3Add(v1: Vector3, v2: Vector3) Vector3 {
|
||||
return cdef.Vector3Add(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector3AddValue(v: Vector3, add: f32) Vector3 {
|
||||
return cdef.Vector3AddValue(v, add);
|
||||
}
|
||||
|
||||
pub fn vector3Subtract(v1: Vector3, v2: Vector3) Vector3 {
|
||||
return cdef.Vector3Subtract(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector3SubtractValue(v: Vector3, sub: f32) Vector3 {
|
||||
return cdef.Vector3SubtractValue(v, sub);
|
||||
}
|
||||
|
||||
pub fn vector3Scale(v: Vector3, scalar: f32) Vector3 {
|
||||
return cdef.Vector3Scale(v, scalar);
|
||||
}
|
||||
|
||||
pub fn vector3Multiply(v1: Vector3, v2: Vector3) Vector3 {
|
||||
return cdef.Vector3Multiply(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector3CrossProduct(v1: Vector3, v2: Vector3) Vector3 {
|
||||
return cdef.Vector3CrossProduct(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector3Perpendicular(v: Vector3) Vector3 {
|
||||
return cdef.Vector3Perpendicular(v);
|
||||
}
|
||||
|
||||
pub fn vector3Length(v: Vector3) f32 {
|
||||
return cdef.Vector3Length(v);
|
||||
}
|
||||
|
||||
pub fn vector3LengthSqr(v: Vector3) f32 {
|
||||
return cdef.Vector3LengthSqr(v);
|
||||
}
|
||||
|
||||
pub fn vector3DotProduct(v1: Vector3, v2: Vector3) f32 {
|
||||
return cdef.Vector3DotProduct(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector3Distance(v1: Vector3, v2: Vector3) f32 {
|
||||
return cdef.Vector3Distance(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector3DistanceSqr(v1: Vector3, v2: Vector3) f32 {
|
||||
return cdef.Vector3DistanceSqr(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector3Angle(v1: Vector3, v2: Vector3) f32 {
|
||||
return cdef.Vector3Angle(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector3Negate(v: Vector3) Vector3 {
|
||||
return cdef.Vector3Negate(v);
|
||||
}
|
||||
|
||||
pub fn vector3Divide(v1: Vector3, v2: Vector3) Vector3 {
|
||||
return cdef.Vector3Divide(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector3Normalize(v: Vector3) Vector3 {
|
||||
return cdef.Vector3Normalize(v);
|
||||
}
|
||||
|
||||
pub fn vector3Project(v1: Vector3, v2: Vector3) Vector3 {
|
||||
return cdef.Vector3Project(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector3Reject(v1: Vector3, v2: Vector3) Vector3 {
|
||||
return cdef.Vector3Reject(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector3OrthoNormalize(v1: *Vector3, v2: *Vector3) void {
|
||||
cdef.Vector3OrthoNormalize(@as([*c]Vector3, @ptrCast(v1)), @as([*c]Vector3, @ptrCast(v2)));
|
||||
}
|
||||
|
||||
pub fn vector3Transform(v: Vector3, mat: Matrix) Vector3 {
|
||||
return cdef.Vector3Transform(v, mat);
|
||||
}
|
||||
|
||||
pub fn vector3RotateByQuaternion(v: Vector3, q: Quaternion) Vector3 {
|
||||
return cdef.Vector3RotateByQuaternion(v, q);
|
||||
}
|
||||
|
||||
pub fn vector3RotateByAxisAngle(v: Vector3, axis: Vector3, angle: f32) Vector3 {
|
||||
return cdef.Vector3RotateByAxisAngle(v, axis, angle);
|
||||
}
|
||||
|
||||
pub fn vector3MoveTowards(v: Vector3, target: Vector3, maxDistance: f32) Vector3 {
|
||||
return cdef.Vector3MoveTowards(v, target, maxDistance);
|
||||
}
|
||||
|
||||
pub fn vector3Lerp(v1: Vector3, v2: Vector3, amount: f32) Vector3 {
|
||||
return cdef.Vector3Lerp(v1, v2, amount);
|
||||
}
|
||||
|
||||
pub fn vector3CubicHermite(v1: Vector3, tangent1: Vector3, v2: Vector3, tangent2: Vector3, amount: f32) Vector3 {
|
||||
return cdef.Vector3CubicHermite(v1, tangent1, v2, tangent2, amount);
|
||||
}
|
||||
|
||||
pub fn vector3Reflect(v: Vector3, normal: Vector3) Vector3 {
|
||||
return cdef.Vector3Reflect(v, normal);
|
||||
}
|
||||
|
||||
pub fn vector3Min(v1: Vector3, v2: Vector3) Vector3 {
|
||||
return cdef.Vector3Min(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector3Max(v1: Vector3, v2: Vector3) Vector3 {
|
||||
return cdef.Vector3Max(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector3Barycenter(p: Vector3, a: Vector3, b: Vector3, c: Vector3) Vector3 {
|
||||
return cdef.Vector3Barycenter(p, a, b, c);
|
||||
}
|
||||
|
||||
pub fn vector3Unproject(source: Vector3, projection: Matrix, view: Matrix) Vector3 {
|
||||
return cdef.Vector3Unproject(source, projection, view);
|
||||
}
|
||||
|
||||
pub fn vector3ToFloatV(v: Vector3) float3 {
|
||||
return cdef.Vector3ToFloatV(v);
|
||||
}
|
||||
|
||||
pub fn vector3Invert(v: Vector3) Vector3 {
|
||||
return cdef.Vector3Invert(v);
|
||||
}
|
||||
|
||||
pub fn vector3Clamp(v: Vector3, min: Vector3, max: Vector3) Vector3 {
|
||||
return cdef.Vector3Clamp(v, min, max);
|
||||
}
|
||||
|
||||
pub fn vector3ClampValue(v: Vector3, min: f32, max: f32) Vector3 {
|
||||
return cdef.Vector3ClampValue(v, min, max);
|
||||
}
|
||||
|
||||
pub fn vector3Equals(p: Vector3, q: Vector3) bool {
|
||||
return cdef.Vector3Equals(p, q) == 1;
|
||||
}
|
||||
|
||||
pub fn vector3Refract(v: Vector3, n: Vector3, r: f32) Vector3 {
|
||||
return cdef.Vector3Refract(v, n, r);
|
||||
}
|
||||
|
||||
pub fn vector4Zero() Vector4 {
|
||||
return cdef.Vector4Zero();
|
||||
}
|
||||
|
||||
pub fn vector4One() Vector4 {
|
||||
return cdef.Vector4One();
|
||||
}
|
||||
|
||||
pub fn vector4Add(v1: Vector4, v2: Vector4) Vector4 {
|
||||
return cdef.Vector4Add(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector4AddValue(v: Vector4, add: f32) Vector4 {
|
||||
return cdef.Vector4AddValue(v, add);
|
||||
}
|
||||
|
||||
pub fn vector4Subtract(v1: Vector4, v2: Vector4) Vector4 {
|
||||
return cdef.Vector4Subtract(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector4SubtractValue(v: Vector4, add: f32) Vector4 {
|
||||
return cdef.Vector4SubtractValue(v, add);
|
||||
}
|
||||
|
||||
pub fn vector4Length(v: Vector4) f32 {
|
||||
return cdef.Vector4Length(v);
|
||||
}
|
||||
|
||||
pub fn vector4LengthSqr(v: Vector4) f32 {
|
||||
return cdef.Vector4LengthSqr(v);
|
||||
}
|
||||
|
||||
pub fn vector4DotProduct(v1: Vector4, v2: Vector4) f32 {
|
||||
return cdef.Vector4DotProduct(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector4Distance(v1: Vector4, v2: Vector4) f32 {
|
||||
return cdef.Vector4Distance(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector4DistanceSqr(v1: Vector4, v2: Vector4) f32 {
|
||||
return cdef.Vector4DistanceSqr(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector4Scale(v: Vector4, scale: f32) Vector4 {
|
||||
return cdef.Vector4Scale(v, scale);
|
||||
}
|
||||
|
||||
pub fn vector4Multiply(v1: Vector4, v2: Vector4) Vector4 {
|
||||
return cdef.Vector4Multiply(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector4Negate(v: Vector4) Vector4 {
|
||||
return cdef.Vector4Negate(v);
|
||||
}
|
||||
|
||||
pub fn vector4Divide(v1: Vector4, v2: Vector4) Vector4 {
|
||||
return cdef.Vector4Divide(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector4Normalize(v: Vector4) Vector4 {
|
||||
return cdef.Vector4Normalize(v);
|
||||
}
|
||||
|
||||
pub fn vector4Min(v1: Vector4, v2: Vector4) Vector4 {
|
||||
return cdef.Vector4Min(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector4Max(v1: Vector4, v2: Vector4) Vector4 {
|
||||
return cdef.Vector4Max(v1, v2);
|
||||
}
|
||||
|
||||
pub fn vector4Lerp(v1: Vector4, v2: Vector4, amount: f32) Vector4 {
|
||||
return cdef.Vector4Lerp(v1, v2, amount);
|
||||
}
|
||||
|
||||
pub fn vector4MoveTowards(v: Vector4, target: Vector4, maxDistance: f32) Vector4 {
|
||||
return cdef.Vector4MoveTowards(v, target, maxDistance);
|
||||
}
|
||||
|
||||
pub fn vector4Invert(v: Vector4) Vector4 {
|
||||
return cdef.Vector4Invert(v);
|
||||
}
|
||||
|
||||
pub fn vector4Equals(p: Vector4, q: Vector4) bool {
|
||||
return cdef.Vector4Equals(p, q) == 1;
|
||||
}
|
||||
|
||||
pub fn matrixDeterminant(mat: Matrix) f32 {
|
||||
return cdef.MatrixDeterminant(mat);
|
||||
}
|
||||
|
||||
pub fn matrixTrace(mat: Matrix) f32 {
|
||||
return cdef.MatrixTrace(mat);
|
||||
}
|
||||
|
||||
pub fn matrixTranspose(mat: Matrix) Matrix {
|
||||
return cdef.MatrixTranspose(mat);
|
||||
}
|
||||
|
||||
pub fn matrixInvert(mat: Matrix) Matrix {
|
||||
return cdef.MatrixInvert(mat);
|
||||
}
|
||||
|
||||
pub fn matrixIdentity() Matrix {
|
||||
return cdef.MatrixIdentity();
|
||||
}
|
||||
|
||||
pub fn matrixAdd(left: Matrix, right: Matrix) Matrix {
|
||||
return cdef.MatrixAdd(left, right);
|
||||
}
|
||||
|
||||
pub fn matrixSubtract(left: Matrix, right: Matrix) Matrix {
|
||||
return cdef.MatrixSubtract(left, right);
|
||||
}
|
||||
|
||||
pub fn matrixMultiply(left: Matrix, right: Matrix) Matrix {
|
||||
return cdef.MatrixMultiply(left, right);
|
||||
}
|
||||
|
||||
pub fn matrixMultiplyValue(left: Matrix, value: f32) Matrix {
|
||||
return cdef.MatrixMultiplyValue(left, value);
|
||||
}
|
||||
|
||||
pub fn matrixTranslate(x: f32, y: f32, z: f32) Matrix {
|
||||
return cdef.MatrixTranslate(x, y, z);
|
||||
}
|
||||
|
||||
pub fn matrixRotate(axis: Vector3, angle: f32) Matrix {
|
||||
return cdef.MatrixRotate(axis, angle);
|
||||
}
|
||||
|
||||
pub fn matrixRotateX(angle: f32) Matrix {
|
||||
return cdef.MatrixRotateX(angle);
|
||||
}
|
||||
|
||||
pub fn matrixRotateY(angle: f32) Matrix {
|
||||
return cdef.MatrixRotateY(angle);
|
||||
}
|
||||
|
||||
pub fn matrixRotateZ(angle: f32) Matrix {
|
||||
return cdef.MatrixRotateZ(angle);
|
||||
}
|
||||
|
||||
pub fn matrixRotateXYZ(angle: Vector3) Matrix {
|
||||
return cdef.MatrixRotateXYZ(angle);
|
||||
}
|
||||
|
||||
pub fn matrixRotateZYX(angle: Vector3) Matrix {
|
||||
return cdef.MatrixRotateZYX(angle);
|
||||
}
|
||||
|
||||
pub fn matrixScale(x: f32, y: f32, z: f32) Matrix {
|
||||
return cdef.MatrixScale(x, y, z);
|
||||
}
|
||||
|
||||
pub fn matrixFrustum(left: f64, right: f64, bottom: f64, top: f64, nearPlane: f64, farPlane: f64) Matrix {
|
||||
return cdef.MatrixFrustum(left, right, bottom, top, nearPlane, farPlane);
|
||||
}
|
||||
|
||||
pub fn matrixPerspective(fovY: f64, aspect: f64, nearPlane: f64, farPlane: f64) Matrix {
|
||||
return cdef.MatrixPerspective(fovY, aspect, nearPlane, farPlane);
|
||||
}
|
||||
|
||||
pub fn matrixOrtho(left: f64, right: f64, bottom: f64, top: f64, nearPlane: f64, farPlane: f64) Matrix {
|
||||
return cdef.MatrixOrtho(left, right, bottom, top, nearPlane, farPlane);
|
||||
}
|
||||
|
||||
pub fn matrixLookAt(eye: Vector3, target: Vector3, up: Vector3) Matrix {
|
||||
return cdef.MatrixLookAt(eye, target, up);
|
||||
}
|
||||
|
||||
pub fn matrixToFloatV(mat: Matrix) float16 {
|
||||
return cdef.MatrixToFloatV(mat);
|
||||
}
|
||||
|
||||
pub fn quaternionAdd(q1: Quaternion, q2: Quaternion) Quaternion {
|
||||
return cdef.QuaternionAdd(q1, q2);
|
||||
}
|
||||
|
||||
pub fn quaternionAddValue(q: Quaternion, add: f32) Quaternion {
|
||||
return cdef.QuaternionAddValue(q, add);
|
||||
}
|
||||
|
||||
pub fn quaternionSubtract(q1: Quaternion, q2: Quaternion) Quaternion {
|
||||
return cdef.QuaternionSubtract(q1, q2);
|
||||
}
|
||||
|
||||
pub fn quaternionSubtractValue(q: Quaternion, sub: f32) Quaternion {
|
||||
return cdef.QuaternionSubtractValue(q, sub);
|
||||
}
|
||||
|
||||
pub fn quaternionIdentity() Quaternion {
|
||||
return cdef.QuaternionIdentity();
|
||||
}
|
||||
|
||||
pub fn quaternionLength(q: Quaternion) f32 {
|
||||
return cdef.QuaternionLength(q);
|
||||
}
|
||||
|
||||
pub fn quaternionNormalize(q: Quaternion) Quaternion {
|
||||
return cdef.QuaternionNormalize(q);
|
||||
}
|
||||
|
||||
pub fn quaternionInvert(q: Quaternion) Quaternion {
|
||||
return cdef.QuaternionInvert(q);
|
||||
}
|
||||
|
||||
pub fn quaternionMultiply(q1: Quaternion, q2: Quaternion) Quaternion {
|
||||
return cdef.QuaternionMultiply(q1, q2);
|
||||
}
|
||||
|
||||
pub fn quaternionScale(q: Quaternion, mul: f32) Quaternion {
|
||||
return cdef.QuaternionScale(q, mul);
|
||||
}
|
||||
|
||||
pub fn quaternionDivide(q1: Quaternion, q2: Quaternion) Quaternion {
|
||||
return cdef.QuaternionDivide(q1, q2);
|
||||
}
|
||||
|
||||
pub fn quaternionLerp(q1: Quaternion, q2: Quaternion, amount: f32) Quaternion {
|
||||
return cdef.QuaternionLerp(q1, q2, amount);
|
||||
}
|
||||
|
||||
pub fn quaternionNlerp(q1: Quaternion, q2: Quaternion, amount: f32) Quaternion {
|
||||
return cdef.QuaternionNlerp(q1, q2, amount);
|
||||
}
|
||||
|
||||
pub fn quaternionSlerp(q1: Quaternion, q2: Quaternion, amount: f32) Quaternion {
|
||||
return cdef.QuaternionSlerp(q1, q2, amount);
|
||||
}
|
||||
|
||||
pub fn quaternionCubicHermiteSpline(q1: Quaternion, outTangent1: Quaternion, q2: Quaternion, inTangent2: Quaternion, t: f32) Quaternion {
|
||||
return cdef.QuaternionCubicHermiteSpline(q1, outTangent1, q2, inTangent2, t);
|
||||
}
|
||||
|
||||
pub fn quaternionFromVector3ToVector3(from: Vector3, to: Vector3) Quaternion {
|
||||
return cdef.QuaternionFromVector3ToVector3(from, to);
|
||||
}
|
||||
|
||||
pub fn quaternionFromMatrix(mat: Matrix) Quaternion {
|
||||
return cdef.QuaternionFromMatrix(mat);
|
||||
}
|
||||
|
||||
pub fn quaternionToMatrix(q: Quaternion) Matrix {
|
||||
return cdef.QuaternionToMatrix(q);
|
||||
}
|
||||
|
||||
pub fn quaternionFromAxisAngle(axis: Vector3, angle: f32) Quaternion {
|
||||
return cdef.QuaternionFromAxisAngle(axis, angle);
|
||||
}
|
||||
|
||||
pub fn quaternionToAxisAngle(q: Quaternion, outAxis: *Vector3, outAngle: *f32) void {
|
||||
cdef.QuaternionToAxisAngle(q, @as([*c]Vector3, @ptrCast(outAxis)), @as([*c]f32, @ptrCast(outAngle)));
|
||||
}
|
||||
|
||||
pub fn quaternionFromEuler(pitch: f32, yaw: f32, roll: f32) Quaternion {
|
||||
return cdef.QuaternionFromEuler(pitch, yaw, roll);
|
||||
}
|
||||
|
||||
pub fn quaternionToEuler(q: Quaternion) Vector3 {
|
||||
return cdef.QuaternionToEuler(q);
|
||||
}
|
||||
|
||||
pub fn quaternionTransform(q: Quaternion, mat: Matrix) Quaternion {
|
||||
return cdef.QuaternionTransform(q, mat);
|
||||
}
|
||||
|
||||
pub fn quaternionEquals(p: Quaternion, q: Quaternion) bool {
|
||||
return cdef.QuaternionEquals(p, q) == 1;
|
||||
}
|
||||
|
||||
pub fn matrixCompose(translation: Vector3, rotation: Quaternion, scale: Vector3) Matrix {
|
||||
return cdef.MatrixCompose(translation, rotation, scale);
|
||||
}
|
||||
|
||||
pub fn matrixDecompose(mat: Matrix, translation: *Vector3, rotation: *Quaternion, scale: *Vector3) void {
|
||||
cdef.MatrixDecompose(mat, @as([*c]Vector3, @ptrCast(translation)), @as([*c]Quaternion, @ptrCast(rotation)), @as([*c]Vector3, @ptrCast(scale)));
|
||||
}
|
||||
@ -0,0 +1,168 @@
|
||||
// raylib-zig (c) Nikolas Wipper 2024
|
||||
|
||||
const rl = @import("raylib.zig");
|
||||
const rlgl = @import("rlgl.zig");
|
||||
|
||||
pub extern "c" fn rlMatrixMode(mode: c_int) void;
|
||||
pub extern "c" fn rlPushMatrix() void;
|
||||
pub extern "c" fn rlPopMatrix() void;
|
||||
pub extern "c" fn rlLoadIdentity() void;
|
||||
pub extern "c" fn rlTranslatef(x: f32, y: f32, z: f32) void;
|
||||
pub extern "c" fn rlRotatef(angle: f32, x: f32, y: f32, z: f32) void;
|
||||
pub extern "c" fn rlScalef(x: f32, y: f32, z: f32) void;
|
||||
pub extern "c" fn rlMultMatrixf(matf: [*c]const f32) void;
|
||||
pub extern "c" fn rlFrustum(left: f64, right: f64, bottom: f64, top: f64, znear: f64, zfar: f64) void;
|
||||
pub extern "c" fn rlOrtho(left: f64, right: f64, bottom: f64, top: f64, znear: f64, zfar: f64) void;
|
||||
pub extern "c" fn rlViewport(x: c_int, y: c_int, width: c_int, height: c_int) void;
|
||||
pub extern "c" fn rlSetClipPlanes(nearPlane: f64, farPlane: f64) void;
|
||||
pub extern "c" fn rlGetCullDistanceNear() f64;
|
||||
pub extern "c" fn rlGetCullDistanceFar() f64;
|
||||
pub extern "c" fn rlBegin(mode: c_int) void;
|
||||
pub extern "c" fn rlEnd() void;
|
||||
pub extern "c" fn rlVertex2i(x: c_int, y: c_int) void;
|
||||
pub extern "c" fn rlVertex2f(x: f32, y: f32) void;
|
||||
pub extern "c" fn rlVertex3f(x: f32, y: f32, z: f32) void;
|
||||
pub extern "c" fn rlTexCoord2f(x: f32, y: f32) void;
|
||||
pub extern "c" fn rlNormal3f(x: f32, y: f32, z: f32) void;
|
||||
pub extern "c" fn rlColor4ub(r: u8, g: u8, b: u8, a: u8) void;
|
||||
pub extern "c" fn rlColor3f(x: f32, y: f32, z: f32) void;
|
||||
pub extern "c" fn rlColor4f(x: f32, y: f32, z: f32, w: f32) void;
|
||||
pub extern "c" fn rlEnableVertexArray(vaoId: c_uint) bool;
|
||||
pub extern "c" fn rlDisableVertexArray() void;
|
||||
pub extern "c" fn rlEnableVertexBuffer(id: c_uint) void;
|
||||
pub extern "c" fn rlDisableVertexBuffer() void;
|
||||
pub extern "c" fn rlEnableVertexBufferElement(id: c_uint) void;
|
||||
pub extern "c" fn rlDisableVertexBufferElement() void;
|
||||
pub extern "c" fn rlEnableVertexAttribute(index: c_uint) void;
|
||||
pub extern "c" fn rlDisableVertexAttribute(index: c_uint) void;
|
||||
pub extern "c" fn rlEnableStatePointer(vertexAttribType: c_int, buffer: ?*anyopaque) void;
|
||||
pub extern "c" fn rlDisableStatePointer(vertexAttribType: c_int) void;
|
||||
pub extern "c" fn rlActiveTextureSlot(slot: c_int) void;
|
||||
pub extern "c" fn rlEnableTexture(id: c_uint) void;
|
||||
pub extern "c" fn rlDisableTexture() void;
|
||||
pub extern "c" fn rlEnableTextureCubemap(id: c_uint) void;
|
||||
pub extern "c" fn rlDisableTextureCubemap() void;
|
||||
pub extern "c" fn rlTextureParameters(id: c_uint, param: c_int, value: c_int) void;
|
||||
pub extern "c" fn rlCubemapParameters(id: c_uint, param: c_int, value: c_int) void;
|
||||
pub extern "c" fn rlEnableShader(id: c_uint) void;
|
||||
pub extern "c" fn rlDisableShader() void;
|
||||
pub extern "c" fn rlEnableFramebuffer(id: c_uint) void;
|
||||
pub extern "c" fn rlDisableFramebuffer() void;
|
||||
pub extern "c" fn rlGetActiveFramebuffer() c_uint;
|
||||
pub extern "c" fn rlActiveDrawBuffers(count: c_int) void;
|
||||
pub extern "c" fn rlBlitFramebuffer(srcX: c_int, srcY: c_int, srcWidth: c_int, srcHeight: c_int, dstX: c_int, dstY: c_int, dstWidth: c_int, dstHeight: c_int, bufferMask: c_int) void;
|
||||
pub extern "c" fn rlBindFramebuffer(target: c_uint, framebuffer: c_uint) void;
|
||||
pub extern "c" fn rlEnableColorBlend() void;
|
||||
pub extern "c" fn rlDisableColorBlend() void;
|
||||
pub extern "c" fn rlEnableDepthTest() void;
|
||||
pub extern "c" fn rlDisableDepthTest() void;
|
||||
pub extern "c" fn rlEnableDepthMask() void;
|
||||
pub extern "c" fn rlDisableDepthMask() void;
|
||||
pub extern "c" fn rlEnableBackfaceCulling() void;
|
||||
pub extern "c" fn rlDisableBackfaceCulling() void;
|
||||
pub extern "c" fn rlColorMask(r: bool, g: bool, b: bool, a: bool) void;
|
||||
pub extern "c" fn rlSetCullFace(mode: c_int) void;
|
||||
pub extern "c" fn rlEnableScissorTest() void;
|
||||
pub extern "c" fn rlDisableScissorTest() void;
|
||||
pub extern "c" fn rlScissor(x: c_int, y: c_int, width: c_int, height: c_int) void;
|
||||
pub extern "c" fn rlEnablePointMode() void;
|
||||
pub extern "c" fn rlDisablePointMode() void;
|
||||
pub extern "c" fn rlSetPointSize(size: f32) void;
|
||||
pub extern "c" fn rlGetPointSize() f32;
|
||||
pub extern "c" fn rlEnableWireMode() void;
|
||||
pub extern "c" fn rlDisableWireMode() void;
|
||||
pub extern "c" fn rlSetLineWidth(width: f32) void;
|
||||
pub extern "c" fn rlGetLineWidth() f32;
|
||||
pub extern "c" fn rlEnableSmoothLines() void;
|
||||
pub extern "c" fn rlDisableSmoothLines() void;
|
||||
pub extern "c" fn rlEnableStereoRender() void;
|
||||
pub extern "c" fn rlDisableStereoRender() void;
|
||||
pub extern "c" fn rlIsStereoRenderEnabled() bool;
|
||||
pub extern "c" fn rlClearColor(r: u8, g: u8, b: u8, a: u8) void;
|
||||
pub extern "c" fn rlClearScreenBuffers() void;
|
||||
pub extern "c" fn rlCheckErrors() void;
|
||||
pub extern "c" fn rlSetBlendMode(mode: c_int) void;
|
||||
pub extern "c" fn rlSetBlendFactors(glSrcFactor: c_int, glDstFactor: c_int, glEquation: c_int) void;
|
||||
pub extern "c" fn rlSetBlendFactorsSeparate(glSrcRGB: c_int, glDstRGB: c_int, glSrcAlpha: c_int, glDstAlpha: c_int, glEqRGB: c_int, glEqAlpha: c_int) void;
|
||||
pub extern "c" fn rlglInit(width: c_int, height: c_int) void;
|
||||
pub extern "c" fn rlglClose() void;
|
||||
pub extern "c" fn rlLoadExtensions(loader: *anyopaque) void;
|
||||
pub extern "c" fn rlGetProcAddress(procName: [*c]const u8) ?*const anyopaque;
|
||||
pub extern "c" fn rlGetVersion() c_int;
|
||||
pub extern "c" fn rlSetFramebufferWidth(width: c_int) void;
|
||||
pub extern "c" fn rlGetFramebufferWidth() c_int;
|
||||
pub extern "c" fn rlSetFramebufferHeight(height: c_int) void;
|
||||
pub extern "c" fn rlGetFramebufferHeight() c_int;
|
||||
pub extern "c" fn rlGetTextureIdDefault() c_uint;
|
||||
pub extern "c" fn rlGetShaderIdDefault() c_uint;
|
||||
pub extern "c" fn rlGetShaderLocsDefault() [*c]c_int;
|
||||
pub extern "c" fn rlLoadRenderBatch(numBuffers: c_int, bufferElements: c_int) rlgl.rlRenderBatch;
|
||||
pub extern "c" fn rlUnloadRenderBatch(batch: rlgl.rlRenderBatch) void;
|
||||
pub extern "c" fn rlDrawRenderBatch(batch: [*c]rlgl.rlRenderBatch) void;
|
||||
pub extern "c" fn rlSetRenderBatchActive(batch: [*c]rlgl.rlRenderBatch) void;
|
||||
pub extern "c" fn rlDrawRenderBatchActive() void;
|
||||
pub extern "c" fn rlCheckRenderBatchLimit(vCount: c_int) bool;
|
||||
pub extern "c" fn rlSetTexture(id: c_uint) void;
|
||||
pub extern "c" fn rlLoadVertexArray() c_uint;
|
||||
pub extern "c" fn rlLoadVertexBuffer(buffer: *const anyopaque, size: c_int, dynamic: bool) c_uint;
|
||||
pub extern "c" fn rlLoadVertexBufferElement(buffer: *const anyopaque, size: c_int, dynamic: bool) c_uint;
|
||||
pub extern "c" fn rlUpdateVertexBuffer(bufferId: c_uint, data: *const anyopaque, dataSize: c_int, offset: c_int) void;
|
||||
pub extern "c" fn rlUpdateVertexBufferElements(id: c_uint, data: *const anyopaque, dataSize: c_int, offset: c_int) void;
|
||||
pub extern "c" fn rlUnloadVertexArray(vaoId: c_uint) void;
|
||||
pub extern "c" fn rlUnloadVertexBuffer(vboId: c_uint) void;
|
||||
pub extern "c" fn rlSetVertexAttribute(index: c_uint, compSize: c_int, ty: c_int, normalized: bool, stride: c_int, offset: c_int) void;
|
||||
pub extern "c" fn rlSetVertexAttributeDivisor(index: c_uint, divisor: c_int) void;
|
||||
pub extern "c" fn rlSetVertexAttributeDefault(locIndex: c_int, value: *const anyopaque, attribType: c_int, count: c_int) void;
|
||||
pub extern "c" fn rlDrawVertexArray(offset: c_int, count: c_int) void;
|
||||
pub extern "c" fn rlDrawVertexArrayElements(offset: c_int, count: c_int, buffer: ?*const anyopaque) void;
|
||||
pub extern "c" fn rlDrawVertexArrayInstanced(offset: c_int, count: c_int, instances: c_int) void;
|
||||
pub extern "c" fn rlDrawVertexArrayElementsInstanced(offset: c_int, count: c_int, buffer: ?*const anyopaque, instances: c_int) void;
|
||||
pub extern "c" fn rlLoadTexture(data: ?*const anyopaque, width: c_int, height: c_int, format: c_int, mipmapCount: c_int) c_uint;
|
||||
pub extern "c" fn rlLoadTextureDepth(width: c_int, height: c_int, useRenderBuffer: bool) c_uint;
|
||||
pub extern "c" fn rlLoadTextureCubemap(data: ?*const anyopaque, size: c_int, format: c_int, mipmapCount: c_int) c_uint;
|
||||
pub extern "c" fn rlUpdateTexture(id: c_uint, offsetX: c_int, offsetY: c_int, width: c_int, height: c_int, format: c_int, data: *const anyopaque) void;
|
||||
pub extern "c" fn rlGetGlTextureFormats(format: c_int, glInternalFormat: [*c]c_uint, glFormat: [*c]c_uint, glType: [*c]c_uint) void;
|
||||
pub extern "c" fn rlGetPixelFormatName(format: c_uint) [*c]const u8;
|
||||
pub extern "c" fn rlUnloadTexture(id: c_uint) void;
|
||||
pub extern "c" fn rlGenTextureMipmaps(id: c_uint, width: c_int, height: c_int, format: c_int, mipmaps: [*c]c_int) void;
|
||||
pub extern "c" fn rlReadTexturePixels(id: c_uint, width: c_int, height: c_int, format: c_int) *anyopaque;
|
||||
pub extern "c" fn rlReadScreenPixels(width: c_int, height: c_int) [*c]u8;
|
||||
pub extern "c" fn rlLoadFramebuffer() c_uint;
|
||||
pub extern "c" fn rlFramebufferAttach(id: c_uint, texId: c_uint, attachType: c_int, texType: c_int, mipLevel: c_int) void;
|
||||
pub extern "c" fn rlFramebufferComplete(id: c_uint) bool;
|
||||
pub extern "c" fn rlUnloadFramebuffer(id: c_uint) void;
|
||||
pub extern "c" fn rlCopyFramebuffer(x: c_int, y: c_int, width: c_int, height: c_int, format: c_int, pixels: *anyopaque) void;
|
||||
pub extern "c" fn rlResizeFramebuffer(width: c_int, height: c_int) void;
|
||||
pub extern "c" fn rlLoadShader(code: [*c]const u8, ty: c_int) c_uint;
|
||||
pub extern "c" fn rlLoadShaderProgram(vsCode: [*c]const u8, fsCode: [*c]const u8) c_uint;
|
||||
pub extern "c" fn rlLoadShaderProgramEx(vsId: c_uint, fsId: c_uint) c_uint;
|
||||
pub extern "c" fn rlLoadShaderProgramCompute(csId: c_uint) c_uint;
|
||||
pub extern "c" fn rlUnloadShader(id: c_uint) void;
|
||||
pub extern "c" fn rlUnloadShaderProgram(id: c_uint) void;
|
||||
pub extern "c" fn rlGetLocationUniform(id: c_uint, uniformName: [*c]const u8) c_int;
|
||||
pub extern "c" fn rlGetLocationAttrib(id: c_uint, attribName: [*c]const u8) c_int;
|
||||
pub extern "c" fn rlSetUniform(locIndex: c_int, value: *const anyopaque, uniformType: c_int, count: c_int) void;
|
||||
pub extern "c" fn rlSetUniformMatrix(locIndex: c_int, mat: rl.Matrix) void;
|
||||
pub extern "c" fn rlSetUniformMatrices(locIndex: c_int, mat: [*c]const rl.Matrix, count: c_int) void;
|
||||
pub extern "c" fn rlSetUniformSampler(locIndex: c_int, textureId: c_uint) void;
|
||||
pub extern "c" fn rlSetShader(id: c_uint, locs: [*c]c_int) void;
|
||||
pub extern "c" fn rlComputeShaderDispatch(groupX: c_uint, groupY: c_uint, groupZ: c_uint) void;
|
||||
pub extern "c" fn rlLoadShaderBuffer(size: c_uint, data: ?*const anyopaque, usageHint: c_int) c_uint;
|
||||
pub extern "c" fn rlUnloadShaderBuffer(ssboId: c_uint) void;
|
||||
pub extern "c" fn rlUpdateShaderBuffer(id: c_uint, data: *const anyopaque, dataSize: c_uint, offset: c_uint) void;
|
||||
pub extern "c" fn rlBindShaderBuffer(id: c_uint, index: c_uint) void;
|
||||
pub extern "c" fn rlReadShaderBuffer(id: c_uint, dest: *anyopaque, count: c_uint, offset: c_uint) void;
|
||||
pub extern "c" fn rlCopyShaderBuffer(destId: c_uint, srcId: c_uint, destOffset: c_uint, srcOffset: c_uint, count: c_uint) void;
|
||||
pub extern "c" fn rlGetShaderBufferSize(id: c_uint) c_uint;
|
||||
pub extern "c" fn rlBindImageTexture(id: c_uint, index: c_uint, format: c_int, readonly: bool) void;
|
||||
pub extern "c" fn rlGetMatrixModelview() rl.Matrix;
|
||||
pub extern "c" fn rlGetMatrixProjection() rl.Matrix;
|
||||
pub extern "c" fn rlGetMatrixTransform() rl.Matrix;
|
||||
pub extern "c" fn rlGetMatrixProjectionStereo(eye: c_int) rl.Matrix;
|
||||
pub extern "c" fn rlGetMatrixViewOffsetStereo(eye: c_int) rl.Matrix;
|
||||
pub extern "c" fn rlSetMatrixProjection(proj: rl.Matrix) void;
|
||||
pub extern "c" fn rlSetMatrixModelview(view: rl.Matrix) void;
|
||||
pub extern "c" fn rlSetMatrixProjectionStereo(right: rl.Matrix, left: rl.Matrix) void;
|
||||
pub extern "c" fn rlSetMatrixViewOffsetStereo(right: rl.Matrix, left: rl.Matrix) void;
|
||||
pub extern "c" fn rlLoadDrawCube() void;
|
||||
pub extern "c" fn rlLoadDrawQuad() void;
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user