diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2025-09-16 16:58:02 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2025-09-16 17:00:08 -0400 |
| commit | 73c5e170260638cc566cba2689ea570caee39251 (patch) | |
| tree | 256b36398d33650054a885e572437909f88485cb /tests/pke-test-static-ui.cpp | |
| parent | e52ef2e49ae660833370befc34ba79d412cb4604 (diff) | |
pke: major object lifetime overhaul.
Added pke-test-load-unload to ensure objects are
managed as expected.
Diffstat (limited to 'tests/pke-test-static-ui.cpp')
| -rw-r--r-- | tests/pke-test-static-ui.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/pke-test-static-ui.cpp b/tests/pke-test-static-ui.cpp index ca696fc..c102aba 100644 --- a/tests/pke-test-static-ui.cpp +++ b/tests/pke-test-static-ui.cpp @@ -8,6 +8,7 @@ #include "window.hpp" #include "vendor-glm-include.hpp" #include <limits> + struct pke_ui_box_instance_buffer_item { glm::mat4 pos_scale; glm::vec2 px_scale; @@ -18,10 +19,15 @@ struct pke_ui_flex_params { float px_per_unit; float unit_total; }; + #define PKE_TEST_EXPOSE #include "static-ui.hpp" +static pk_membucket *bkt; + void pke_test_static_ui_setup() { + bkt = pk_mem_bucket_create("pke_test_static_ui", PK_MEM_DEFAULT_BUCKET_SIZE, PK_MEMBUCKET_FLAG_NONE); + pk_mem_bucket_set_client_mem_bucket(bkt); Extent.width = 1920; Extent.height = 1080; pk_ev_init(nullptr); @@ -35,6 +41,9 @@ void pke_test_static_ui_teardown() { ECS_Teardown(); pk_ev_teardown(); pke_input_teardown(); + pk_mem_bucket_destroy(bkt); + pk_mem_bucket_set_client_mem_bucket(nullptr); + bkt = nullptr; } // test static |
