Merge changes from devel

This commit is contained in:
Nikolas 2025-03-05 18:15:29 +01:00
commit 9e69ca5946
Failed to generate hash of commit
28 changed files with 1258 additions and 221 deletions

View file

@ -845,7 +845,7 @@ pub fn rlGetGlTextureFormats(format: i32, glInternalFormat: *u32, glFormat: *u32
}
/// Get name string for pixel format
pub fn rlGetPixelFormatName(format: u32) [*:0]const u8 {
pub fn rlGetPixelFormatName(format: u32) [:0]const u8 {
return std.mem.span(cdef.rlGetPixelFormatName(@as(c_uint, format)));
}
@ -865,7 +865,7 @@ pub fn rlReadTexturePixels(id: u32, width: i32, height: i32, format: i32) *anyop
}
/// Read screen pixel data (color buffer)
pub fn rlReadScreenPixels(width: i32, height: i32) [*:0]u8 {
pub fn rlReadScreenPixels(width: i32, height: i32) [:0]u8 {
return std.mem.span(cdef.rlReadScreenPixels(@as(c_int, width), @as(c_int, height)));
}
@ -890,12 +890,12 @@ pub fn rlUnloadFramebuffer(id: u32) void {
}
/// Load shader from code strings
pub fn rlLoadShaderCode(vsCode: [*:0]const u8, fsCode: [*:0]const u8) u32 {
pub fn rlLoadShaderCode(vsCode: [:0]const u8, fsCode: [:0]const u8) u32 {
return @as(u32, cdef.rlLoadShaderCode(@as([*c]const u8, @ptrCast(vsCode)), @as([*c]const u8, @ptrCast(fsCode))));
}
/// Compile custom shader and return shader id (type: RL_VERTEX_SHADER, RL_FRAGMENT_SHADER, RL_COMPUTE_SHADER)
pub fn rlCompileShader(shaderCode: [*:0]const u8, ty: i32) u32 {
pub fn rlCompileShader(shaderCode: [:0]const u8, ty: i32) u32 {
return @as(u32, cdef.rlCompileShader(@as([*c]const u8, @ptrCast(shaderCode)), @as(c_int, ty)));
}
@ -910,12 +910,12 @@ pub fn rlUnloadShaderProgram(id: u32) void {
}
/// Get shader location uniform
pub fn rlGetLocationUniform(shaderId: u32, uniformName: [*:0]const u8) i32 {
pub fn rlGetLocationUniform(shaderId: u32, uniformName: [:0]const u8) i32 {
return @as(i32, cdef.rlGetLocationUniform(@as(c_uint, shaderId), @as([*c]const u8, @ptrCast(uniformName))));
}
/// Get shader location attribute
pub fn rlGetLocationAttrib(shaderId: u32, attribName: [*:0]const u8) i32 {
pub fn rlGetLocationAttrib(shaderId: u32, attribName: [:0]const u8) i32 {
return @as(i32, cdef.rlGetLocationAttrib(@as(c_uint, shaderId), @as([*c]const u8, @ptrCast(attribName))));
}