diff options
author | iurii plugatarov <[email protected]> | 2024-08-19 23:49:44 +0200 |
---|---|---|
committer | iurii plugatarov <[email protected]> | 2024-08-19 23:49:44 +0200 |
commit | 0be81b1387f010bb00e1ea34ff66561fa67cedef (patch) | |
tree | ba7f9674e339e82abc495bf64aac6a80125b0c8c /src/shader | |
parent | 30c8a4d7c2160c174392aa2dccf60178f9cd02c2 (diff) | |
download | funhalla-0be81b1387f010bb00e1ea34ff66561fa67cedef.tar.gz |
updated code
Diffstat (limited to 'src/shader')
-rw-r--r-- | src/shader/shader.odin | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shader/shader.odin b/src/shader/shader.odin index 2aa989c..cd798ff 100644 --- a/src/shader/shader.odin +++ b/src/shader/shader.odin @@ -47,12 +47,12 @@ set_f32 :: proc(using shader: ^Shader, name: cstring, value: f32) { gl.Uniform1f(gl.GetUniformLocation(id, name), value) } -set_vec3 :: proc(using shader: ^Shader, name: cstring, value: [^]f32) { - gl.Uniform3fv(gl.GetUniformLocation(id, name), 1, value) +set_vec3 :: proc(using shader: ^Shader, name: cstring, value: ^Vec3) { + gl.Uniform3fv(gl.GetUniformLocation(id, name), 1, &value[0]) } -set_mat4 :: proc(using shader: ^Shader, name: cstring, value: [^]f32) { - gl.UniformMatrix4fv(gl.GetUniformLocation(id, name), 1, gl.FALSE, value) +set_mat4 :: proc(using shader: ^Shader, name: cstring, value: ^Mat4) { + gl.UniformMatrix4fv(gl.GetUniformLocation(id, name), 1, gl.FALSE, &value[0][0]) } set_value :: proc { |