Skip to content

Commit

Permalink
fix more samples for bindings cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed Oct 9, 2024
1 parent cb88e12 commit 9cd7e20
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 91 deletions.
178 changes: 89 additions & 89 deletions sapp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,20 @@ fips_begin_app(noninterleaved-sapp-ui windowed)
target_compile_definitions(noninterleaved-sapp-ui PRIVATE USE_DBG_UI)
fips_end_app()

#fips_ide_group(Samples)
#fips_begin_app(vertexpull-sapp windowed)
# fips_files(vertexpull-sapp.c)
# sokol_shader(vertexpull-sapp.glsl ${slang})
# fips_deps(sokol)
#fips_end_app()
#fips_ide_group(SamplesWithDebugUI)
#fips_begin_app(vertexpull-sapp-ui windowed)
# fips_files(vertexpull-sapp.c)
# sokol_shader(vertexpull-sapp.glsl ${slang})
# fips_deps(sokol dbgui)
# target_compile_definitions(vertexpull-sapp-ui PRIVATE USE_DBG_UI)
#fips_end_app()
#
fips_ide_group(Samples)
fips_begin_app(vertexpull-sapp windowed)
fips_files(vertexpull-sapp.c)
sokol_shader(vertexpull-sapp.glsl ${slang})
fips_deps(sokol)
fips_end_app()
fips_ide_group(SamplesWithDebugUI)
fips_begin_app(vertexpull-sapp-ui windowed)
fips_files(vertexpull-sapp.c)
sokol_shader(vertexpull-sapp.glsl ${slang})
fips_deps(sokol dbgui)
target_compile_definitions(vertexpull-sapp-ui PRIVATE USE_DBG_UI)
fips_end_app()

fips_ide_group(Samples)
fips_begin_app(texcube-sapp windowed)
fips_files(texcube-sapp.c)
Expand Down Expand Up @@ -389,44 +389,44 @@ fips_end_app()
# target_compile_definitions(uniformtypes-sapp-ui PRIVATE USE_DBG_UI)
#fips_end_app()
#
#fips_ide_group(Samples)
#fips_begin_app(imgui-sapp windowed)
# fips_files(imgui-sapp.cc)
# # use sokol-cpp for testing here, this isn't required though
# fips_deps(sokol-cpp imgui)
# if (FIPS_IOS)
# fips_files(ios-info.plist)
# endif()
#fips_end_app()
#
#fips_ide_group(Samples)
#fips_begin_app(imgui-dock-sapp windowed)
# fips_files(imgui-dock-sapp.cc)
# # use sokol-cpp for testing here, this isn't required though
# fips_deps(sokol-cpp imgui-dock)
# if (FIPS_IOS)
# fips_files(ios-info.plist)
# endif()
#fips_end_app()
#
#fips_ide_group(Samples)
#fips_begin_app(imgui-highdpi-sapp windowed)
# fips_files(imgui-highdpi-sapp.cc)
# fips_deps(sokol imgui)
# if (FIPS_IOS)
# fips_files(ios-info.plist)
# endif()
#fips_end_app()
#
#fips_ide_group(Samples)
#fips_begin_app(cimgui-sapp windowed)
# fips_files(cimgui-sapp.c)
# fips_deps(sokol cimgui)
# if (FIPS_IOS)
# fips_files(ios-info.plist)
# endif()
#fips_end_app()
#
fips_ide_group(Samples)
fips_begin_app(imgui-sapp windowed)
fips_files(imgui-sapp.cc)
# use sokol-cpp for testing here, this isn't required though
fips_deps(sokol-cpp imgui)
if (FIPS_IOS)
fips_files(ios-info.plist)
endif()
fips_end_app()

fips_ide_group(Samples)
fips_begin_app(imgui-dock-sapp windowed)
fips_files(imgui-dock-sapp.cc)
# use sokol-cpp for testing here, this isn't required though
fips_deps(sokol-cpp imgui-dock)
if (FIPS_IOS)
fips_files(ios-info.plist)
endif()
fips_end_app()

fips_ide_group(Samples)
fips_begin_app(imgui-highdpi-sapp windowed)
fips_files(imgui-highdpi-sapp.cc)
fips_deps(sokol imgui)
if (FIPS_IOS)
fips_files(ios-info.plist)
endif()
fips_end_app()

fips_ide_group(Samples)
fips_begin_app(cimgui-sapp windowed)
fips_files(cimgui-sapp.c)
fips_deps(sokol cimgui)
if (FIPS_IOS)
fips_files(ios-info.plist)
endif()
fips_end_app()

