Compare commits

..

No commits in common. "731884848a1c5480ee58f38d5b787c501925cbe2" and "a6e9ce520f056200bc8aaecb6ca3c35ffe84cccd" have entirely different histories.

6 changed files with 7 additions and 124 deletions

View File

@ -1,7 +1,4 @@
> Development of raylib-zig has moved to [its own organisation](https://github.com/raylib-zig/raylib-zig).
> Please update your `build.zig.zon` files and other links accordingly.
![logo](https://github.com/raylib-zig/raylib-zig/raw/devel/logo/logo.png)
![logo](https://github.com/Not-Nik/raylib-zig/raw/devel/logo/logo.png)
# raylib-zig
@ -9,7 +6,7 @@ Manually tweaked, auto-generated [raylib](https://github.com/raysan5/raylib) bin
Bindings tested on raylib version 5.6-dev and Zig 0.14.0
Thanks to all the [contributors](https://github.com/raylib-zig/raylib-zig/graphs/contributors) for their help with this
Thanks to all the [contributors](https://github.com/Not-Nik/raylib-zig/graphs/contributors) for their help with this
binding.
## Example
@ -67,7 +64,7 @@ want to run an example, say `basic_window` run `zig build basic_window`
Download and add raylib-zig as a dependency by running the following command in your project root:
```
zig fetch --save git+https://github.com/raylib-zig/raylib-zig#devel
zig fetch --save git+https://github.com/Not-Nik/raylib-zig#devel
```
Then add raylib-zig as a dependency and import its modules and artifact in your `build.zig`:

View File

@ -71,12 +71,6 @@ const gui = struct {
};
pub fn build(b: *std.Build) !void {
const stdout = std.io.getStdOut().writer();
try stdout.print(
\\Development of raylib-zig has moved to its own organisation (https://github.com/raylib-zig/raylib-zig).
\\Please update your `build.zig.zon` files and other links accordingly.
\\
, .{});
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});

View File

@ -1411,11 +1411,6 @@ pub const Mesh = extern struct {
pub fn drawInstanced(self: Mesh, material: Material, transforms: []const Matrix) void {
rl.drawMeshInstanced(self, material, transforms);
}
/// Unload mesh data from CPU and GPU
pub fn unload(self: Mesh) void {
rl.unloadMesh(self);
}
};
pub const Shader = extern struct {
@ -1431,11 +1426,6 @@ pub const Shader = extern struct {
pub fn deactivate(_: Shader) void {
rl.endShaderMode();
}
/// Unload shader from GPU memory (VRAM)
pub fn unload(self: Shader) void {
rl.unloadShader(self);
}
};
pub const MaterialMap = extern struct {
@ -1448,11 +1438,6 @@ pub const Material = extern struct {
shader: Shader,
maps: [*c]MaterialMap,
params: [4]f32,
/// Unload material from GPU memory (VRAM)
pub fn unload(self: Material) void {
rl.unloadMaterial(self);
}
};
pub const Transform = extern struct {
@ -1519,11 +1504,6 @@ pub const ModelAnimation = extern struct {
bones: [*c]BoneInfo,
framePoses: [*c][*c]Transform,
name: [32]u8,
/// Unload animation data
pub fn unload(self: ModelAnimation) void {
rl.unloadModelAnimation(self);
}
};
pub const Ray = extern struct {
@ -1549,11 +1529,6 @@ pub const Wave = extern struct {
sampleSize: c_uint,
channels: c_uint,
data: *anyopaque,
/// Unload wave data
pub fn unload(self: Wave) void {
rl.unloadWave(self);
}
};
pub const rAudioBuffer = opaque {};
@ -1565,21 +1540,11 @@ pub const AudioStream = extern struct {
sampleRate: c_uint,
sampleSize: c_uint,
channels: c_uint,
/// Unload audio stream and free memory
pub fn unload(self: AudioStream) void {
rl.unloadAudioStream(self);
}
};
pub const Sound = extern struct {
stream: AudioStream,
frameCount: c_uint,
/// Unload sound
pub fn unload(self: Sound) void {
rl.unloadSound(self);
}
};
pub const Music = extern struct {
@ -1588,11 +1553,6 @@ pub const Music = extern struct {
looping: bool,
ctxType: c_int,
ctxData: *anyopaque,
/// Unload music stream
pub fn unload(self: Music) void {
rl.unloadMusicStream(self);
}
};
pub const VrDeviceInfo = extern struct {
@ -1617,11 +1577,6 @@ pub const VrStereoConfig = extern struct {
rightScreenCenter: [2]f32,
scale: [2]f32,
scaleIn: [2]f32,
/// Unload VR stereo config
pub fn unload(self: VrStereoConfig) void {
rl.unloadVrStereoConfig(self);
}
};
pub const FilePathList = extern struct {
@ -1636,16 +1591,7 @@ pub const AutomationEvent = extern struct {
params: [4]c_int,
};
pub const AutomationEventList = extern struct {
capacity: c_uint,
count: c_uint,
events: [*c]AutomationEvent,
/// Unload automation events list from file
pub fn unload(self: AutomationEventList) void {
rl.unloadAutomationEventList(self);
}
};
pub const AutomationEventList = extern struct { capacity: c_uint, count: c_uint, events: [*c]AutomationEvent };
pub const ConfigFlags = packed struct {
__reserved: bool = false,

View File

@ -1411,11 +1411,6 @@ pub const Mesh = extern struct {
pub fn drawInstanced(self: Mesh, material: Material, transforms: []const Matrix) void {
rl.drawMeshInstanced(self, material, transforms);
}
/// Unload mesh data from CPU and GPU
pub fn unload(self: Mesh) void {
rl.unloadMesh(self);
}
};
pub const Shader = extern struct {
@ -1431,11 +1426,6 @@ pub const Shader = extern struct {
pub fn deactivate(_: Shader) void {
rl.endShaderMode();
}
/// Unload shader from GPU memory (VRAM)
pub fn unload(self: Shader) void {
rl.unloadShader(self);
}
};
pub const MaterialMap = extern struct {
@ -1448,11 +1438,6 @@ pub const Material = extern struct {
shader: Shader,
maps: [*c]MaterialMap,
params: [4]f32,
/// Unload material from GPU memory (VRAM)
pub fn unload(self: Material) void {
rl.unloadMaterial(self);
}
};
pub const Transform = extern struct {
@ -1519,11 +1504,6 @@ pub const ModelAnimation = extern struct {
bones: [*c]BoneInfo,
framePoses: [*c][*c]Transform,
name: [32]u8,
/// Unload animation data
pub fn unload(self: ModelAnimation) void {
rl.unloadModelAnimation(self);
}
};
pub const Ray = extern struct {
@ -1549,11 +1529,6 @@ pub const Wave = extern struct {
sampleSize: c_uint,
channels: c_uint,
data: *anyopaque,
/// Unload wave data
pub fn unload(self: Wave) void {
rl.unloadWave(self);
}
};
pub const rAudioBuffer = opaque {};
@ -1565,21 +1540,11 @@ pub const AudioStream = extern struct {
sampleRate: c_uint,
sampleSize: c_uint,
channels: c_uint,
/// Unload audio stream and free memory
pub fn unload(self: AudioStream) void {
rl.unloadAudioStream(self);
}
};
pub const Sound = extern struct {
stream: AudioStream,
frameCount: c_uint,
/// Unload sound
pub fn unload(self: Sound) void {
rl.unloadSound(self);
}
};
pub const Music = extern struct {
@ -1588,11 +1553,6 @@ pub const Music = extern struct {
looping: bool,
ctxType: c_int,
ctxData: *anyopaque,
/// Unload music stream
pub fn unload(self: Music) void {
rl.unloadMusicStream(self);
}
};
pub const VrDeviceInfo = extern struct {
@ -1617,11 +1577,6 @@ pub const VrStereoConfig = extern struct {
rightScreenCenter: [2]f32,
scale: [2]f32,
scaleIn: [2]f32,
/// Unload VR stereo config
pub fn unload(self: VrStereoConfig) void {
rl.unloadVrStereoConfig(self);
}
};
pub const FilePathList = extern struct {
@ -1636,16 +1591,7 @@ pub const AutomationEvent = extern struct {
params: [4]c_int,
};
pub const AutomationEventList = extern struct {
capacity: c_uint,
count: c_uint,
events: [*c]AutomationEvent,
/// Unload automation events list from file
pub fn unload(self: AutomationEventList) void {
rl.unloadAutomationEventList(self);
}
};
pub const AutomationEventList = extern struct { capacity: c_uint, count: c_uint, events: [*c]AutomationEvent };
pub const ConfigFlags = packed struct {
__reserved: bool = false,

View File

@ -65,7 +65,7 @@ pub fn build(b: *std.Build) !void {
New-Item -Name "build.zig" -ItemType "file" -Value $BUILD_DOT_ZIG -Force
zig fetch --save git+https://github.com/raylib-zig/raylib-zig#devel
zig fetch --save git+https://github.com/Not-Nik/raylib-zig#devel
New-Item -Name "resources" -ItemType "directory"
New-Item -Name "resources/placeholder.txt" -ItemType "file" -Value "" -Force

View File

@ -63,7 +63,7 @@ pub fn build(b: *std.Build) !void {
b.installArtifact(exe);
}' >> build.zig
zig fetch --save git+https://github.com/raylib-zig/raylib-zig#devel
zig fetch --save git+https://github.com/Not-Nik/raylib-zig#devel
mkdir resources
touch resources/placeholder.txt