Two triangles with changing uniforms

This commit is contained in:
nothke 2024-06-11 20:46:57 +02:00
parent d268a6e8f6
commit 114cc1b057

View File

@ -72,11 +72,9 @@ export fn frame() void {
state.vsParams.offset[0] = col.r;
sg.beginPass(.{ .action = pass_action, .swapchain = sokol.glue.swapchain() });
sg.asRange(3);
sg.applyPipeline(state.pip);
sg.applyBindings(state.bind);
sg.applyUniforms(.FS, shader.SLOT_fs_params, sg.asRange(&state.vsParams));
sg.applyBindings(state.bind);
sg.draw(0, 3, 1);
sg.applyBindings(state.bind2);
sg.draw(0, 3, 1);