From: Brendan Hansen Date: Wed, 9 Mar 2022 02:56:53 +0000 (-0600) Subject: using cptr for shader source now X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=128ac733c515b8eeff982f523a3926f9454eefb4;p=bar-game.git using cptr for shader source now --- diff --git a/run_tree/lib/onyx_opengles.so b/run_tree/lib/onyx_opengles.so index 2b34641..6015b67 100755 Binary files a/run_tree/lib/onyx_opengles.so and b/run_tree/lib/onyx_opengles.so differ diff --git a/src/build.onyx b/src/build.onyx index 8906ca4..429f03f 100644 --- a/src/build.onyx +++ b/src/build.onyx @@ -4,7 +4,7 @@ package runtime.vars MAJOR_VERSION :: 0 MINOR_VERSION :: 1 -DEBUG :: true +// DEBUG :: true #load_path ONYX_PATH diff --git a/src/gfx/shader.onyx b/src/gfx/shader.onyx index a35ce64..751c31f 100644 --- a/src/gfx/shader.onyx +++ b/src/gfx/shader.onyx @@ -144,8 +144,8 @@ update_model_matrix :: (v: Vector2) { """; header := VERTEX_HEADER if type == GL_VERTEX_SHADER else FRAGMENT_HEADER; - sources : [] ^u8 = .[ header.data, source.data ]; - source_lens : [] i32 = .[ header.count, source.count ]; + sources : [] cptr(u8) = .[ cptr.make(header.data), cptr.make(source.data) ]; + source_lens : [] i32 = .[ header.count, source.count ]; glShaderSource(shader, 2, sources.data, source_lens.data); glCompileShader(shader);