summaryrefslogtreecommitdiff
path: root/examples/cube
diff options
context:
space:
mode:
authorOmniscient <omniscient.oce@gmail.com>2024-06-09 16:51:46 +1000
committerOmniscient <omniscient.oce@gmail.com>2024-06-09 16:51:46 +1000
commitb9a7166d9a7e2b0eed948353c134e72dfa86ab58 (patch)
treea32d0253f45c927f141e3f4cbc1f58a0f6ca3adb /examples/cube
parent9c79df522980eabdc5e52592cbd152e2a285c4cc (diff)
fix texture on cube with opengl
Diffstat (limited to 'examples/cube')
-rw-r--r--examples/cube/ex_cube.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/examples/cube/ex_cube.c b/examples/cube/ex_cube.c
index e85b5c1..8789b00 100644
--- a/examples/cube/ex_cube.c
+++ b/examples/cube/ex_cube.c
@@ -142,11 +142,7 @@ int main() {
mvp_uniforms mvp_data = { .model = model, .view = view, .projection = proj };
my_shader_bind_group shader_bind_data = { .mvp = mvp_data, .tex = texture };
mvp_uniforms_data.data = &shader_bind_data;
- /* encode_bind_shader_data(enc, 0, &mvp_uniforms_data); */
-
- uniform_mat4f(enc->pipeline->shader_id, "model", &model);
- uniform_mat4f(enc->pipeline->shader_id, "view", &view);
- uniform_mat4f(enc->pipeline->shader_id, "projection", &proj);
+ encode_bind_shader_data(enc, 0, &mvp_uniforms_data);
// Record draw calls
draw_mesh(&cube, &model);