#fips_ide_group(Samples)
#fips_begin_app(imgui-usercallback-sapp windowed)
# fips_files(imgui-usercallback-sapp.c)
Expand Down Expand Up @@ -664,42 +664,42 @@ fips_end_app()
# fips_deps(sokol cimgui)
#fips_end_app()
#
#fips_ide_group(Samples)
#fips_begin_app(debugtext-sapp windowed)
# fips_files(debugtext-sapp.c)
# fips_deps(sokol)
#fips_end_app()
#fips_ide_group(SamplesWithDebugUI)
#fips_begin_app(debugtext-sapp-ui windowed)
# fips_files(debugtext-sapp.c)
# fips_deps(sokol dbgui)
# target_compile_definitions(debugtext-sapp-ui PRIVATE USE_DBG_UI)
#fips_end_app()
#
#fips_ide_group(Samples)
#fips_begin_app(debugtext-printf-sapp windowed)
# fips_files(debugtext-printf-sapp.c)
# fips_deps(sokol)
#fips_end_app()
#fips_ide_group(SamplesWithDebugUI)
#fips_begin_app(debugtext-printf-sapp-ui windowed)
# fips_files(debugtext-printf-sapp.c)
# fips_deps(sokol dbgui)
# target_compile_definitions(debugtext-printf-sapp-ui PRIVATE USE_DBG_UI)
#fips_end_app()
#
#fips_ide_group(Samples)
#fips_begin_app(debugtext-userfont-sapp windowed)
# fips_files(debugtext-userfont-sapp.c)
# fips_deps(sokol)
#fips_end_app()
#fips_ide_group(SamplesWithDebugUI)
#fips_begin_app(debugtext-userfont-sapp-ui windowed)
# fips_files(debugtext-userfont-sapp.c)
# fips_deps(sokol dbgui)
# target_compile_definitions(debugtext-userfont-sapp-ui PRIVATE USE_DBG_UI)
#fips_end_app()
#
fips_ide_group(Samples)
fips_begin_app(debugtext-sapp windowed)
fips_files(debugtext-sapp.c)
fips_deps(sokol)
fips_end_app()
fips_ide_group(SamplesWithDebugUI)
fips_begin_app(debugtext-sapp-ui windowed)
fips_files(debugtext-sapp.c)
fips_deps(sokol dbgui)
target_compile_definitions(debugtext-sapp-ui PRIVATE USE_DBG_UI)
fips_end_app()

fips_ide_group(Samples)
fips_begin_app(debugtext-printf-sapp windowed)
fips_files(debugtext-printf-sapp.c)
fips_deps(sokol)
fips_end_app()
fips_ide_group(SamplesWithDebugUI)
fips_begin_app(debugtext-printf-sapp-ui windowed)
fips_files(debugtext-printf-sapp.c)
fips_deps(sokol dbgui)
target_compile_definitions(debugtext-printf-sapp-ui PRIVATE USE_DBG_UI)
fips_end_app()

fips_ide_group(Samples)
fips_begin_app(debugtext-userfont-sapp windowed)
fips_files(debugtext-userfont-sapp.c)
fips_deps(sokol)
fips_end_app()
fips_ide_group(SamplesWithDebugUI)
fips_begin_app(debugtext-userfont-sapp-ui windowed)
fips_files(debugtext-userfont-sapp.c)
fips_deps(sokol dbgui)
target_compile_definitions(debugtext-userfont-sapp-ui PRIVATE USE_DBG_UI)
fips_end_app()

#fips_ide_group(Samples)
#fips_begin_app(debugtext-context-sapp windowed)
# fips_files(debugtext-context-sapp.c)
Expand All @@ -713,7 +713,7 @@ fips_end_app()
# fips_deps(sokol dbgui)
# target_compile_definitions(debugtext-context-sapp-ui PRIVATE USE_DBG_UI)
#fips_end_app()
#

#fips_ide_group(Samples)
#fips_begin_app(debugtext-layers-sapp windowed)
# fips_files(debugtext-layers-sapp.c)
Expand Down
4 changes: 2 additions & 2 deletions sapp/vertexpull-sapp.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ static void init(void) {
// resource bindings, note that there is no vertex buffer binding
state.bind = (sg_bindings){
.index_buffer = ibuf,
.vs.storage_buffers[SLOT_ssbo] = sbuf,
.storage_buffers[SBUF_ssbo] = sbuf,
};

// define a clear color
Expand Down Expand Up @@ -131,7 +131,7 @@ static void frame(void) {
sg_begin_pass(&(sg_pass){ .action = state.pass_action, .swapchain = sglue_swapchain() });
sg_apply_pipeline(state.pip);
sg_apply_bindings(&state.bind);
sg_apply_uniforms(SG_SHADERSTAGE_VS, SLOT_vs_params, &SG_RANGE(vs_params));
sg_apply_uniforms(UB_vs_params, &SG_RANGE(vs_params));
sg_draw(0, 36, 1);
__dbgui_draw();
sg_end_pass();
Expand Down

0 comments on commit 9cd7e20

Please sign in to comment.