Skip to content

Commit

Permalink
Fix shader and put event handling in gfx
Browse files Browse the repository at this point in the history
  • Loading branch information
bfeldpw committed Jan 3, 2024
1 parent 1fceffe commit 829e085
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/gfx_core.zig
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,10 @@ pub fn finishFrame() !void {
tex_bind_statistics.finishFrame();
vbo_bind_statistics.finishFrame();
uniform_update_statistics.finishFrame();

c.glfwPollEvents();
if (!glfwCheckError()) return error.GLFWFailed;

}

//-----------------------------------------------------------------------------//
Expand Down
4 changes: 2 additions & 2 deletions src/gfx_rw.zig
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ pub fn reloadShaders() !void {
log_gfx.info("Reloading shaders", .{});

const sp_base = gfx_core.createShaderProgramFromFiles(
cfg.gfx.shader_dir ++ "base.vert",
cfg.gfx.shader_dir ++ "base.frag") catch |e| {
cfg.gfx.shader_dir ++ "pxy_f32_crgba_u32_base.vert",
cfg.gfx.shader_dir ++ "pxy_crgba_f32_base.frag") catch |e| {

log_gfx.err("Error reloading shaders: {}", .{e});
return;
Expand Down

0 comments on commit 829e085

Please sign in to comment.