From 4f0331f941f6c82685aaee962b4fba5dfc089b5b Mon Sep 17 00:00:00 2001 From: Martin Felis Date: Fri, 21 Apr 2023 13:16:04 +0200 Subject: [PATCH] Fixed sgl initialization on my laptop. --- src/AnimGraph/AnimGraph.h | 2 +- src/main.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AnimGraph/AnimGraph.h b/src/AnimGraph/AnimGraph.h index bcb9c5d..2b5ab7a 100644 --- a/src/AnimGraph/AnimGraph.h +++ b/src/AnimGraph/AnimGraph.h @@ -19,7 +19,7 @@ struct AnimGraph { std::vector > m_node_input_connections; std::vector > m_node_output_connections; std::vector m_animdata_blocks; - NodeDescriptorBase* m_node_descriptor; + NodeDescriptorBase* m_node_descriptor = nullptr; char* m_input_buffer = nullptr; char* m_output_buffer = nullptr; char* m_connection_data_storage = nullptr; diff --git a/src/main.cc b/src/main.cc index 0363687..c72fb2d 100644 --- a/src/main.cc +++ b/src/main.cc @@ -540,6 +540,7 @@ int main() { .sample_count = cMSAASampleCount, .logger = sokol_logger}; sgl_setup(&sgldesc); + sgl_defaults(); // sgl_context_desc_t sgl_context_desc = {}; // sgl_context ctx = sgl_make_context(&sgl_context_desc); @@ -1164,7 +1165,6 @@ int main() { ImGui::ShowDemoWindow(); } - sgl_defaults(); sg_begin_pass(offscreen_viewport.pass, &offscreen_viewport.pass_action); sgl_load_pipeline(offscreen_viewport.glpip); sgl_draw();