7dc5b51726
Sustituye ~30 lineas de cableado manual de save/load/list/delete contra
layout_storage_sqlite por dos llamadas a la nueva API publica:
g_layouts = fn_ui::layout_storage_open("shaders_lab.db");
fn_ui::layout_storage_make_callbacks(g_layouts, g_layout_cb);
El blob pendiente lo gestiona el storage (layout_storage_apply_pending).
on_reset se override para ademas re-mostrar los paneles de shaders_lab.
La tabla ui_layouts heredada queda intacta — la nueva API usa
imgui_layouts en la misma BD.
31 lines
1.3 KiB
CMake
31 lines
1.3 KiB
CMake
add_imgui_app(shaders_lab
|
|
main.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/gl_loader.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/gl_shader.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/gl_framebuffer.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/fullscreen_quad.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/shader_canvas.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/uniform_parser.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/uniform_panel.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/dag_catalog.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/dag_compile.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/dag_uniforms.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/dag_panel.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/dag_node_editor.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/dag_palette.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/dag_node_previews.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/shaderlab_db.cpp
|
|
${CMAKE_SOURCE_DIR}/functions/gfx/code_to_generator.cpp
|
|
# fps_overlay, panel_menu, layouts_menu, app_menubar, layout_storage ya
|
|
# viven en fn_framework.
|
|
)
|
|
target_include_directories(shaders_lab PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
)
|
|
target_link_libraries(shaders_lab PRIVATE imgui_node_editor SQLite::SQLite3)
|
|
|
|
if(WIN32)
|
|
# GUI app: sin consola al lanzar (subsystem:windows / -mwindows)
|
|
set_target_properties(shaders_lab PROPERTIES WIN32_EXECUTABLE TRUE)
|
|
endif()
|