├── .clang-format ├── .gitattributes ├── .gitignore ├── .gitlab-ci.yml ├── .gitmodules ├── CMakeLists.txt ├── LICENSE ├── README.md ├── external ├── CLI11 │ ├── CMakeLists.txt │ └── include │ │ └── CLI │ │ └── CLI11.hpp ├── CMakeLists.txt ├── imgui │ ├── CMakeLists.txt │ └── include │ │ └── imconfig.h ├── imgui_file_dialog │ ├── CMakeLists.txt │ └── include │ │ └── ImGuiFileDialogConfig.h ├── vulkan_memory_allocator │ ├── CMakeLists.txt │ ├── vk_mem_alloc.cpp │ └── vk_mem_alloc.h └── vulkan_mini_libs │ ├── CMakeLists.txt │ └── src │ ├── struct_cleanup.c │ ├── struct_compare.c │ └── value_serialization.cpp ├── foe-config.cmake.in ├── foe-settings.example.yml ├── libs ├── CMakeLists.txt ├── foe │ ├── CMakeLists.txt │ ├── foe_core-config.cmake │ ├── include │ │ ├── CMakeLists.txt │ │ └── foe │ │ │ ├── algorithm.hpp │ │ │ ├── binary_result.h │ │ │ ├── chrono │ │ │ ├── dilated_clock.hpp │ │ │ ├── dilated_long_clock.hpp │ │ │ ├── easy_clock.hpp │ │ │ └── program_clock.hpp │ │ │ ├── delimited_string.h │ │ │ ├── engine_detail.h │ │ │ ├── filesystem.hpp │ │ │ ├── handle.h │ │ │ ├── hex.h │ │ │ ├── log.h │ │ │ ├── managed_memory.h │ │ │ ├── memory_alignment.h │ │ │ ├── memory_mapped_file.h │ │ │ ├── plugin.h │ │ │ ├── quaternion_math.hpp │ │ │ ├── result.h │ │ │ ├── search_paths.hpp │ │ │ ├── split_thread_pool.h │ │ │ └── type_defs.h │ ├── src │ │ ├── CMakeLists.txt │ │ ├── binary_result.c │ │ ├── chrono │ │ │ ├── CMakeLists.txt │ │ │ ├── dilated_clock.cpp │ │ │ ├── dilated_long_clock.cpp │ │ │ └── program_clock.cpp │ │ ├── delimited_string.c │ │ ├── filesystem.cpp │ │ ├── hex.c │ │ ├── log.cpp │ │ ├── log.hpp │ │ ├── logger.cpp │ │ ├── managed_memory.cpp │ │ ├── managed_memory_subset.c │ │ ├── memory_mapped_file_posix.c │ │ ├── memory_mapped_file_win32.cpp │ │ ├── plugin.cpp │ │ ├── result.c │ │ ├── result.h │ │ ├── search_paths.cpp │ │ ├── search_paths_reader.cpp │ │ ├── search_paths_writer.cpp │ │ └── split_thread_pool.cpp │ └── test │ │ ├── CMakeLists.txt │ │ ├── algorithm.cpp │ │ ├── c_header_compatibility.c │ │ ├── chrono │ │ ├── CMakeLists.txt │ │ ├── dilated_clock.cpp │ │ ├── dilated_long_clock.cpp │ │ ├── easy_clock.cpp │ │ └── program_clock.cpp │ │ ├── data │ │ └── memory_mapped_file │ │ │ ├── 0b_file │ │ │ ├── 128kb_file │ │ │ └── 4kb_file │ │ ├── delimited_string.cpp │ │ ├── filesystem.cpp │ │ ├── hex.cpp │ │ ├── logger.cpp │ │ ├── managed_memory.cpp │ │ ├── memory_alignment.cpp │ │ ├── memory_mapped_file.cpp │ │ ├── plugin.cpp │ │ ├── result.cpp │ │ ├── search_paths.cpp │ │ ├── split_thread_pool.cpp │ │ └── test_plugin_so │ │ ├── CMakeLists.txt │ │ └── test.c ├── foe_crypto │ ├── CMakeLists.txt │ ├── Findsodium.cmake │ ├── foe_crypto-config.cmake │ ├── include │ │ ├── CMakeLists.txt │ │ └── foe │ │ │ └── crypto │ │ │ ├── aes_256_gcm.h │ │ │ ├── ed25519.h │ │ │ ├── key.h │ │ │ ├── memory.h │ │ │ ├── random.h │ │ │ ├── result.h │ │ │ ├── sha256.h │ │ │ ├── sha512.h │ │ │ ├── x25519.h │ │ │ └── xchacha20_poly1305.h │ ├── src │ │ ├── CMakeLists.txt │ │ ├── aes_256_gcm.c │ │ ├── ed25519.c │ │ ├── key.c │ │ ├── memory.c │ │ ├── random.c │ │ ├── result.c │ │ ├── result.h │ │ ├── sha256.c │ │ ├── sha512.c │ │ ├── x25519.c │ │ └── xchacha20_poly1305.c │ └── test │ │ ├── CMakeLists.txt │ │ ├── aes_256_gcm.cpp │ │ ├── c_header_compatibility.c │ │ ├── ed25519.cpp │ │ ├── key.cpp │ │ ├── result.cpp │ │ ├── sha256.cpp │ │ ├── sha512.cpp │ │ ├── x25519.cpp │ │ └── xchacha20_poly1305.cpp ├── foe_ecs │ ├── CMakeLists.txt │ ├── foe_ecs-config.cmake │ ├── include │ │ ├── CMakeLists.txt │ │ └── foe │ │ │ └── ecs │ │ │ ├── binary.h │ │ │ ├── component_pool.h │ │ │ ├── entity_list.h │ │ │ ├── group_translator.h │ │ │ ├── id.h │ │ │ ├── id_to_string.hpp │ │ │ ├── indexes.h │ │ │ ├── name_map.h │ │ │ └── result.h │ ├── libs │ │ └── yaml │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_ecs_yaml-config.cmake │ │ │ ├── include │ │ │ ├── CMakeLists.txt │ │ │ └── foe │ │ │ │ └── ecs │ │ │ │ └── yaml │ │ │ │ ├── id.hpp │ │ │ │ └── indexes.hpp │ │ │ ├── src │ │ │ ├── CMakeLists.txt │ │ │ ├── id.cpp │ │ │ └── indexes.cpp │ │ │ └── test │ │ │ ├── CMakeLists.txt │ │ │ ├── id.cpp │ │ │ └── indexes.cpp │ ├── src │ │ ├── CMakeLists.txt │ │ ├── binary.c │ │ ├── component_pool.cpp │ │ ├── entity_list.c │ │ ├── group_translator.cpp │ │ ├── id_to_string.cpp │ │ ├── indexes.cpp │ │ ├── log.cpp │ │ ├── log.hpp │ │ ├── name_map.cpp │ │ ├── result.c │ │ └── result.h │ └── test │ │ ├── CMakeLists.txt │ │ ├── c_header_compatibility.c │ │ ├── component_pool.cpp │ │ ├── component_pool_entity_list.cpp │ │ ├── editor_name_map.cpp │ │ ├── entity_list.cpp │ │ ├── group_translator.cpp │ │ ├── id.cpp │ │ ├── indexes.cpp │ │ └── result.cpp ├── foe_graphics │ ├── CMakeLists.txt │ ├── foe_graphics-config.cmake │ ├── include │ │ ├── CMakeLists.txt │ │ └── foe │ │ │ └── graphics │ │ │ ├── backend.h │ │ │ ├── builtin_descriptor_sets.h │ │ │ ├── delayed_caller.h │ │ │ ├── mesh.h │ │ │ ├── render_target.h │ │ │ ├── render_view_pool.h │ │ │ ├── result.h │ │ │ ├── runtime.h │ │ │ ├── session.h │ │ │ ├── shader.h │ │ │ ├── type_defs.h │ │ │ ├── upload_buffer.h │ │ │ ├── upload_context.h │ │ │ └── upload_request.h │ ├── libs │ │ ├── imgui │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_graphics_imgui-config.cmake │ │ │ ├── include │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── foe │ │ │ │ │ └── graphics │ │ │ │ │ └── imgui │ │ │ │ │ └── builtin_descriptor_sets.hpp │ │ │ └── src │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── builtin_descriptor_sets.cpp │ │ └── yaml │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_graphics_yaml-config.cmake │ │ │ ├── include │ │ │ ├── CMakeLists.txt │ │ │ └── foe │ │ │ │ └── graphics │ │ │ │ └── yaml │ │ │ │ └── enums.hpp │ │ │ └── src │ │ │ ├── CMakeLists.txt │ │ │ └── enums.cpp │ ├── src │ │ ├── CMakeLists.txt │ │ ├── builtin_descriptor_sets.c │ │ ├── delayed_caller.cpp │ │ ├── log.cpp │ │ ├── log.hpp │ │ ├── result.c │ │ └── result.h │ └── test │ │ ├── CMakeLists.txt │ │ ├── c_header_compatibility.c │ │ ├── result.cpp │ │ └── stub.cpp ├── foe_graphics_resource │ ├── CMakeLists.txt │ ├── foe_graphics_resource-config.cmake │ ├── include │ │ ├── CMakeLists.txt │ │ └── foe │ │ │ └── graphics │ │ │ └── resource │ │ │ ├── binary.h │ │ │ ├── cleanup.h │ │ │ ├── compare.h │ │ │ ├── image.hpp │ │ │ ├── image_create_info.h │ │ │ ├── material.hpp │ │ │ ├── material_create_info.h │ │ │ ├── mesh.hpp │ │ │ ├── mesh_create_info.h │ │ │ ├── registration.h │ │ │ ├── result.h │ │ │ ├── shader.hpp │ │ │ ├── shader_create_info.h │ │ │ ├── type_defs.h │ │ │ ├── vertex_descriptor.hpp │ │ │ └── vertex_descriptor_create_info.h │ ├── libs │ │ ├── binary │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_graphics_resource_binary-config.cmake │ │ │ ├── include │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── foe │ │ │ │ │ └── graphics │ │ │ │ │ └── resource │ │ │ │ │ └── binary │ │ │ │ │ ├── export_registration.h │ │ │ │ │ ├── import_registration.h │ │ │ │ │ └── result.h │ │ │ ├── src │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── export_registration.c │ │ │ │ ├── image.c │ │ │ │ ├── image.cpp │ │ │ │ ├── image.h │ │ │ │ ├── import_registration.c │ │ │ │ ├── material.c │ │ │ │ ├── material.cpp │ │ │ │ ├── material.h │ │ │ │ ├── mesh.c │ │ │ │ ├── mesh.cpp │ │ │ │ ├── mesh.h │ │ │ │ ├── result.c │ │ │ │ ├── result.h │ │ │ │ ├── shader.c │ │ │ │ ├── shader.cpp │ │ │ │ ├── shader.h │ │ │ │ ├── vertex_descriptor.c │ │ │ │ ├── vertex_descriptor.cpp │ │ │ │ └── vertex_descriptor.h │ │ │ └── test │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── c_header_compatibility.c │ │ │ │ └── result.cpp │ │ ├── imgui │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_graphics_resource_imgui-config.cmake │ │ │ ├── include │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── foe │ │ │ │ │ └── graphics │ │ │ │ │ └── resource │ │ │ │ │ └── imgui │ │ │ │ │ └── registration.hpp │ │ │ └── src │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── image.cpp │ │ │ │ ├── image.hpp │ │ │ │ ├── material.cpp │ │ │ │ ├── material.hpp │ │ │ │ ├── mesh.cpp │ │ │ │ ├── mesh.hpp │ │ │ │ ├── registration.cpp │ │ │ │ ├── shader.cpp │ │ │ │ ├── shader.hpp │ │ │ │ ├── vertex_descriptor.cpp │ │ │ │ └── vertex_descriptor.hpp │ │ └── yaml │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_graphics_resource_yaml-config.cmake │ │ │ ├── include │ │ │ ├── CMakeLists.txt │ │ │ └── foe │ │ │ │ └── graphics │ │ │ │ └── resource │ │ │ │ └── yaml │ │ │ │ ├── export_registration.h │ │ │ │ ├── import_registration.h │ │ │ │ ├── result.h │ │ │ │ └── structs.hpp │ │ │ ├── src │ │ │ ├── CMakeLists.txt │ │ │ ├── assimp_flags.hpp │ │ │ ├── export_registration.cpp │ │ │ ├── image.cpp │ │ │ ├── image.hpp │ │ │ ├── import_registration.cpp │ │ │ ├── material.cpp │ │ │ ├── material.hpp │ │ │ ├── mesh.cpp │ │ │ ├── mesh.hpp │ │ │ ├── result.c │ │ │ ├── result.h │ │ │ ├── shader.cpp │ │ │ ├── shader.hpp │ │ │ ├── structs.cpp │ │ │ ├── vertex_descriptor.cpp │ │ │ └── vertex_descriptor.hpp │ │ │ └── test │ │ │ ├── CMakeLists.txt │ │ │ ├── c_header_compatibility.c │ │ │ └── result.cpp │ ├── src │ │ ├── CMakeLists.txt │ │ ├── binary.c │ │ ├── cleanup.c │ │ ├── compare.c │ │ ├── image_loader.cpp │ │ ├── image_loader.hpp │ │ ├── log.cpp │ │ ├── log.hpp │ │ ├── material_loader.cpp │ │ ├── material_loader.hpp │ │ ├── mesh_loader.cpp │ │ ├── mesh_loader.hpp │ │ ├── registration.cpp │ │ ├── result.c │ │ ├── result.h │ │ ├── shader_loader.cpp │ │ ├── shader_loader.hpp │ │ ├── vertex_descriptor.cpp │ │ ├── vertex_descriptor_loader.cpp │ │ ├── vertex_descriptor_loader.hpp │ │ ├── vk_result.c │ │ └── vk_result.h │ └── test │ │ ├── CMakeLists.txt │ │ ├── binary_foeImageCreateInfo.cpp │ │ ├── c_header_compatibility.c │ │ └── result.cpp ├── foe_graphics_vk │ ├── CMakeLists.txt │ ├── foe_graphics_vk-config.cmake │ ├── include │ │ ├── CMakeLists.txt │ │ └── foe │ │ │ └── graphics │ │ │ └── vk │ │ │ ├── binary.h │ │ │ ├── cleanup.h │ │ │ ├── compare.h │ │ │ ├── error_images.h │ │ │ ├── format.h │ │ │ ├── fragment_descriptor.h │ │ │ ├── fragment_descriptor_pool.h │ │ │ ├── image.h │ │ │ ├── mesh.h │ │ │ ├── model.h │ │ │ ├── pipeline_pool.h │ │ │ ├── queue_family.h │ │ │ ├── render_graph.hpp │ │ │ ├── render_graph │ │ │ ├── job │ │ │ │ ├── blit_image.hpp │ │ │ │ ├── copy_image.hpp │ │ │ │ ├── export_image.hpp │ │ │ │ ├── import_image.hpp │ │ │ │ ├── present_image.hpp │ │ │ │ ├── resolve_image.hpp │ │ │ │ └── synchronize.hpp │ │ │ └── resource │ │ │ │ └── image.hpp │ │ │ ├── render_pass_pool.h │ │ │ ├── render_target.h │ │ │ ├── render_view_pool.h │ │ │ ├── result.h │ │ │ ├── runtime.h │ │ │ ├── sample_count.h │ │ │ ├── session.h │ │ │ ├── shader.h │ │ │ ├── swapchain.h │ │ │ ├── vertex_descriptor.h │ │ │ └── vk_binary.h │ ├── libs │ │ ├── imgui │ │ │ ├── .gitignore │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_graphics_vk_imgui-config.cmake │ │ │ ├── include │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── foe │ │ │ │ │ └── graphics │ │ │ │ │ └── vk │ │ │ │ │ └── imgui │ │ │ │ │ ├── fragment_descriptor.hpp │ │ │ │ │ ├── shader.hpp │ │ │ │ │ ├── vertex_descriptor.hpp │ │ │ │ │ ├── vk_struct.hpp │ │ │ │ │ └── vk_type.hpp │ │ │ ├── src │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── fragment_descriptor.cpp │ │ │ │ ├── shader.cpp │ │ │ │ ├── vertex_descriptor.cpp │ │ │ │ ├── vk_struct.cpp │ │ │ │ └── vk_type.cpp │ │ │ └── tools │ │ │ │ ├── generate_code.sh │ │ │ │ ├── generate_struct_source.py │ │ │ │ └── structs.yaml │ │ └── yaml │ │ │ ├── .gitignore │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_graphics_vk_yaml-config.cmake │ │ │ ├── include │ │ │ ├── CMakeLists.txt │ │ │ └── foe │ │ │ │ └── graphics │ │ │ │ └── vk │ │ │ │ └── yaml │ │ │ │ ├── structs.hpp │ │ │ │ ├── vk_enums.hpp │ │ │ │ ├── vk_pod.hpp │ │ │ │ └── vk_structs.hpp │ │ │ ├── src │ │ │ ├── CMakeLists.txt │ │ │ ├── structs.cpp │ │ │ ├── vk_enums.cpp │ │ │ ├── vk_pod.cpp │ │ │ └── vk_structs.cpp │ │ │ ├── test │ │ │ ├── CMakeLists.txt │ │ │ ├── fuzz │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── fuzzer.cpp │ │ │ │ └── sorter.cpp │ │ │ ├── vk_enums.cpp │ │ │ ├── vk_struct_VkPipelineDepthStencilStateCreateInfo.cpp │ │ │ ├── vk_struct_VkStencilOpState.cpp │ │ │ └── vk_struct_parsing.cpp │ │ │ └── tools │ │ │ ├── generate_code.sh │ │ │ ├── generate_corpus.py │ │ │ ├── generate_fuzz_source.sh │ │ │ ├── generate_sort_source.sh │ │ │ ├── generate_struct_source.py │ │ │ ├── generate_test_source.sh │ │ │ ├── run_fuzz_process.sh │ │ │ └── structs.yaml │ ├── src │ │ ├── CMakeLists.txt │ │ ├── backend.c │ │ ├── binary.c │ │ ├── builtin_descriptor_sets.cpp │ │ ├── builtin_descriptor_sets.hpp │ │ ├── cleanup.c │ │ ├── compare.c │ │ ├── debug_callback.cpp │ │ ├── debug_callback.h │ │ ├── descriptor_set_layout_pool.cpp │ │ ├── descriptor_set_layout_pool.hpp │ │ ├── error_colour_image.cpp │ │ ├── error_depth_stencil_image.cpp │ │ ├── format.c │ │ ├── fragment_descriptor.cpp │ │ ├── fragment_descriptor_pool.cpp │ │ ├── fragment_descriptor_pool.hpp │ │ ├── fragment_descriptor_pool_public.cpp │ │ ├── image.cpp │ │ ├── log.cpp │ │ ├── log.hpp │ │ ├── mesh.cpp │ │ ├── mesh.h │ │ ├── model.cpp │ │ ├── pipeline_pool.cpp │ │ ├── queue_family.cpp │ │ ├── queue_family.hpp │ │ ├── render_graph.cpp │ │ ├── render_graph │ │ │ ├── job │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── blit_image.cpp │ │ │ │ ├── copy_image.cpp │ │ │ │ ├── export_image.cpp │ │ │ │ ├── import_image.cpp │ │ │ │ ├── present_image.cpp │ │ │ │ ├── resolve_image.cpp │ │ │ │ └── synchronize.cpp │ │ │ └── resource │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── image.cpp │ │ ├── render_pass_pool.cpp │ │ ├── render_pass_pool.hpp │ │ ├── render_pass_pool_public.cpp │ │ ├── render_target.cpp │ │ ├── render_target.hpp │ │ ├── render_view_pool.c │ │ ├── result.c │ │ ├── result.h │ │ ├── runtime.cpp │ │ ├── runtime.h │ │ ├── sample_count.c │ │ ├── session.cpp │ │ ├── session.hpp │ │ ├── shader.h │ │ ├── shader_public.cpp │ │ ├── swapchain.c │ │ ├── upload_buffer.hpp │ │ ├── upload_buffer_public.cpp │ │ ├── upload_context.hpp │ │ ├── upload_context_public.cpp │ │ ├── upload_request.cpp │ │ ├── upload_request.hpp │ │ ├── upload_request_public.cpp │ │ ├── vertex_descriptor.cpp │ │ ├── vk_binary.c │ │ ├── vk_result.c │ │ └── vk_result.h │ ├── test │ │ ├── CMakeLists.txt │ │ ├── c_header_compatibility.c │ │ ├── create_test_session.hpp │ │ ├── custom_main.cpp │ │ ├── custom_main.hpp │ │ ├── format.cpp │ │ ├── fragment_shader.h │ │ ├── render_graph.cpp │ │ ├── render_graph_image_jobs.hpp │ │ ├── render_graph_image_resource.cpp │ │ ├── result.cpp │ │ ├── runtime.cpp │ │ ├── sample_count.cpp │ │ ├── session.cpp │ │ ├── shader.cpp │ │ ├── upload.cpp │ │ ├── vertex_shader.h │ │ ├── vk_struct_VkPipelineDepthStencilStateCreateInfo.cpp │ │ └── vk_struct_VkStencilOpState.cpp │ └── tools │ │ ├── check_matching_device.sh │ │ └── gen_merge_feature_set.sh ├── foe_imex │ ├── CMakeLists.txt │ ├── foe_imex-config.cmake │ ├── include │ │ ├── CMakeLists.txt │ │ └── foe │ │ │ └── imex │ │ │ ├── exporters.h │ │ │ ├── importer.h │ │ │ ├── result.h │ │ │ └── type_defs.h │ ├── libs │ │ ├── binary │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_imex_binary-config.cmake │ │ │ ├── include │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── foe │ │ │ │ │ └── imex │ │ │ │ │ └── binary │ │ │ │ │ ├── exporter.h │ │ │ │ │ ├── importer.h │ │ │ │ │ ├── result.h │ │ │ │ │ └── type_defs.h │ │ │ ├── src │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── binary_file_header.h │ │ │ │ ├── exporter.cpp │ │ │ │ ├── exporter.h │ │ │ │ ├── exporter_registration.c │ │ │ │ ├── importer.cpp │ │ │ │ ├── importer_functions.cpp │ │ │ │ ├── importer_functions.hpp │ │ │ │ ├── importer_registration.c │ │ │ │ ├── log.cpp │ │ │ │ ├── log.hpp │ │ │ │ ├── result.c │ │ │ │ └── result.h │ │ │ └── test │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── c_header_compatibility.c │ │ │ │ └── result.cpp │ │ └── yaml │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_imex_yaml-config.cmake │ │ │ ├── include │ │ │ ├── CMakeLists.txt │ │ │ └── foe │ │ │ │ └── imex │ │ │ │ └── yaml │ │ │ │ ├── exporter.hpp │ │ │ │ ├── exporter_registration.h │ │ │ │ ├── importer.hpp │ │ │ │ ├── importer_registration.h │ │ │ │ ├── result.h │ │ │ │ └── type_defs.h │ │ │ ├── src │ │ │ ├── CMakeLists.txt │ │ │ ├── common.hpp │ │ │ ├── exporter.cpp │ │ │ ├── exporter.hpp │ │ │ ├── exporter_registration.cpp │ │ │ ├── import_functionality.cpp │ │ │ ├── import_functionality.hpp │ │ │ ├── importer.cpp │ │ │ ├── importer_registration.cpp │ │ │ ├── log.cpp │ │ │ ├── log.hpp │ │ │ ├── result.c │ │ │ └── result.h │ │ │ └── test │ │ │ ├── CMakeLists.txt │ │ │ ├── c_header_compatibility.c │ │ │ ├── create_importer.cpp │ │ │ ├── data │ │ │ ├── 01-missing-dependencies-file │ │ │ │ └── .dummy │ │ │ ├── 02-incorrect-dependencies-file │ │ │ │ └── dependencies.yml │ │ │ │ │ └── .dummy │ │ │ ├── 03-missing-resource-index-file │ │ │ │ └── dependencies.yml │ │ │ ├── 04-incorrect-resource-index-file │ │ │ │ ├── dependencies.yml │ │ │ │ └── resource_index_data.yml │ │ │ │ │ └── .dummy │ │ │ ├── 05-missing-entity-index-file │ │ │ │ ├── dependencies.yml │ │ │ │ └── resource_index_data.yml │ │ │ ├── 06-incorrect-entity-index-file │ │ │ │ ├── dependencies.yml │ │ │ │ ├── entity_index_data.yml │ │ │ │ │ └── .dummy │ │ │ │ └── resource_index_data.yml │ │ │ ├── 07-bad-resources-dir │ │ │ │ ├── dependencies.yml │ │ │ │ ├── entity_index_data.yml │ │ │ │ ├── resource_index_data.yml │ │ │ │ └── resources │ │ │ ├── 08-bad-entities-dir │ │ │ │ ├── dependencies.yml │ │ │ │ ├── entities │ │ │ │ ├── entity_index_data.yml │ │ │ │ └── resource_index_data.yml │ │ │ ├── 09-bad-external-dir │ │ │ │ ├── dependencies.yml │ │ │ │ ├── entity_index_data.yml │ │ │ │ ├── external │ │ │ │ └── resource_index_data.yml │ │ │ ├── 10-good-empty │ │ │ │ ├── dependencies.yml │ │ │ │ ├── entity_index_data.yml │ │ │ │ └── resource_index_data.yml │ │ │ └── 11-good-content │ │ │ │ ├── dependencies.yml │ │ │ │ ├── entities │ │ │ │ └── 0x00000002.yml │ │ │ │ ├── entity_index_data.yml │ │ │ │ ├── external │ │ │ │ └── findable_external_file │ │ │ │ ├── resource_index_data.yml │ │ │ │ └── resources │ │ │ │ └── 0x00000001.yml │ │ │ ├── imex_registration.cpp │ │ │ ├── importer.cpp │ │ │ ├── result.cpp │ │ │ ├── test_common.hpp │ │ │ └── test_importer.cpp │ ├── src │ │ ├── CMakeLists.txt │ │ ├── c_header_compatibility.c │ │ ├── exporters.cpp │ │ ├── importer.c │ │ ├── importer.cpp │ │ ├── log.cpp │ │ ├── log.hpp │ │ ├── result.c │ │ └── result.h │ └── test │ │ ├── CMakeLists.txt │ │ ├── c_header_compatibility.c │ │ ├── importer.cpp │ │ └── result.cpp ├── foe_imgui │ ├── .gitignore │ ├── CMakeLists.txt │ ├── data │ │ ├── NOTES.md │ │ ├── gen_spirv.sh │ │ ├── imgui.frag │ │ └── imgui.vert │ ├── foe_imgui-config.cmake │ ├── include │ │ ├── CMakeLists.txt │ │ └── foe │ │ │ └── imgui │ │ │ ├── plain_old_data.hpp │ │ │ └── state.hpp │ ├── libs │ │ └── vulkan │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_imgui_vk-config.cmake │ │ │ ├── include │ │ │ ├── CMakeLists.txt │ │ │ └── foe │ │ │ │ └── imgui │ │ │ │ └── vk │ │ │ │ ├── render_graph_job_imgui.hpp │ │ │ │ ├── renderer.hpp │ │ │ │ └── result.h │ │ │ ├── src │ │ │ ├── CMakeLists.txt │ │ │ ├── fragment_shader.h │ │ │ ├── render_graph_job_imgui.cpp │ │ │ ├── renderer.cpp │ │ │ ├── result.c │ │ │ ├── result.h │ │ │ ├── vertex_shader.h │ │ │ ├── vk_result.c │ │ │ └── vk_result.h │ │ │ └── test │ │ │ ├── CMakeLists.txt │ │ │ ├── c_header_compatibility.c │ │ │ └── result.cpp │ ├── src │ │ ├── CMakeLists.txt │ │ ├── plain_old_data.cpp │ │ └── state.cpp │ └── test │ │ ├── CMakeLists.txt │ │ └── state.cpp ├── foe_model │ ├── CMakeLists.txt │ ├── foe_model-config.cmake │ ├── include │ │ ├── CMakeLists.txt │ │ └── foe │ │ │ └── model │ │ │ ├── animation.hpp │ │ │ ├── armature.hpp │ │ │ ├── cube.hpp │ │ │ ├── ico_sphere.hpp │ │ │ ├── importer.hpp │ │ │ └── vertex_component.hpp │ └── src │ │ ├── CMakeLists.txt │ │ ├── animation.cpp │ │ ├── cube.cpp │ │ ├── ico_sphere.cpp │ │ ├── model_log.cpp │ │ ├── model_log.hpp │ │ └── vertex_component.cpp ├── foe_model_assimp │ ├── CMakeLists.txt │ ├── foe_model_assimp-config.cmake │ ├── include │ │ ├── CMakeLists.txt │ │ └── foe │ │ │ └── model │ │ │ └── assimp │ │ │ ├── flags.hpp │ │ │ └── importer.hpp │ ├── src │ │ ├── CMakeLists.txt │ │ ├── ai_glm_conversion.hpp │ │ ├── assimp_mesh_loader.cpp │ │ ├── assimp_mesh_loader.hpp │ │ ├── assimp_scene_loader.cpp │ │ ├── assimp_scene_loader.hpp │ │ ├── flags.cpp │ │ └── importer.cpp │ └── test │ │ ├── CMakeLists.txt │ │ └── flags.cpp ├── foe_network │ ├── CMakeLists.txt │ ├── foe_network-config.cmake │ ├── include │ │ ├── CMakeLists.txt │ │ └── foe │ │ │ └── network │ │ │ ├── address.h │ │ │ ├── result.h │ │ │ └── socket.h │ ├── src │ │ ├── CMakeLists.txt │ │ ├── address.c │ │ ├── address.h │ │ ├── network_initialization.h │ │ ├── network_initialization_unix.c │ │ ├── network_initialization_win32.cpp │ │ ├── result.c │ │ ├── result.h │ │ └── socket.c │ └── test │ │ ├── CMakeLists.txt │ │ ├── address.cpp │ │ ├── c_header_compatibility.c │ │ ├── result.cpp │ │ └── socket.cpp ├── foe_physics │ ├── CMakeLists.txt │ ├── foe_physics-config.cmake │ ├── include │ │ ├── CMakeLists.txt │ │ └── foe │ │ │ └── physics │ │ │ ├── binary.h │ │ │ ├── compare.h │ │ │ ├── component │ │ │ ├── rigid_body.h │ │ │ └── rigid_body_pool.h │ │ │ ├── registration.h │ │ │ ├── resource │ │ │ ├── collision_shape.hpp │ │ │ └── collision_shape_create_info.hpp │ │ │ ├── result.h │ │ │ ├── system.h │ │ │ └── type_defs.h │ ├── libs │ │ ├── binary │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_physics_binary-config.cmake │ │ │ ├── include │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── foe │ │ │ │ │ └── physics │ │ │ │ │ └── binary │ │ │ │ │ ├── export_registration.h │ │ │ │ │ ├── import_registration.h │ │ │ │ │ └── result.h │ │ │ ├── src │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── collision_shape.c │ │ │ │ ├── collision_shape.cpp │ │ │ │ ├── collision_shape.h │ │ │ │ ├── export_registration.c │ │ │ │ ├── import_registration.c │ │ │ │ ├── result.c │ │ │ │ ├── result.h │ │ │ │ ├── rigid_body.cpp │ │ │ │ └── rigid_body.h │ │ │ └── test │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── c_header_compatibility.c │ │ │ │ └── result.cpp │ │ ├── imgui │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_physics_imgui-config.cmake │ │ │ ├── include │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── foe │ │ │ │ │ └── physics │ │ │ │ │ └── imgui │ │ │ │ │ └── registration.hpp │ │ │ └── src │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── collision_shape.cpp │ │ │ │ ├── collision_shape.hpp │ │ │ │ ├── registration.cpp │ │ │ │ ├── rigid_body.cpp │ │ │ │ └── rigid_body.hpp │ │ └── yaml │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_physics_yaml-config.cmake │ │ │ ├── include │ │ │ ├── CMakeLists.txt │ │ │ └── foe │ │ │ │ └── physics │ │ │ │ └── yaml │ │ │ │ ├── export_registration.h │ │ │ │ ├── import_registration.h │ │ │ │ ├── result.h │ │ │ │ └── structs.hpp │ │ │ ├── src │ │ │ ├── CMakeLists.txt │ │ │ ├── collision_shape.cpp │ │ │ ├── collision_shape.hpp │ │ │ ├── export_registration.cpp │ │ │ ├── import_registration.cpp │ │ │ ├── result.c │ │ │ ├── result.h │ │ │ ├── rigid_body.cpp │ │ │ ├── rigid_body.hpp │ │ │ └── structs.cpp │ │ │ └── test │ │ │ ├── CMakeLists.txt │ │ │ ├── c_header_compatibility.c │ │ │ └── result.cpp │ ├── src │ │ ├── CMakeLists.txt │ │ ├── binary.cpp │ │ ├── bt_glm_conversion.hpp │ │ ├── collision_shape_loader.cpp │ │ ├── collision_shape_loader.hpp │ │ ├── compare.cpp │ │ ├── log.cpp │ │ ├── log.hpp │ │ ├── registration.cpp │ │ ├── result.c │ │ ├── result.h │ │ └── system.cpp │ └── test │ │ ├── CMakeLists.txt │ │ ├── c_header_compatibility.c │ │ └── result.cpp ├── foe_position │ ├── CMakeLists.txt │ ├── foe_position-config.cmake │ ├── include │ │ ├── CMakeLists.txt │ │ └── foe │ │ │ └── position │ │ │ ├── binary.h │ │ │ ├── compare.h │ │ │ ├── component │ │ │ ├── 3d.hpp │ │ │ └── 3d_pool.h │ │ │ ├── registration.h │ │ │ ├── result.h │ │ │ └── type_defs.h │ ├── libs │ │ ├── binary │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_position_binary-config.cmake │ │ │ ├── include │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── foe │ │ │ │ │ └── position │ │ │ │ │ └── binary │ │ │ │ │ ├── export_registration.h │ │ │ │ │ ├── import_registration.h │ │ │ │ │ └── result.h │ │ │ ├── src │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── export_registration.c │ │ │ │ ├── import_registration.c │ │ │ │ ├── position_3d.cpp │ │ │ │ ├── position_3d.h │ │ │ │ ├── result.c │ │ │ │ └── result.h │ │ │ └── test │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── c_header_compatibility.c │ │ │ │ └── result.cpp │ │ ├── imgui │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_position_imgui-config.cmake │ │ │ ├── include │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── foe │ │ │ │ │ └── position │ │ │ │ │ └── imgui │ │ │ │ │ └── registration.hpp │ │ │ └── src │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── position_3d.cpp │ │ │ │ ├── position_3d.hpp │ │ │ │ └── registration.cpp │ │ └── yaml │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_position_yaml-config.cmake │ │ │ ├── include │ │ │ ├── CMakeLists.txt │ │ │ └── foe │ │ │ │ └── position │ │ │ │ └── yaml │ │ │ │ ├── export_registration.h │ │ │ │ ├── import_registration.h │ │ │ │ ├── result.h │ │ │ │ └── structs.hpp │ │ │ ├── src │ │ │ ├── 3d.cpp │ │ │ ├── 3d.hpp │ │ │ ├── CMakeLists.txt │ │ │ ├── export_registration.cpp │ │ │ ├── import_registration.cpp │ │ │ ├── result.c │ │ │ ├── result.h │ │ │ └── structs.cpp │ │ │ └── test │ │ │ ├── CMakeLists.txt │ │ │ ├── c_header_compatibility.c │ │ │ └── result.cpp │ └── src │ │ ├── CMakeLists.txt │ │ ├── binary.cpp │ │ ├── compare.cpp │ │ ├── log.cpp │ │ ├── log.hpp │ │ ├── registration.cpp │ │ ├── result.c │ │ └── result.h ├── foe_resource │ ├── CMakeLists.txt │ ├── foe_resource-config.cmake │ ├── include │ │ ├── CMakeLists.txt │ │ └── foe │ │ │ └── resource │ │ │ ├── create_info.h │ │ │ ├── pool.h │ │ │ ├── resource.h │ │ │ ├── resource_fns.h │ │ │ ├── result.h │ │ │ └── type_defs.h │ ├── libs │ │ └── imgui │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_resource_imgui-config.cmake │ │ │ ├── include │ │ │ ├── CMakeLists.txt │ │ │ └── foe │ │ │ │ └── resource │ │ │ │ └── imgui │ │ │ │ ├── create_info.h │ │ │ │ └── resource.h │ │ │ └── src │ │ │ ├── CMakeLists.txt │ │ │ ├── create_info.cpp │ │ │ └── resource.cpp │ ├── src │ │ ├── CMakeLists.txt │ │ ├── create_info.cpp │ │ ├── log.cpp │ │ ├── log.hpp │ │ ├── pool.cpp │ │ ├── resource.cpp │ │ ├── result.c │ │ └── result.h │ └── test │ │ ├── CMakeLists.txt │ │ ├── c_header_compatibility.c │ │ ├── create_info.cpp │ │ ├── pool.cpp │ │ ├── resource.cpp │ │ ├── resource_loading.cpp │ │ ├── resource_replacement.cpp │ │ ├── resource_state_flag_bits.cpp │ │ ├── resource_unloading.cpp │ │ ├── result.cpp │ │ └── test_log_sink.hpp ├── foe_simulation │ ├── CMakeLists.txt │ ├── foe_simulation-config.cmake │ ├── include │ │ ├── CMakeLists.txt │ │ └── foe │ │ │ └── simulation │ │ │ ├── group_data.hpp │ │ │ ├── registration.hpp │ │ │ ├── resource_create_info_history.h │ │ │ ├── resource_create_info_pool.h │ │ │ ├── result.h │ │ │ ├── simulation.hpp │ │ │ └── type_defs.h │ ├── libs │ │ └── imgui │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_simulation_imgui-config.cmake │ │ │ ├── include │ │ │ ├── CMakeLists.txt │ │ │ └── foe │ │ │ │ └── simulation │ │ │ │ └── imgui │ │ │ │ ├── group_data.hpp │ │ │ │ ├── registrar.hpp │ │ │ │ └── result.h │ │ │ └── src │ │ │ ├── CMakeLists.txt │ │ │ ├── group_data.cpp │ │ │ ├── registrar.cpp │ │ │ ├── result.c │ │ │ └── result.h │ ├── src │ │ ├── CMakeLists.txt │ │ ├── group_data.cpp │ │ ├── log.cpp │ │ ├── log.hpp │ │ ├── resource_create_info_history.cpp │ │ ├── resource_create_info_pool.cpp │ │ ├── result.c │ │ ├── result.h │ │ ├── simulation.cpp │ │ └── struct.cpp │ └── test │ │ ├── CMakeLists.txt │ │ ├── c_header_compatibility.c │ │ ├── group_data.cpp │ │ ├── result.cpp │ │ └── simulation.cpp ├── foe_wsi │ ├── CMakeLists.txt │ ├── foe_wsi-config.cmake │ ├── include │ │ ├── CMakeLists.txt │ │ └── foe │ │ │ └── wsi │ │ │ ├── keyboard.hpp │ │ │ ├── mouse.hpp │ │ │ ├── result.h │ │ │ ├── vulkan.h │ │ │ └── window.h │ ├── libs │ │ ├── imgui │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_wsi_imgui-config.cmake │ │ │ ├── include │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── foe │ │ │ │ │ └── wsi │ │ │ │ │ └── imgui │ │ │ │ │ └── window.hpp │ │ │ └── src │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── window.cpp │ │ └── loader │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_wsi_loader-config.cmake │ │ │ ├── include │ │ │ ├── CMakeLists.txt │ │ │ └── foe │ │ │ │ └── wsi │ │ │ │ └── loader.h │ │ │ └── src │ │ │ ├── CMakeLists.txt │ │ │ └── loader.cpp │ └── test │ │ ├── CMakeLists.txt │ │ ├── keyboard.cpp │ │ └── mouse.cpp ├── foe_wsi_glfw3 │ ├── CMakeLists.txt │ ├── foe_wsi_glfw3-config.cmake │ ├── src │ │ ├── CMakeLists.txt │ │ ├── keyboard.cpp │ │ ├── keyboard.hpp │ │ ├── mouse.cpp │ │ ├── mouse.hpp │ │ ├── result.c │ │ ├── result.h │ │ ├── vk_result.c │ │ ├── vk_result.h │ │ ├── vulkan.cpp │ │ ├── window.cpp │ │ └── window.hpp │ └── test │ │ ├── CMakeLists.txt │ │ ├── result.cpp │ │ ├── vulkan.cpp │ │ └── window.cpp ├── foe_xr │ ├── CMakeLists.txt │ ├── foe_xr-config.cmake │ └── include │ │ ├── CMakeLists.txt │ │ └── foe │ │ └── xr │ │ ├── runtime.h │ │ └── session.h ├── foe_xr_openxr │ ├── CMakeLists.txt │ ├── foe_xr_openxr-config.cmake │ ├── include │ │ ├── CMakeLists.txt │ │ └── foe │ │ │ └── xr │ │ │ └── openxr │ │ │ ├── camera_math.hpp │ │ │ ├── result.h │ │ │ ├── runtime.h │ │ │ └── session.h │ ├── libs │ │ └── vulkan │ │ │ ├── CMakeLists.txt │ │ │ ├── foe_xr_openxr_vk-config.cmake │ │ │ ├── include │ │ │ ├── CMakeLists.txt │ │ │ └── foe │ │ │ │ └── xr │ │ │ │ └── openxr │ │ │ │ └── vk │ │ │ │ ├── render_graph_jobs_swapchain.hpp │ │ │ │ ├── result.h │ │ │ │ └── vulkan.h │ │ │ ├── src │ │ │ ├── CMakeLists.txt │ │ │ ├── log.cpp │ │ │ ├── log.hpp │ │ │ ├── render_graph_jobs_swapchain.cpp │ │ │ ├── result.c │ │ │ ├── result.h │ │ │ ├── vk_result.c │ │ │ ├── vk_result.h │ │ │ ├── vulkan.cpp │ │ │ ├── xr_result.c │ │ │ └── xr_result.h │ │ │ └── test │ │ │ ├── CMakeLists.txt │ │ │ └── result.cpp │ ├── src │ │ ├── CMakeLists.txt │ │ ├── camera_math.cpp │ │ ├── debug_utils.cpp │ │ ├── debug_utils.hpp │ │ ├── log.cpp │ │ ├── log.hpp │ │ ├── result.c │ │ ├── result.h │ │ ├── runtime.cpp │ │ ├── runtime.hpp │ │ ├── session.cpp │ │ ├── session.h │ │ ├── xr_result.c │ │ └── xr_result.h │ └── test │ │ ├── CMakeLists.txt │ │ ├── c_header_compatibility.c │ │ └── result.cpp └── foe_yaml │ ├── CMakeLists.txt │ ├── foe_yaml-config.cmake │ ├── include │ ├── CMakeLists.txt │ └── foe │ │ └── yaml │ │ ├── exception.hpp │ │ ├── glm.hpp │ │ ├── glm_colour_parsing.hpp │ │ └── pod.hpp │ ├── src │ ├── CMakeLists.txt │ ├── exception.cpp │ ├── glm.cpp │ ├── internal_pod_templates.hpp │ └── pod.cpp │ └── test │ ├── CMakeLists.txt │ ├── exception.cpp │ ├── pod_bool_parsing.cpp │ ├── pod_int16_parsing.cpp │ └── string_parsing.cpp └── src ├── CMakeLists.txt ├── application.cpp ├── application.hpp ├── frame_timer.cpp ├── frame_timer.hpp ├── graphics.cpp ├── graphics.hpp ├── imgui ├── CMakeLists.txt ├── armature.cpp ├── armature.hpp ├── armature_state.cpp ├── armature_state.hpp ├── bringup_registration.cpp ├── bringup_registration.hpp ├── demo.cpp ├── demo.hpp ├── developer_console.cpp ├── developer_console.hpp ├── entity_list.cpp ├── entity_list.hpp ├── frame_time_info.cpp ├── frame_time_info.hpp ├── register.cpp ├── register.hpp ├── render_state.cpp ├── render_state.hpp ├── resource_list.cpp ├── resource_list.hpp ├── save.cpp ├── save.hpp ├── termination.cpp └── termination.hpp ├── log.cpp ├── log.hpp ├── logging.cpp ├── logging.hpp ├── main.cpp ├── per_frame_data.hpp ├── register_basic_functionality.cpp ├── register_basic_functionality.h ├── render_graph ├── render_scene.cpp └── render_scene.hpp ├── result.c ├── result.h ├── settings.cpp ├── settings.hpp ├── simulation ├── CMakeLists.txt ├── animated_bone_state.cpp ├── animated_bone_state.hpp ├── animated_bone_state_pool.h ├── animated_bone_system.cpp ├── animated_bone_system.h ├── armature.hpp ├── armature_create_info.h ├── armature_loader.cpp ├── armature_loader.hpp ├── armature_state.h ├── armature_state_imex.hpp ├── armature_state_pool.h ├── binary.cpp ├── binary.h ├── binary │ ├── CMakeLists.txt │ ├── armature_create_info.c │ ├── armature_create_info.cpp │ ├── armature_create_info.h │ ├── armature_state.cpp │ ├── armature_state.h │ ├── export_registration.c │ ├── export_registration.h │ ├── import_registration.c │ ├── import_registration.h │ ├── render_state.cpp │ ├── render_state.h │ ├── result.c │ └── result.h ├── cleanup.c ├── cleanup.h ├── compare.c ├── compare.h ├── registration.cpp ├── registration.h ├── render_state.h ├── render_state_imex.hpp ├── render_state_pool.h ├── render_system.cpp ├── render_system.hpp ├── render_system_armature.cpp ├── render_system_armature.hpp ├── render_system_position.cpp ├── render_system_position.hpp ├── type_defs.h └── yaml │ ├── CMakeLists.txt │ ├── armature.cpp │ ├── armature.hpp │ ├── export_registration.cpp │ ├── export_registration.h │ ├── import_registration.cpp │ ├── import_registration.h │ ├── result.c │ ├── result.h │ ├── structs.cpp │ └── structs.hpp ├── state_import ├── CMakeLists.txt ├── import_state.cpp ├── import_state.hpp ├── result.c └── result.h ├── vk_result.c ├── vk_result.h ├── window.cpp ├── window.hpp ├── xr.cpp ├── xr.hpp ├── xr_result.c └── xr_result.h /.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: LLVM 2 | Language: Cpp 3 | Standard: Latest 4 | IndentWidth: 4 5 | ColumnLimit: 100 6 | 7 | AlwaysBreakTemplateDeclarations: true 8 | BinPackParameters: false 9 | BreakConstructorInitializers: AfterColon 10 | BreakInheritanceList: AfterColon 11 | PackConstructorInitializers: NextLine 12 | PenaltyReturnTypeOnItsOwnLine: 10000 13 | QualifierAlignment: Right 14 | AlignConsecutiveMacros: Consecutive 15 | AlignConsecutiveBitFields: AcrossComments 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # ========================= 2 | # IDE/Editor 3 | # ========================= 4 | 5 | .cache/ 6 | .vscode/ 7 | .idea/ 8 | .vs/ 9 | .clangd/ 10 | 11 | # ========================= 12 | # OS 13 | # ========================= 14 | 15 | .DS_Store 16 | 17 | # ========================= 18 | # Build 19 | # ========================= 20 | 21 | compile_commands.json 22 | cmake-build*/ 23 | *build/ 24 | build*/ 25 | *.profraw 26 | 27 | # ========================= 28 | # Other 29 | # ========================= 30 | 31 | *.cap 32 | *.ini 33 | *.spv 34 | .foe-settings.yml 35 | foe-settings.yml 36 | out-foe-settings.yml 37 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "cmake"] 2 | path = cmake 3 | url = https://git.stabletec.com/other/cmake-scripts.git 4 | [submodule "external/vulkan_mini_libs/vulkan-mini-libs-2"] 5 | path = external/vulkan_mini_libs/vulkan-mini-libs-2 6 | url = https://git.stabletec.com/utilities/vulkan-mini-libs-2.git 7 | [submodule "data/bringup-data-sets"] 8 | path = data/bringup-data-sets 9 | url = https://git.stabletec.com/foe/bringup-data-sets.git 10 | [submodule "external/imgui/imgui"] 11 | path = external/imgui/imgui 12 | url = https://github.com/ocornut/imgui.git 13 | [submodule "external/imgui_file_dialog/ImGuiFileDialog"] 14 | path = external/imgui_file_dialog/ImGuiFileDialog 15 | url = https://github.com/aiekick/ImGuiFileDialog.git 16 | -------------------------------------------------------------------------------- /external/CLI11/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | add_library(CLI11 INTERFACE) 6 | target_include_directories(CLI11 INTERFACE include) 7 | -------------------------------------------------------------------------------- /external/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | set(CMAKE_C_VISIBILITY_PRESET default) 6 | set(CMAKE_CXX_VISIBILITY_PRESET default) 7 | set(CMAKE_VISIBILITY_INLINES_HIDDEN 0) 8 | 9 | add_subdirectory(CLI11) 10 | add_subdirectory(imgui) 11 | add_subdirectory(imgui_file_dialog) 12 | add_subdirectory(vulkan_memory_allocator) 13 | add_subdirectory(vulkan_mini_libs) 14 | -------------------------------------------------------------------------------- /external/imgui_file_dialog/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | cmake_minimum_required(VERSION 3.13) 6 | project(imgui_file_dialog CXX) 7 | 8 | # Global Options 9 | set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) 10 | 11 | # Declarations 12 | if(WIN32) 13 | add_library(imgui_file_dialog STATIC) 14 | else() 15 | add_library(imgui_file_dialog) 16 | endif() 17 | 18 | # Definition 19 | target_sources(imgui_file_dialog PRIVATE ImGuiFileDialog/ImGuiFileDialog.cpp) 20 | 21 | target_include_directories(imgui_file_dialog PUBLIC include ImGuiFileDialog) 22 | 23 | target_link_libraries(imgui_file_dialog PUBLIC imgui) 24 | -------------------------------------------------------------------------------- /external/vulkan_memory_allocator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | cmake_minimum_required(VERSION 3.13) 6 | 7 | # Dependencies 8 | find_package(Vulkan REQUIRED) 9 | 10 | # Library 11 | set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) 12 | add_library(vulkan_memory_allocator vk_mem_alloc.cpp vk_mem_alloc.h) 13 | 14 | target_include_directories(vulkan_memory_allocator 15 | PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) 16 | target_link_libraries(vulkan_memory_allocator PUBLIC Vulkan::Vulkan) 17 | if(UNIX) 18 | target_compile_options(vulkan_memory_allocator PRIVATE -fPIC) 19 | endif() 20 | -------------------------------------------------------------------------------- /external/vulkan_memory_allocator/vk_mem_alloc.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | #define VMA_IMPLEMENTATION 8 | #include -------------------------------------------------------------------------------- /external/vulkan_mini_libs/src/struct_cleanup.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #define VK_STRUCT_CLEANUP_CONFIG_MAIN 6 | #include -------------------------------------------------------------------------------- /external/vulkan_mini_libs/src/struct_compare.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #define VK_STRUCT_COMPARE_CONFIG_MAIN 6 | #include -------------------------------------------------------------------------------- /external/vulkan_mini_libs/src/value_serialization.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #define VK_VALUE_SERIALIZATION_CONFIG_MAIN 6 | #include -------------------------------------------------------------------------------- /foe-settings.example.yml: -------------------------------------------------------------------------------- 1 | window: 2 | # have_window: true 3 | # vsync: false 4 | width: 1920 5 | height: 1080 6 | graphics: 7 | # gpu: 0 8 | # max_frame_buffering: 3 9 | validation: false 10 | debug_logging: false 11 | msaa: 1 12 | xr: 13 | enable: false 14 | force: false 15 | validation: false 16 | debug_logging: false 17 | search_paths: 18 | - data/bringup-data-sets -------------------------------------------------------------------------------- /libs/foe/foe_core-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(CMakeFindDependencyMacro) 6 | find_dependency(fmt) 7 | 8 | include(${CMAKE_CURRENT_LIST_DIR}/foe_core.cmake) 9 | -------------------------------------------------------------------------------- /libs/foe/include/foe/filesystem.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_FILESYSTEM_HPP 6 | #define FOE_FILESYSTEM_HPP 7 | 8 | #include 9 | 10 | #include 11 | 12 | /** 13 | * @brief Returns the path to the users home directory 14 | * @return Home directory path 15 | * @note Only Unix, Windows implementations 16 | */ 17 | FOE_EXPORT 18 | auto foeGetUserHomeDirectory() -> std::filesystem::path; 19 | 20 | #endif // FOE_FILESYSTEM_HPP -------------------------------------------------------------------------------- /libs/foe/include/foe/hex.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_HEX_H 6 | #define FOE_HEX_H 7 | 8 | #include 9 | #include 10 | 11 | #include 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | FOE_EXPORT 18 | foeResultSet foeEncodeHex(size_t dataSize, 19 | void const *pData, 20 | size_t hexBufferSize, 21 | char *pHexBuffer); 22 | 23 | FOE_EXPORT 24 | foeResultSet foeDecodeHex(size_t hexDataSize, char const *pHexData, size_t *pDataSize, void *pData); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif // FOE_HEX_H -------------------------------------------------------------------------------- /libs/foe/include/foe/memory_alignment.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_MEMORY_ALIGNMENT_H 6 | #define FOE_MEMORY_ALIGNMENT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline size_t foeGetAlignedSize(size_t alignment, size_t size) { 15 | size_t total = size; 16 | size_t const alignmentDiff = size % alignment; 17 | if (alignmentDiff != 0) { 18 | total += alignment - alignmentDiff; 19 | } 20 | 21 | return total; 22 | } 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif // FOE_MEMORY_ALIGNMENT_H -------------------------------------------------------------------------------- /libs/foe/include/foe/memory_mapped_file.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_MEMORY_MAPPED_FILE_H 6 | #define FOE_MEMORY_MAPPED_FILE_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | FOE_EXPORT 15 | foeResultSet foeCreateMemoryMappedFile(char const *pFilePath, foeManagedMemory *pManagedMemory); 16 | 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | #endif // FOE_MEMORY_MAPPED_FILE_H -------------------------------------------------------------------------------- /libs/foe/src/chrono/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022-2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_core PRIVATE dilated_clock.cpp dilated_long_clock.cpp 6 | program_clock.cpp) 7 | -------------------------------------------------------------------------------- /libs/foe/src/chrono/program_clock.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | namespace { 8 | std::chrono::steady_clock::time_point cProgramStartTime = std::chrono::steady_clock::now(); 9 | } 10 | 11 | auto foeProgramClock::now() noexcept -> time_point { 12 | return time_point(std::chrono::steady_clock::now() - cProgramStartTime); 13 | } -------------------------------------------------------------------------------- /libs/foe/src/filesystem.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | #ifdef _WIN32 8 | #include 9 | #else 10 | #include 11 | #include 12 | #include 13 | #endif 14 | 15 | auto foeGetUserHomeDirectory() -> std::filesystem::path { 16 | #ifdef _WIN32 17 | char homeDir[MAX_PATH + 1]; 18 | if (!SHGetSpecialFolderPathA(HWND_DESKTOP, homeDir, CSIDL_PROFILE, FALSE)) 19 | homeDir[0] = '\0'; 20 | #else 21 | char const *homeDir = getenv("HOME"); 22 | 23 | if (homeDir == nullptr) 24 | homeDir = getpwuid(getuid())->pw_dir; 25 | #endif 26 | 27 | return homeDir; 28 | } -------------------------------------------------------------------------------- /libs/foe/src/log.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "log.hpp" 6 | 7 | FOE_DEFINE_LOG_CATEGORY(foeCore, FOE_LOG_LEVEL_ALL) -------------------------------------------------------------------------------- /libs/foe/src/log.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | FOE_DECLARE_LOG_CATEGORY(foeCore) -------------------------------------------------------------------------------- /libs/foe/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline foeResultSet to_foeResult(foeResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foeResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe/test/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include -------------------------------------------------------------------------------- /libs/foe/test/chrono/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022-2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(test_foe_core PRIVATE dilated_clock.cpp dilated_long_clock.cpp 6 | easy_clock.cpp program_clock.cpp) 7 | -------------------------------------------------------------------------------- /libs/foe/test/chrono/program_clock.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include 7 | 8 | TEST_CASE("foeProgramClock", "[foe][chrono]") { 9 | REQUIRE(foeProgramClock::is_steady == true); 10 | 11 | auto currentTime = foeProgramClock::now(); 12 | 13 | REQUIRE(currentTime.time_since_epoch() < std::chrono::seconds(10)); 14 | } -------------------------------------------------------------------------------- /libs/foe/test/data/memory_mapped_file/0b_file: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe/test/data/memory_mapped_file/0b_file -------------------------------------------------------------------------------- /libs/foe/test/test_plugin_so/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022-2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | # Declaration 6 | add_library(test_foe_core_plugin_so SHARED test.c) 7 | generate_export_header(test_foe_core_plugin_so EXPORT_MACRO_NAME TEST_EXPORT 8 | EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/export.h) 9 | 10 | target_include_directories(test_foe_core_plugin_so 11 | PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) 12 | -------------------------------------------------------------------------------- /libs/foe/test/test_plugin_so/test.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | TEST_EXPORT int testFunc(int val) { return val * 10; } -------------------------------------------------------------------------------- /libs/foe_crypto/foe_crypto-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_crypto.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_crypto/include/foe/crypto/memory.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_CRYPTO_MEMORY_H 6 | #define FOE_CRYPTO_MEMORY_H 7 | 8 | #include 9 | 10 | #include 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | FOE_CRYPTO_EXPORT 17 | void foeCryptoZeroMemory(size_t size, void *pMemory); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif // FOE_CRYPTO_MEMORY_H -------------------------------------------------------------------------------- /libs/foe_crypto/include/foe/crypto/random.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_CRYPTO_RANDOM_H 6 | #define FOE_CRYPTO_RANDOM_H 7 | 8 | #include 9 | 10 | #include 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | FOE_CRYPTO_EXPORT 17 | void foeCryptoGenerateRandomData(size_t size, void *pData); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif // FOE_CRYPTO_RANDOM_H -------------------------------------------------------------------------------- /libs/foe_crypto/include/foe/crypto/sha256.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023-2024 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_CRYPTO_SHA256_H 6 | #define FOE_CRYPTO_SHA256_H 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | #define FOE_CRYPTO_SHA256_HASH_SIZE 32 18 | 19 | // pHash mush be FOE_CRYPTO_SHA256_HASH_SIZE bytes 20 | FOE_CRYPTO_EXPORT 21 | bool foeCryptoHashSHA256(size_t size, void const *pData, void *pHash); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // FOE_CRYPTO_SHA256_H -------------------------------------------------------------------------------- /libs/foe_crypto/include/foe/crypto/sha512.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023-2024 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_CRYPTO_SHA512_H 6 | #define FOE_CRYPTO_SHA512_H 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | #define FOE_CRYPTO_SHA512_HASH_SIZE 64 18 | 19 | // pHash mush be FOE_CRYPTO_SHA512_HASH_SIZE bytes 20 | FOE_CRYPTO_EXPORT 21 | bool foeCryptoHashSHA512(size_t size, void const *pData, void *pHash); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // FOE_CRYPTO_SHA512_H -------------------------------------------------------------------------------- /libs/foe_crypto/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2023 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_crypto 7 | PRIVATE aes_256_gcm.c 8 | ed25519.c 9 | key.c 10 | memory.c 11 | random.c 12 | result.c 13 | sha256.c 14 | sha512.c 15 | x25519.c 16 | xchacha20_poly1305.c) 17 | -------------------------------------------------------------------------------- /libs/foe_crypto/src/memory.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | #include 8 | 9 | void foeCryptoZeroMemory(size_t size, void *pMemory) { sodium_memzero(pMemory, size); } -------------------------------------------------------------------------------- /libs/foe_crypto/src/random.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | #include 8 | 9 | void foeCryptoGenerateRandomData(size_t dataSize, void *pData) { randombytes_buf(pData, dataSize); } -------------------------------------------------------------------------------- /libs/foe_crypto/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | static inline foeResultSet to_foeResult(foeCryptoResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foeCryptoResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_crypto/src/sha256.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | #include 8 | 9 | bool foeCryptoHashSHA256(size_t size, void const *pData, void *pHash) { 10 | crypto_hash_sha256((unsigned char *)pHash, pData, size); 11 | 12 | return true; 13 | } -------------------------------------------------------------------------------- /libs/foe_crypto/src/sha512.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | #include 8 | 9 | bool foeCryptoHashSHA512(size_t size, void const *pData, void *pHash) { 10 | crypto_hash_sha512((unsigned char *)pHash, pData, size); 11 | 12 | return true; 13 | } -------------------------------------------------------------------------------- /libs/foe_crypto/test/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include -------------------------------------------------------------------------------- /libs/foe_ecs/foe_ecs-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_ecs.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_ecs/libs/yaml/foe_ecs_yaml-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_ecs.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_ecs/libs/yaml/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header(foe_ecs_yaml EXPORT_FILE_NAME 6 | ${CMAKE_CURRENT_BINARY_DIR}/foe/ecs/yaml/export.h) 7 | 8 | target_sources( 9 | foe_ecs_yaml 10 | PUBLIC FILE_SET 11 | HEADERS 12 | BASE_DIRS 13 | ${CMAKE_CURRENT_BINARY_DIR} 14 | ${CMAKE_CURRENT_SOURCE_DIR}/ 15 | FILES 16 | ${CMAKE_CURRENT_BINARY_DIR}/foe/ecs/yaml/export.h 17 | foe/ecs/yaml/id.hpp 18 | foe/ecs/yaml/indexes.hpp) 19 | -------------------------------------------------------------------------------- /libs/foe_ecs/libs/yaml/include/foe/ecs/yaml/indexes.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_ECS_YAML_INDEXES_HPP 6 | #define FOE_ECS_YAML_INDEXES_HPP 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | FOE_ECS_YAML_EXPORT 13 | void yaml_read_indexes(std::string const &nodeName, YAML::Node const &node, foeEcsIndexes indexes); 14 | 15 | FOE_ECS_YAML_EXPORT 16 | void yaml_write_indexes(std::string const &nodeName, foeEcsIndexes indexes, YAML::Node &node); 17 | 18 | #endif // FOE_ECS_YAML_INDEXES_HPP -------------------------------------------------------------------------------- /libs/foe_ecs/libs/yaml/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_ecs_yaml PRIVATE id.cpp indexes.cpp) 6 | -------------------------------------------------------------------------------- /libs/foe_ecs/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022-2023 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_ecs 7 | PRIVATE binary.c 8 | component_pool.cpp 9 | entity_list.c 10 | group_translator.cpp 11 | id_to_string.cpp 12 | indexes.cpp 13 | log.cpp 14 | name_map.cpp 15 | result.c) 16 | -------------------------------------------------------------------------------- /libs/foe_ecs/src/log.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "log.hpp" 6 | 7 | FOE_DEFINE_LOG_CATEGORY(foeECS, FOE_LOG_LEVEL_ALL) -------------------------------------------------------------------------------- /libs/foe_ecs/src/log.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | FOE_DECLARE_LOG_CATEGORY(foeECS) -------------------------------------------------------------------------------- /libs/foe_ecs/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline foeResultSet to_foeResult(foeEcsResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foeEcsResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_ecs/test/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include -------------------------------------------------------------------------------- /libs/foe_graphics/foe_graphics-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_graphics.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_graphics/include/foe/graphics/mesh.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_GRAPHICS_MESH_H 6 | #define FOE_GRAPHICS_MESH_H 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #include 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | FOE_DEFINE_HANDLE(foeGfxMesh) 19 | 20 | FOE_GFX_EXPORT 21 | uint32_t foeGfxGetMeshIndices(foeGfxMesh mesh); 22 | 23 | FOE_GFX_EXPORT 24 | void foeGfxDestroyMesh(foeGfxSession session, foeGfxMesh mesh); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif // FOE_GRAPHICS_MESH_H -------------------------------------------------------------------------------- /libs/foe_graphics/include/foe/graphics/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_GRAPHICS_RESULT_H 6 | #define FOE_GRAPHICS_RESULT_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | typedef enum foeGraphicsResult { 16 | FOE_GRAPHICS_SUCCESS = 0, 17 | FOE_GRAPHICS_ERROR_OUT_OF_MEMORY = -1000008001, 18 | } foeGraphicsResult; 19 | 20 | FOE_GFX_EXPORT 21 | void foeGraphicsResultToString(foeGraphicsResult value, char buffer[FOE_MAX_RESULT_STRING_SIZE]); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // FOE_GRAPHICS_RESULT_H -------------------------------------------------------------------------------- /libs/foe_graphics/include/foe/graphics/runtime.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_GRAPHICS_RUNTIME_H 6 | #define FOE_GRAPHICS_RUNTIME_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | FOE_DEFINE_HANDLE(foeGfxRuntime) 16 | 17 | FOE_GFX_EXPORT 18 | void foeGfxDestroyRuntime(foeGfxRuntime runtime); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | #endif // FOE_GRAPHICS_RUNTIME_H -------------------------------------------------------------------------------- /libs/foe_graphics/include/foe/graphics/type_defs.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_GRAPHICS_TYPE_DEFS_H 6 | #define FOE_GRAPHICS_TYPE_DEFS_H 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | #define FOE_GRAPHICS_MAX_BUFFERED_FRAMES 3U 13 | #define FOE_GRAPHICS_MAX_QUEUE_FAMILIES 8U 14 | #define FOE_GRAPHICS_MAX_QUEUES_PER_FAMILY 8U 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | 20 | #endif // FOE_GRAPHICS_TYPE_DEFS_H -------------------------------------------------------------------------------- /libs/foe_graphics/libs/imgui/foe_graphics_imgui-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_graphics_imgui.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_graphics/libs/imgui/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header( 6 | foe_graphics_imgui EXPORT_MACRO_NAME FOE_GFX_IMGUI_EXPORT EXPORT_FILE_NAME 7 | ${CMAKE_CURRENT_BINARY_DIR}/foe/graphics/imgui/export.h) 8 | 9 | target_sources( 10 | foe_graphics_imgui 11 | PUBLIC FILE_SET 12 | HEADERS 13 | BASE_DIRS 14 | ${CMAKE_CURRENT_BINARY_DIR} 15 | ${CMAKE_CURRENT_SOURCE_DIR}/ 16 | FILES 17 | ${CMAKE_CURRENT_BINARY_DIR}/foe/graphics/imgui/export.h 18 | foe/graphics/imgui/builtin_descriptor_sets.hpp) 19 | -------------------------------------------------------------------------------- /libs/foe_graphics/libs/imgui/include/foe/graphics/imgui/builtin_descriptor_sets.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_GRAPHICS_IMGUI_BUILTIN_DESCRIPTOR_SETS_HPP 6 | #define FOE_GRAPHICS_IMGUI_BUILTIN_DESCRIPTOR_SETS_HPP 7 | 8 | #include 9 | #include 10 | 11 | #include 12 | 13 | FOE_GFX_IMGUI_EXPORT 14 | void imgui_foeBuiltinDescriptorSetLayoutFlags(std::string const &label, 15 | foeBuiltinDescriptorSetLayoutFlags const &data); 16 | 17 | #endif // FOE_GRAPHICS_IMGUI_BUILTIN_DESCRIPTOR_SETS_HPP -------------------------------------------------------------------------------- /libs/foe_graphics/libs/imgui/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_graphics_imgui PRIVATE builtin_descriptor_sets.cpp) 6 | -------------------------------------------------------------------------------- /libs/foe_graphics/libs/imgui/src/builtin_descriptor_sets.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | #include 8 | 9 | void imgui_foeBuiltinDescriptorSetLayoutFlags(std::string const &label, 10 | foeBuiltinDescriptorSetLayoutFlags const &data) { 11 | char const *pLayoutStr = 12 | builtin_set_layout_to_string((foeBuiltinDescriptorSetLayoutFlagBits)data); 13 | 14 | if (pLayoutStr != NULL) 15 | ImGui::Text("%s: %s", label.c_str(), pLayoutStr); 16 | else 17 | ImGui::Text("%s: N/A", label.c_str()); 18 | } -------------------------------------------------------------------------------- /libs/foe_graphics/libs/yaml/foe_graphics_yaml-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_graphics_yaml.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_graphics/libs/yaml/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header( 6 | foe_graphics_yaml EXPORT_MACRO_NAME FOE_GFX_YAML_EXPORT EXPORT_FILE_NAME 7 | ${CMAKE_CURRENT_BINARY_DIR}/foe/graphics/yaml/export.h) 8 | 9 | target_sources( 10 | foe_graphics_yaml 11 | PUBLIC FILE_SET 12 | HEADERS 13 | BASE_DIRS 14 | ${CMAKE_CURRENT_BINARY_DIR} 15 | ${CMAKE_CURRENT_SOURCE_DIR}/ 16 | FILES 17 | ${CMAKE_CURRENT_BINARY_DIR}/foe/graphics/yaml/export.h 18 | foe/graphics/yaml/enums.hpp) 19 | -------------------------------------------------------------------------------- /libs/foe_graphics/libs/yaml/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_graphics_yaml PRIVATE enums.cpp) 6 | -------------------------------------------------------------------------------- /libs/foe_graphics/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_graphics PRIVATE builtin_descriptor_sets.c 6 | delayed_caller.cpp log.cpp result.c) 7 | -------------------------------------------------------------------------------- /libs/foe_graphics/src/log.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "log.hpp" 6 | 7 | FOE_DEFINE_LOG_CATEGORY(foeGraphics, FOE_LOG_LEVEL_ALL) -------------------------------------------------------------------------------- /libs/foe_graphics/src/log.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef LOG_HPP 6 | #define LOG_HPP 7 | 8 | #include 9 | 10 | FOE_DECLARE_LOG_CATEGORY(foeGraphics) 11 | 12 | #endif // LOG_HPP -------------------------------------------------------------------------------- /libs/foe_graphics/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline foeResultSet to_foeResult(foeGraphicsResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foeGraphicsResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_graphics/test/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include -------------------------------------------------------------------------------- /libs/foe_graphics/test/stub.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | TEST_CASE("Stub to ensure compilation hooks succeed") {} -------------------------------------------------------------------------------- /libs/foe_graphics_resource/foe_graphics_resource-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_graphics_resource.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_graphics_resource/include/foe/graphics/resource/image.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_GRAPHICS_RESOURCE_IMAGE_HPP 6 | #define FOE_GRAPHICS_RESOURCE_IMAGE_HPP 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | struct foeImage { 13 | foeResourceType rType; 14 | void *pNext; 15 | VmaAllocation alloc; 16 | VkImage image; 17 | VkImageView view; 18 | VkSampler sampler; 19 | }; 20 | 21 | #endif // FOE_GRAPHICS_RESOURCE_IMAGE_HPP -------------------------------------------------------------------------------- /libs/foe_graphics_resource/include/foe/graphics/resource/image_create_info.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_GRAPHICS_RESOURCE_IMAGE_CREATE_INFO_H 6 | #define FOE_GRAPHICS_RESOURCE_IMAGE_CREATE_INFO_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | typedef struct foeImageCreateInfo { 15 | char const *pFile; 16 | } foeImageCreateInfo; 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif // FOE_GRAPHICS_RESOURCE_IMAGE_CREATE_INFO_H -------------------------------------------------------------------------------- /libs/foe_graphics_resource/include/foe/graphics/resource/registration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_GRAPHICS_RESOURCE_REGISTRATION_H 6 | #define FOE_GRAPHICS_RESOURCE_REGISTRATION_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | FOE_GFX_RES_EXPORT 16 | int foeGraphicsResourceFunctionalityID(); 17 | 18 | FOE_GFX_RES_EXPORT 19 | foeResultSet foeGraphicsResourceRegisterFunctionality(); 20 | 21 | FOE_GFX_RES_EXPORT 22 | void foeGraphicsResourceDeregisterFunctionality(); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif // FOE_GRAPHICS_RESOURCE_REGISTRATION_H -------------------------------------------------------------------------------- /libs/foe_graphics_resource/include/foe/graphics/resource/shader.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_GRAPHICS_RESOURCE_SHADER_HPP 6 | #define FOE_GRAPHICS_RESOURCE_SHADER_HPP 7 | 8 | #include 9 | #include 10 | 11 | struct foeShader { 12 | foeResourceType rType; 13 | void *pNext; 14 | foeGfxShader shader; 15 | }; 16 | 17 | #endif // FOE_GRAPHICS_RESOURCE_SHADER_HPP -------------------------------------------------------------------------------- /libs/foe_graphics_resource/include/foe/graphics/resource/shader_create_info.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_GRAPHICS_RESOURCE_SHADER_CREATE_INFO_H 6 | #define FOE_GRAPHICS_RESOURCE_SHADER_CREATE_INFO_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | typedef struct foeShaderCreateInfo { 16 | char const *pFile; 17 | foeGfxVkShaderCreateInfo gfxCreateInfo; 18 | } foeShaderCreateInfo; 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | #endif // FOE_GRAPHICS_RESOURCE_SHADER_CREATE_INFO_H -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/binary/foe_graphics_resource_binary-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_graphics_resource_binary.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/binary/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_graphics_resource_binary 7 | PRIVATE export_registration.c 8 | image.c 9 | image.cpp 10 | import_registration.c 11 | material.c 12 | material.cpp 13 | mesh.c 14 | mesh.cpp 15 | shader.c 16 | shader.cpp 17 | vertex_descriptor.c 18 | vertex_descriptor.cpp 19 | result.c) 20 | -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/binary/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline static foeResultSet to_foeResult(foeGraphicsResourceBinaryResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foeGraphicsResourceBinaryResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/binary/test/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include 7 | #include -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/imgui/foe_graphics_resource_imgui-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_graphics_resource_imgui.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/imgui/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022-2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header( 6 | foe_graphics_resource_imgui EXPORT_MACRO_NAME FOE_GFX_RES_IMGUI_EXPORT 7 | EXPORT_FILE_NAME 8 | ${CMAKE_CURRENT_BINARY_DIR}/foe/graphics/resource/imgui/export.h) 9 | 10 | target_sources( 11 | foe_graphics_resource_imgui 12 | PUBLIC FILE_SET 13 | HEADERS 14 | BASE_DIRS 15 | ${CMAKE_CURRENT_BINARY_DIR} 16 | ${CMAKE_CURRENT_SOURCE_DIR}/ 17 | FILES 18 | ${CMAKE_CURRENT_BINARY_DIR}/foe/graphics/resource/imgui/export.h 19 | foe/graphics/resource/imgui/registration.hpp) 20 | -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/imgui/include/foe/graphics/resource/imgui/registration.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_GRPAHICS_RESOURCE_IMGUI_REGISTRATION_HPP 6 | #define FOE_GRPAHICS_RESOURCE_IMGUI_REGISTRATION_HPP 7 | 8 | #include 9 | #include 10 | 11 | class foeSimulationImGuiRegistrar; 12 | 13 | FOE_GFX_RES_IMGUI_EXPORT 14 | foeResultSet foeGraphicsResourceImGuiRegister(foeSimulationImGuiRegistrar *pRegistrar); 15 | 16 | FOE_GFX_RES_IMGUI_EXPORT 17 | foeResultSet foeGraphicsResourceImGuiDeregister(foeSimulationImGuiRegistrar *pRegistrar); 18 | 19 | #endif // FOE_GRPAHICS_RESOURCE_IMGUI_REGISTRATION_HPP -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/imgui/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_graphics_resource_imgui 7 | PRIVATE image.cpp material.cpp mesh.cpp registration.cpp shader.cpp 8 | vertex_descriptor.cpp) 9 | -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/imgui/src/image.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "image.hpp" 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | void imgui_foeImage(foeImage const *pResource) { ImGui::Text("foeImage"); } 12 | 13 | void imgui_foeImageCreateInfo(foeImageCreateInfo const *pCreateInfo) { 14 | ImGui::Text("foeImageCreateInfo"); 15 | 16 | ImGui::Text("File: %s", pCreateInfo->pFile); 17 | } -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/imgui/src/image.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef IMAGE_HPP 6 | #define IMAGE_HPP 7 | 8 | struct foeImage; 9 | struct foeImageCreateInfo; 10 | 11 | void imgui_foeImage(foeImage const *pResource); 12 | 13 | void imgui_foeImageCreateInfo(foeImageCreateInfo const *pCreateInfo); 14 | 15 | #endif // IMAGE_HPP -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/imgui/src/material.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef MATERIAL_HPP 6 | #define MATERIAL_HPP 7 | 8 | struct foeMaterial; 9 | struct foeMaterialCreateInfo; 10 | 11 | void imgui_foeMaterial(foeMaterial const *pResource); 12 | 13 | void imgui_foeMaterialCreateInfo(foeMaterialCreateInfo const *pCreateInfo); 14 | 15 | #endif // MATERIAL_HPP -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/imgui/src/mesh.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef MESH_HPP 6 | #define MESH_HPP 7 | 8 | struct foeMesh; 9 | struct foeMeshFileCreateInfo; 10 | struct foeMeshCubeCreateInfo; 11 | struct foeMeshIcosphereCreateInfo; 12 | 13 | void imgui_foeMesh(foeMesh const *pResource); 14 | 15 | void imgui_foeMeshFileCreateInfo(foeMeshFileCreateInfo const *pCreateInfo); 16 | 17 | void imgui_foeMeshCubeCreateInfo(foeMeshCubeCreateInfo const *pCreateInfo); 18 | 19 | void imgui_foeMeshIcosphereCreateInfo(foeMeshIcosphereCreateInfo const *pCreateInfo); 20 | 21 | #endif // MESH_HPP -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/imgui/src/shader.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef SHADER_HPP 6 | #define SHADER_HPP 7 | 8 | struct foeShader; 9 | struct foeShaderCreateInfo; 10 | 11 | void imgui_foeShader(foeShader const *pResource); 12 | 13 | void imgui_foeShaderCreateInfo(foeShaderCreateInfo const *pCreateInfo); 14 | 15 | #endif // SHADER_HPP -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/imgui/src/vertex_descriptor.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef VERTEX_DESCRIPTOR_HPP 6 | #define VERTEX_DESCRIPTOR_HPP 7 | 8 | struct foeVertexDescriptor; 9 | struct foeVertexDescriptorCreateInfo; 10 | 11 | void imgui_foeVertexDescriptor(foeVertexDescriptor const *pResource); 12 | 13 | void imgui_foeVertexDescriptorCreateInfo(foeVertexDescriptorCreateInfo const *pCreateInfo); 14 | 15 | #endif // VERTEX_DESCRIPTOR_HPP -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/yaml/foe_graphics_resource_yaml-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_graphics_resource_yaml.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/yaml/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_graphics_resource_yaml 7 | PRIVATE export_registration.cpp 8 | image.cpp 9 | import_registration.cpp 10 | material.cpp 11 | mesh.cpp 12 | result.c 13 | shader.cpp 14 | structs.cpp 15 | vertex_descriptor.cpp) 16 | -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/yaml/src/image.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef IMAGE_HPP 6 | #define IMAGE_HPP 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | struct foeImageCreateInfo; 13 | 14 | char const *yaml_image_key(); 15 | 16 | void yaml_read_image(YAML::Node const &node, 17 | foeEcsGroupTranslator groupTranslator, 18 | foeResourceCreateInfo *pCreateInfo); 19 | 20 | auto yaml_write_image(foeImageCreateInfo const &data) -> YAML::Node; 21 | 22 | #endif // IMAGE_HPP -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/yaml/src/material.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef MATERIAL_HPP 6 | #define MATERIAL_HPP 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | struct foeMaterialCreateInfo; 13 | 14 | char const *yaml_material_key(); 15 | 16 | void yaml_read_material(YAML::Node const &node, 17 | foeEcsGroupTranslator groupTranslator, 18 | foeResourceCreateInfo *pCreateInfo); 19 | 20 | auto yaml_write_material(foeMaterialCreateInfo const &data) -> YAML::Node; 21 | 22 | #endif // MATERIAL_HPP -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/yaml/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline foeResultSet to_foeResult(foeGraphicsResourceYamlResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foeGraphicsResourceYamlResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/yaml/src/shader.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef SHADER_HPP 6 | #define SHADER_HPP 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | struct foeShaderCreateInfo; 13 | 14 | char const *yaml_shader_key(); 15 | 16 | void yaml_read_shader(YAML::Node const &node, 17 | foeEcsGroupTranslator groupTranslator, 18 | foeResourceCreateInfo *pCreateInfo); 19 | 20 | auto yaml_write_shader(foeShaderCreateInfo const &data) -> YAML::Node; 21 | 22 | #endif // SHADER_HPP -------------------------------------------------------------------------------- /libs/foe_graphics_resource/libs/yaml/test/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include 7 | #include -------------------------------------------------------------------------------- /libs/foe_graphics_resource/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022-2023 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_graphics_resource 7 | PRIVATE binary.c 8 | cleanup.c 9 | compare.c 10 | image_loader.cpp 11 | log.cpp 12 | material_loader.cpp 13 | mesh_loader.cpp 14 | registration.cpp 15 | result.c 16 | shader_loader.cpp 17 | vertex_descriptor_loader.cpp 18 | vertex_descriptor.cpp 19 | vk_result.c) 20 | -------------------------------------------------------------------------------- /libs/foe_graphics_resource/src/log.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "log.hpp" 6 | 7 | FOE_DEFINE_LOG_CATEGORY(foeGraphicsResource, FOE_LOG_LEVEL_ALL) -------------------------------------------------------------------------------- /libs/foe_graphics_resource/src/log.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef LOG_HPP 6 | #define LOG_HPP 7 | 8 | #include 9 | 10 | FOE_DECLARE_LOG_CATEGORY(foeGraphicsResource) 11 | 12 | #endif // LOG_HPP -------------------------------------------------------------------------------- /libs/foe_graphics_resource/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline foeResultSet to_foeResult(foeGraphicsResourceResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foeGraphicsResourceResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_graphics_resource/src/vertex_descriptor.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | void cleanup_foeVertexDescriptor(foeVertexDescriptor *pData) { 8 | cleanup_foeGfxVkVertexDescriptor(&pData->vertexDescriptor); 9 | } -------------------------------------------------------------------------------- /libs/foe_graphics_resource/src/vk_result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef VK_RESULT_H 6 | #define VK_RESULT_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | void VkResultToString(VkResult value, char buffer[FOE_MAX_RESULT_STRING_SIZE]); 16 | 17 | inline foeResultSet vk_to_foeResult(VkResult value) { 18 | foeResultSet result = { 19 | .value = value, 20 | .toString = (PFN_foeResultToString)NULL, 21 | }; 22 | 23 | return result; 24 | } 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif // VK_RESULT_H -------------------------------------------------------------------------------- /libs/foe_graphics_resource/test/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include -------------------------------------------------------------------------------- /libs/foe_graphics_vk/foe_graphics_vk-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_graphics_vk.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_graphics_vk/include/foe/graphics/vk/cleanup.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_GRAPHICS_VK_CLEANUP_H 6 | #define FOE_GRAPHICS_VK_CLEANUP_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | typedef struct foeGfxVkShaderCreateInfo foeGfxVkShaderCreateInfo; 15 | 16 | FOE_GFX_EXPORT 17 | void cleanup_foeGfxVkShaderCreateInfo(foeGfxVkShaderCreateInfo *pData); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif // FOE_GRAPHICS_VK_CLEANUP_H 24 | -------------------------------------------------------------------------------- /libs/foe_graphics_vk/include/foe/graphics/vk/compare.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_GRAPHICS_VK_COMPARE_H 6 | #define FOE_GRAPHICS_VK_COMPARE_H 7 | 8 | #include 9 | 10 | #include 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | typedef struct foeGfxVkShaderCreateInfo foeGfxVkShaderCreateInfo; 17 | 18 | FOE_GFX_EXPORT 19 | bool compare_foeGfxVkShaderCreateInfo(foeGfxVkShaderCreateInfo const *pData1, 20 | foeGfxVkShaderCreateInfo const *pData2); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | #endif // FOE_GRAPHICS_VK_COMPARE_H 27 | -------------------------------------------------------------------------------- /libs/foe_graphics_vk/libs/imgui/.gitignore: -------------------------------------------------------------------------------- 1 | tools/*.cpp 2 | Vulkan-Docs/ 3 | .gen_cache.xml 4 | -------------------------------------------------------------------------------- /libs/foe_graphics_vk/libs/imgui/foe_graphics_vk_imgui-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_graphics_vk_imgui.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_graphics_vk/libs/imgui/include/foe/graphics/vk/imgui/fragment_descriptor.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_GRAPHICS_VK_IMGUI_FRAGMENT_DESCRIPTOR_HPP 6 | #define FOE_GRAPHICS_VK_IMGUI_FRAGMENT_DESCRIPTOR_HPP 7 | 8 | #include 9 | 10 | struct foeGfxVkFragmentDescriptor; 11 | 12 | FOE_GFX_VK_IMGUI_EXPORT 13 | void imgui_foeGfxVkFragmentDescriptor(foeGfxVkFragmentDescriptor const &data); 14 | 15 | #endif // FOE_GRAPHICS_VK_IMGUI_FRAGMENT_DESCRIPTOR_HPP -------------------------------------------------------------------------------- /libs/foe_graphics_vk/libs/imgui/include/foe/graphics/vk/imgui/shader.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_GRAPHICS_VK_IMGUI_SHADER_HPP 6 | #define FOE_GRAPHICS_VK_IMGUI_SHADER_HPP 7 | 8 | #include 9 | 10 | struct foeGfxVkShaderCreateInfo; 11 | 12 | FOE_GFX_VK_IMGUI_EXPORT 13 | void imgui_foeGfxVkShaderCreateInfo(foeGfxVkShaderCreateInfo const &data); 14 | 15 | #endif // FOE_GRAPHICS_VK_IMGUI_SHADER_HPP -------------------------------------------------------------------------------- /libs/foe_graphics_vk/libs/imgui/include/foe/graphics/vk/imgui/vertex_descriptor.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_GRAPHICS_VK_IMGUI_VERTEX_DESCRIPTOR_HPP 6 | #define FOE_GRAPHICS_VK_IMGUI_VERTEX_DESCRIPTOR_HPP 7 | 8 | #include 9 | 10 | struct foeGfxVkVertexDescriptor; 11 | 12 | FOE_GFX_VK_IMGUI_EXPORT 13 | void imgui_foeGfxVkVertexDescriptor(foeGfxVkVertexDescriptor const &data); 14 | 15 | #endif // FOE_GRAPHICS_VK_IMGUI_VERTEX_DESCRIPTOR_HPP -------------------------------------------------------------------------------- /libs/foe_graphics_vk/libs/imgui/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_graphics_vk_imgui PRIVATE fragment_descriptor.cpp shader.cpp 7 | vertex_descriptor.cpp vk_struct.cpp vk_type.cpp) 8 | -------------------------------------------------------------------------------- /libs/foe_graphics_vk/libs/yaml/.gitignore: -------------------------------------------------------------------------------- 1 | data/fuzzed_test_data/ 2 | fuzz_build/ 3 | fuzz_corpus/ 4 | fuzz_output/ 5 | tools/*.cpp 6 | Vulkan-Docs/ 7 | .gen_cache.xml 8 | -------------------------------------------------------------------------------- /libs/foe_graphics_vk/libs/yaml/foe_graphics_vk_yaml-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_graphics_vk_yaml.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_graphics_vk/libs/yaml/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_graphics_vk_yaml PRIVATE structs.cpp vk_enums.cpp vk_pod.cpp 6 | vk_structs.cpp) 7 | -------------------------------------------------------------------------------- /libs/foe_graphics_vk/libs/yaml/src/vk_pod.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | bool yaml_read_VkBool32(std::string const &nodeName, YAML::Node const &node, VkBool32 &data) { 10 | return yaml_read_uint32_t(nodeName, node, data); 11 | } 12 | 13 | void yaml_write_VkBool32(std::string const &nodeName, VkBool32 const &data, YAML::Node &node) { 14 | yaml_write_uint32_t(nodeName, data, node); 15 | } 16 | -------------------------------------------------------------------------------- /libs/foe_graphics_vk/libs/yaml/test/fuzz/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | add_executable(fuzz_foe_graphics_vk_yaml fuzzer.cpp) 6 | target_link_libraries(fuzz_foe_graphics_vk_yaml PRIVATE foe_graphics_vk_yaml) 7 | 8 | add_executable(sort_fuzzed_foe_graphics_vk_yaml sorter.cpp) 9 | target_link_libraries(sort_fuzzed_foe_graphics_vk_yaml 10 | PRIVATE foe_graphics_vk_yaml) 11 | -------------------------------------------------------------------------------- /libs/foe_graphics_vk/libs/yaml/tools/generate_fuzz_source.sh: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | #!/usr/bin/env sh 6 | 7 | YAML_FILE="$1" 8 | 9 | for STRUCT in $(cat $YAML_FILE | grep -e '^Vk.*:$'); do 10 | STRUCT="${STRUCT::-1}" 11 | printf " if (std::string_view{argv[1]} == \"$STRUCT\") { 12 | while (__AFL_LOOP(100000)) { 13 | FUZZ_MACRO($STRUCT) 14 | } 15 | } 16 | " 17 | done 18 | -------------------------------------------------------------------------------- /libs/foe_graphics_vk/libs/yaml/tools/generate_sort_source.sh: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | #!/usr/bin/env sh 6 | 7 | YAML_FILE="$1" 8 | 9 | for STRUCT in $(cat $YAML_FILE | grep -e '^Vk.*:$'); do 10 | STRUCT="${STRUCT::-1}" 11 | printf " SORT_MACRO($STRUCT)\n" 12 | done 13 | -------------------------------------------------------------------------------- /libs/foe_graphics_vk/libs/yaml/tools/generate_test_source.sh: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | #!/usr/bin/env sh 6 | 7 | YAML_FILE="$1" 8 | 9 | for STRUCT in $(cat $YAML_FILE | grep -e '^Vk.*:$'); do 10 | STRUCT="${STRUCT::-1}" 11 | printf " 12 | TEST_CASE(\"$STRUCT fuzzed input\") { 13 | FUZZ_TEST_MACRO(FUZZED_TEST_DATA_DIR, $STRUCT); 14 | } 15 | " 16 | done 17 | -------------------------------------------------------------------------------- /libs/foe_graphics_vk/src/backend.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | #define VULKAN_BACKEND_NAME "Vulkan" 8 | 9 | #define VULKAN_BACKEND_MAJOR 0 10 | #define VULKAN_BACKEND_MINOR 0 11 | #define VULKAN_BACKEND_PATCH 0 12 | 13 | char const *foeGfxBackendName() { return VULKAN_BACKEND_NAME; } 14 | 15 | struct foeGfxVersion foeGfxBackendVersion() { 16 | struct foeGfxVersion version = { 17 | .major = VULKAN_BACKEND_MAJOR, 18 | .minor = VULKAN_BACKEND_MINOR, 19 | .patch = VULKAN_BACKEND_PATCH, 20 | }; 21 | 22 | return version; 23 | } -------------------------------------------------------------------------------- /libs/foe_graphics_vk/src/cleanup.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | 13 | void cleanup_foeGfxVkShaderCreateInfo(foeGfxVkShaderCreateInfo *pData) { 14 | // VkDescriptorSetLayoutCreateInfo - descriptorSetLayoutCI 15 | cleanup_VkDescriptorSetLayoutCreateInfo( 16 | (VkDescriptorSetLayoutCreateInfo *)&pData->descriptorSetLayoutCI); 17 | } 18 | -------------------------------------------------------------------------------- /libs/foe_graphics_vk/src/debug_callback.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef DEBUG_CALLBACK_H 6 | #define DEBUG_CALLBACK_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | VkResult foeVkCreateDebugCallback(VkInstance instance, VkDebugReportCallbackEXT *pDebugCallback); 15 | 16 | VkResult foeVkDestroyDebugCallback(VkInstance instance, VkDebugReportCallbackEXT debugCallback); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif // DEBUG_CALLBACK_H -------------------------------------------------------------------------------- /libs/foe_graphics_vk/src/log.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "log.hpp" 6 | 7 | FOE_DEFINE_LOG_CATEGORY(foeVkGraphics, FOE_LOG_LEVEL_ALL) -------------------------------------------------------------------------------- /libs/foe_graphics_vk/src/log.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef LOG_HPP 6 | #define LOG_HPP 7 | 8 | #include 9 | 10 | FOE_DECLARE_LOG_CATEGORY(foeVkGraphics) 11 | 12 | #endif // LOG_HPP -------------------------------------------------------------------------------- /libs/foe_graphics_vk/src/mesh.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef MESH_H 6 | #define MESH_H 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | struct foeGfxVkMesh { 17 | VkBuffer vertexBuffer; 18 | VmaAllocation vertexAlloc; 19 | VkBuffer indexBuffer; 20 | VmaAllocation indexAlloc; 21 | 22 | uint32_t numIndices; 23 | VkIndexType indexType; 24 | 25 | VkDeviceSize boneDataOffset; 26 | }; 27 | 28 | FOE_DEFINE_HANDLE_CASTS(mesh, foeGfxVkMesh, foeGfxMesh) 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif // MESH_H -------------------------------------------------------------------------------- /libs/foe_graphics_vk/src/render_graph/job/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_graphics_vk 7 | PRIVATE blit_image.cpp 8 | copy_image.cpp 9 | export_image.cpp 10 | import_image.cpp 11 | present_image.cpp 12 | resolve_image.cpp 13 | synchronize.cpp) 14 | -------------------------------------------------------------------------------- /libs/foe_graphics_vk/src/render_graph/resource/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_graphics_vk PRIVATE image.cpp) 6 | -------------------------------------------------------------------------------- /libs/foe_graphics_vk/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline foeResultSet to_foeResult(foeGraphicsVkResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foeGraphicsVkResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_graphics_vk/src/shader.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef SHADER_H 6 | #define SHADER_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | typedef struct foeGfxVkShader { 16 | foeBuiltinDescriptorSetLayoutFlags builtinSetLayouts; 17 | VkShaderModule module; 18 | VkDescriptorSetLayout descriptorSetLayout; 19 | VkPushConstantRange pushConstantRange; 20 | } foeGfxVkShader; 21 | 22 | FOE_DEFINE_HANDLE_CASTS(shader, foeGfxVkShader, foeGfxShader) 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif // SHADER_H -------------------------------------------------------------------------------- /libs/foe_graphics_vk/src/upload_buffer.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef UPLOAD_BUFFER_HPP 6 | #define UPLOAD_BUFFER_HPP 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | struct foeGfxVkUploadBuffer { 13 | VkBuffer buffer; 14 | VmaAllocation alloc; 15 | }; 16 | 17 | FOE_DEFINE_HANDLE_CASTS(upload_buffer, foeGfxVkUploadBuffer, foeGfxUploadBuffer) 18 | 19 | #endif // UPLOAD_BUFFER_HPP -------------------------------------------------------------------------------- /libs/foe_graphics_vk/src/vk_result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef VK_RESULT_H 6 | #define VK_RESULT_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | void VkResultToString(VkResult value, char buffer[FOE_MAX_RESULT_STRING_SIZE]); 16 | 17 | inline foeResultSet vk_to_foeResult(VkResult value) { 18 | foeResultSet result = { 19 | .value = value, 20 | .toString = (PFN_foeResultToString)NULL, 21 | }; 22 | 23 | return result; 24 | } 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif // VK_RESULT_H -------------------------------------------------------------------------------- /libs/foe_graphics_vk/test/custom_main.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef CUSTOM_MAIN_HPP 6 | #define CUSTOM_MAIN_HPP 7 | 8 | int getGpuSelection(); 9 | 10 | #endif // CUSTOM_MAIN_HPP -------------------------------------------------------------------------------- /libs/foe_imex/foe_imex-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_imex.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_imex/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header(foe_imex EXPORT_FILE_NAME 6 | ${CMAKE_CURRENT_BINARY_DIR}/foe/imex/export.h) 7 | 8 | target_sources( 9 | foe_imex 10 | PUBLIC FILE_SET 11 | HEADERS 12 | BASE_DIRS 13 | ${CMAKE_CURRENT_BINARY_DIR} 14 | ${CMAKE_CURRENT_SOURCE_DIR}/ 15 | FILES 16 | ${CMAKE_CURRENT_BINARY_DIR}/foe/imex/export.h 17 | foe/imex/exporters.h 18 | foe/imex/importer.h 19 | foe/imex/result.h 20 | foe/imex/type_defs.h) 21 | -------------------------------------------------------------------------------- /libs/foe_imex/include/foe/imex/type_defs.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_IMEX_TYPE_DEFS_H 6 | #define FOE_IMEX_TYPE_DEFS_H 7 | 8 | typedef enum foeImexStructureType { 9 | FOE_IMEX_STRUCTURE_TYPE_IMPORTER_CALLS = 1000002000, 10 | } foeImexStructureType; 11 | 12 | #endif // FOE_IMEX_TYPE_DEFS_H -------------------------------------------------------------------------------- /libs/foe_imex/libs/binary/foe_imex_binary-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_imex_binary.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_imex/libs/binary/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header(foe_imex_binary EXPORT_FILE_NAME 6 | ${CMAKE_CURRENT_BINARY_DIR}/foe/imex/binary/export.h) 7 | 8 | target_sources( 9 | foe_imex_binary 10 | PUBLIC FILE_SET 11 | HEADERS 12 | BASE_DIRS 13 | ${CMAKE_CURRENT_BINARY_DIR} 14 | ${CMAKE_CURRENT_SOURCE_DIR}/ 15 | FILES 16 | ${CMAKE_CURRENT_BINARY_DIR}/foe/imex/binary/export.h 17 | foe/imex/binary/exporter.h 18 | foe/imex/binary/importer.h 19 | foe/imex/binary/result.h 20 | foe/imex/binary/type_defs.h) 21 | -------------------------------------------------------------------------------- /libs/foe_imex/libs/binary/include/foe/imex/binary/type_defs.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_IMEX_BINARY_TYPE_DEFS_H 6 | #define FOE_IMEX_BINARY_TYPE_DEFS_H 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | typedef enum foeImexBinaryStructureType { 13 | FOE_IMEX_BINARY_STRUCTURE_TYPE_IMPORTER = 1000005000, 14 | } foeImexBinaryStructureType; 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | 20 | #endif // FOE_IMEX_BINARY_TYPE_DEFS_H -------------------------------------------------------------------------------- /libs/foe_imex/libs/binary/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_imex_binary 7 | PRIVATE exporter_registration.c 8 | exporter.cpp 9 | importer_functions.cpp 10 | importer_registration.c 11 | importer.cpp 12 | log.cpp 13 | result.c) 14 | -------------------------------------------------------------------------------- /libs/foe_imex/libs/binary/src/exporter.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef EXPORTER_H 6 | #define EXPORTER_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | typedef struct foeSimulation foeSimulation; 15 | 16 | foeResultSet foeImexBinaryExport(char const *pExportPath, foeSimulation *pSimState); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif // EXPORTER_H -------------------------------------------------------------------------------- /libs/foe_imex/libs/binary/src/exporter_registration.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | #include 8 | 9 | #include "exporter.h" 10 | 11 | static foeExporter const cExporter = { 12 | .pName = "Binary", 13 | .version = FOE_EXPORTER_VERSION(0, 0, 0), 14 | .pExportFn = foeImexBinaryExport, 15 | }; 16 | 17 | foeResultSet foeImexBinaryRegisterExporter() { return foeImexRegisterExporter(cExporter); } 18 | 19 | void foeImexBinaryDeregisterExporter() { foeImexDeregisterExporter(cExporter); } -------------------------------------------------------------------------------- /libs/foe_imex/libs/binary/src/importer_registration.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | foeResultSet foeImexBinaryRegisterImporter() { 8 | return foeImexRegisterImporter(foeCreateBinaryImporter); 9 | } 10 | 11 | void foeImexBinaryDeregisterImporter() { foeImexDeregisterImporter(foeCreateBinaryImporter); } -------------------------------------------------------------------------------- /libs/foe_imex/libs/binary/src/log.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "log.hpp" 6 | 7 | FOE_DEFINE_LOG_CATEGORY(foeImexBinary, FOE_LOG_LEVEL_ALL) -------------------------------------------------------------------------------- /libs/foe_imex/libs/binary/src/log.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | FOE_DECLARE_LOG_CATEGORY(foeImexBinary) -------------------------------------------------------------------------------- /libs/foe_imex/libs/binary/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline foeResultSet to_foeResult(foeImexBinaryResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foeImexBinaryResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_imex/libs/binary/test/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include 7 | #include 8 | #include -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/foe_imex_yaml-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_imex_yaml.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/include/foe/imex/yaml/exporter_registration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_IMEX_YAML_EXPORTER_REGISTRATION_H 6 | #define FOE_IMEX_YAML_EXPORTER_REGISTRATION_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | FOE_IMEX_YAML_EXPORT 16 | foeResultSet foeImexYamlRegisterExporter(); 17 | FOE_IMEX_YAML_EXPORT 18 | void foeImexYamlDeregisterExporter(); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | #endif // FOE_IMEX_YAML_EXPORTER_REGISTRATION_H -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/include/foe/imex/yaml/importer_registration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_IMEX_YAML_IMPORTER_REGISTRATION_H 6 | #define FOE_IMEX_YAML_IMPORTER_REGISTRATION_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | FOE_IMEX_YAML_EXPORT 16 | foeResultSet foeImexYamlRegisterImporter(); 17 | FOE_IMEX_YAML_EXPORT 18 | void foeImexYamlDeregisterImporter(); 19 | 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | 24 | #endif // FOE_IMEX_YAML_IMPORTER_REGISTRATION_H -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/include/foe/imex/yaml/type_defs.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_IMEX_YAML_TYPE_DEFS_H 6 | #define FOE_IMEX_YAML_TYPE_DEFS_H 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | typedef enum foeImexYamlStructureType { 13 | FOE_IMEX_YAML_STRUCTURE_TYPE_IMPORTER = 1000004000, 14 | } foeImexYamlStructureType; 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | 20 | #endif // FOE_IMEX_YAML_TYPE_DEFS_H -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_imex_yaml 7 | PRIVATE exporter_registration.cpp 8 | exporter.cpp 9 | import_functionality.cpp 10 | importer_registration.cpp 11 | importer.cpp 12 | log.cpp 13 | result.c) 14 | -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/src/common.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef COMMON_HPP 6 | #define COMMON_HPP 7 | 8 | #include 9 | 10 | constexpr std::string_view dependenciesFilePath = "dependencies.yml"; 11 | 12 | constexpr std::string_view resourceIndexDataFilePath = "resource_index_data.yml"; 13 | constexpr std::string_view resourceDirectoryPath = "resources"; 14 | 15 | constexpr std::string_view entityIndexDataFilePath = "entity_index_data.yml"; 16 | constexpr std::string_view entityDirectoryPath = "entities"; 17 | 18 | constexpr std::string_view externalDirectoryPath = "external"; 19 | 20 | #endif // COMMON_HPP -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/src/exporter.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | #ifndef EXPORTER_HPP 8 | #define EXPORTER_HPP 9 | 10 | struct foeSimulation; 11 | 12 | foeResultSet foeImexYamlExport(char const *pExportPath, foeSimulation *pSimState); 13 | 14 | #endif // EXPORTER_HPP -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/src/import_functionality.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef IMPORT_FUNCTIONALITY_HPP 6 | #define IMPORT_FUNCTIONALITY_HPP 7 | 8 | #include 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | struct foeImexYamlResourceFns { 15 | PFN_foeImexYamlResourceImport pImport; 16 | }; 17 | 18 | auto sharedLockImportFunctionality() -> std::shared_lock; 19 | 20 | auto getResourceFns() -> std::map const &; 21 | 22 | auto getComponentFns() -> std::map const &; 23 | 24 | #endif // IMPORT_FUNCTIONALITY_HPP -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/src/importer_registration.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | #include 8 | #include 9 | 10 | #include "common.hpp" 11 | #include "log.hpp" 12 | #include "result.h" 13 | 14 | extern "C" foeResultSet foeImexYamlRegisterImporter() { 15 | return foeImexRegisterImporter(&foeCreateYamlImporter); 16 | } 17 | 18 | extern "C" void foeImexYamlDeregisterImporter() { 19 | foeImexDeregisterImporter(&foeCreateYamlImporter); 20 | } -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/src/log.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "log.hpp" 6 | 7 | FOE_DEFINE_LOG_CATEGORY(foeImexYaml, FOE_LOG_LEVEL_ALL) -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/src/log.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | FOE_DECLARE_LOG_CATEGORY(foeImexYaml) -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include 7 | #include 8 | #include -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/01-missing-dependencies-file/.dummy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/01-missing-dependencies-file/.dummy -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/02-incorrect-dependencies-file/dependencies.yml/.dummy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/02-incorrect-dependencies-file/dependencies.yml/.dummy -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/03-missing-resource-index-file/dependencies.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/03-missing-resource-index-file/dependencies.yml -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/04-incorrect-resource-index-file/dependencies.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/04-incorrect-resource-index-file/dependencies.yml -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/04-incorrect-resource-index-file/resource_index_data.yml/.dummy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/04-incorrect-resource-index-file/resource_index_data.yml/.dummy -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/05-missing-entity-index-file/dependencies.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/05-missing-entity-index-file/dependencies.yml -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/05-missing-entity-index-file/resource_index_data.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/05-missing-entity-index-file/resource_index_data.yml -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/06-incorrect-entity-index-file/dependencies.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/06-incorrect-entity-index-file/dependencies.yml -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/06-incorrect-entity-index-file/entity_index_data.yml/.dummy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/06-incorrect-entity-index-file/entity_index_data.yml/.dummy -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/06-incorrect-entity-index-file/resource_index_data.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/06-incorrect-entity-index-file/resource_index_data.yml -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/07-bad-resources-dir/dependencies.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/07-bad-resources-dir/dependencies.yml -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/07-bad-resources-dir/entity_index_data.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/07-bad-resources-dir/entity_index_data.yml -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/07-bad-resources-dir/resource_index_data.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/07-bad-resources-dir/resource_index_data.yml -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/07-bad-resources-dir/resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/07-bad-resources-dir/resources -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/08-bad-entities-dir/dependencies.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/08-bad-entities-dir/dependencies.yml -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/08-bad-entities-dir/entities: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/08-bad-entities-dir/entities -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/08-bad-entities-dir/entity_index_data.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/08-bad-entities-dir/entity_index_data.yml -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/08-bad-entities-dir/resource_index_data.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/08-bad-entities-dir/resource_index_data.yml -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/09-bad-external-dir/dependencies.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/09-bad-external-dir/dependencies.yml -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/09-bad-external-dir/entity_index_data.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/09-bad-external-dir/entity_index_data.yml -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/09-bad-external-dir/external: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/09-bad-external-dir/external -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/09-bad-external-dir/resource_index_data.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/09-bad-external-dir/resource_index_data.yml -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/10-good-empty/dependencies.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/10-good-empty/dependencies.yml -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/10-good-empty/entity_index_data.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/10-good-empty/entity_index_data.yml -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/10-good-empty/resource_index_data.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StableCoder/foe-engine/1e0ca2fc081524369bf74b951deac11938a5ed17/libs/foe_imex/libs/yaml/test/data/10-good-empty/resource_index_data.yml -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/11-good-content/dependencies.yml: -------------------------------------------------------------------------------- 1 | - name: test01 2 | group_id: 0 3 | - name: test02 4 | group_id: 1 -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/11-good-content/entities/0x00000002.yml: -------------------------------------------------------------------------------- 1 | index_id: 2 2 | editor_name: Entity-0x2 3 | test_sub_id: 4 | group_id: 0 5 | index_id: 15 -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/11-good-content/entity_index_data.yml: -------------------------------------------------------------------------------- 1 | next_free_index: 3 2 | recycled_indices: 3 | - 0 4 | - 2 -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/11-good-content/external/findable_external_file: -------------------------------------------------------------------------------- 1 | ~ -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/11-good-content/resource_index_data.yml: -------------------------------------------------------------------------------- 1 | next_free_index: 4 2 | recycled_indices: 3 | - 3 4 | - 1 -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/data/11-good-content/resources/0x00000001.yml: -------------------------------------------------------------------------------- 1 | index_id: 1 2 | editor_name: Resource-0x1 3 | test_sub_id: 4 | group_id: 0 5 | index_id: 15 -------------------------------------------------------------------------------- /libs/foe_imex/libs/yaml/test/test_common.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef TEST_COMMON_HPP 6 | #define TEST_COMMON_HPP 7 | 8 | constexpr char const *cNodeKey = "test_sub_id"; 9 | 10 | bool registerTestImporterContent(); 11 | 12 | void deregisterTestImporterContent(); 13 | 14 | #endif // TEST_COMMON_HPP -------------------------------------------------------------------------------- /libs/foe_imex/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_imex PRIVATE c_header_compatibility.c exporters.cpp 6 | importer.c importer.cpp log.cpp result.c) 7 | -------------------------------------------------------------------------------- /libs/foe_imex/src/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include -------------------------------------------------------------------------------- /libs/foe_imex/src/log.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "log.hpp" 6 | 7 | FOE_DEFINE_LOG_CATEGORY(foeImex, FOE_LOG_LEVEL_ALL) -------------------------------------------------------------------------------- /libs/foe_imex/src/log.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | FOE_DECLARE_LOG_CATEGORY(foeImex) -------------------------------------------------------------------------------- /libs/foe_imex/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline foeResultSet to_foeResult(foeImexResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foeImexResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_imex/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | # Setup 6 | find_package(Catch2 3 REQUIRED) 7 | 8 | # Declaration 9 | add_executable(test_foe_imex) 10 | add_test(NAME FoE-ImEx-Test COMMAND test_foe_imex) 11 | 12 | # Definition 13 | target_sources(test_foe_imex PRIVATE c_header_compatibility.c importer.cpp 14 | result.cpp) 15 | 16 | target_link_libraries(test_foe_imex PRIVATE Catch2::Catch2WithMain foe_imex) 17 | 18 | target_code_coverage( 19 | test_foe_imex 20 | AUTO 21 | ALL 22 | OBJECTS 23 | foe_imex 24 | EXCLUDE 25 | ${CMAKE_CURRENT_SOURCE_DIR}/.* 26 | ${CMAKE_SOURCE_DIR}/external/.*) 27 | -------------------------------------------------------------------------------- /libs/foe_imex/test/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include 7 | #include 8 | #include -------------------------------------------------------------------------------- /libs/foe_imgui/.gitignore: -------------------------------------------------------------------------------- 1 | *.u32 2 | -------------------------------------------------------------------------------- /libs/foe_imgui/data/NOTES.md: -------------------------------------------------------------------------------- 1 | The shaders here are copied verbatim from thee ImGui repository, found [here.](https://github.com/ocornut/imgui/tree/master/backends/vulkan) -------------------------------------------------------------------------------- /libs/foe_imgui/data/gen_spirv.sh: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | #!/usr/bin/env sh 6 | 7 | glslangValidator -V -x -o imgui.vert.u32 imgui.vert 8 | glslangValidator -V -x -o imgui.frag.u32 imgui.frag 9 | -------------------------------------------------------------------------------- /libs/foe_imgui/foe_imgui-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_imgui.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_imgui/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header(foe_imgui EXPORT_FILE_NAME 6 | ${CMAKE_CURRENT_BINARY_DIR}/foe/imgui/export.h) 7 | 8 | target_sources( 9 | foe_imgui 10 | PUBLIC FILE_SET 11 | HEADERS 12 | BASE_DIRS 13 | ${CMAKE_CURRENT_BINARY_DIR} 14 | ${CMAKE_CURRENT_SOURCE_DIR}/ 15 | FILES 16 | ${CMAKE_CURRENT_BINARY_DIR}/foe/imgui/export.h 17 | foe/imgui/plain_old_data.hpp 18 | foe/imgui/state.hpp) 19 | -------------------------------------------------------------------------------- /libs/foe_imgui/libs/vulkan/foe_imgui_vk-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_imgui_vk.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_imgui/libs/vulkan/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header(foe_imgui_vk EXPORT_FILE_NAME 6 | ${CMAKE_CURRENT_BINARY_DIR}/foe/imgui/vk/export.h) 7 | 8 | target_sources( 9 | foe_imgui_vk 10 | PUBLIC FILE_SET 11 | HEADERS 12 | BASE_DIRS 13 | ${CMAKE_CURRENT_BINARY_DIR} 14 | ${CMAKE_CURRENT_SOURCE_DIR}/ 15 | FILES 16 | ${CMAKE_CURRENT_BINARY_DIR}/foe/imgui/vk/export.h 17 | foe/imgui/vk/renderer.hpp 18 | foe/imgui/vk/render_graph_job_imgui.hpp 19 | foe/imgui/vk/result.h) 20 | -------------------------------------------------------------------------------- /libs/foe_imgui/libs/vulkan/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_imgui_vk PRIVATE render_graph_job_imgui.cpp renderer.cpp 6 | result.c vk_result.c) 7 | -------------------------------------------------------------------------------- /libs/foe_imgui/libs/vulkan/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline foeResultSet to_foeResult(foeImGuiVkResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foeImGuiVkResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_imgui/libs/vulkan/src/vk_result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef VK_RESULT_H 6 | #define VK_RESULT_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | void VkResultToString(VkResult value, char buffer[FOE_MAX_RESULT_STRING_SIZE]); 16 | 17 | inline foeResultSet vk_to_foeResult(VkResult value) { 18 | foeResultSet result = { 19 | .value = value, 20 | .toString = (PFN_foeResultToString)NULL, 21 | }; 22 | 23 | return result; 24 | } 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif // VK_RESULT_H -------------------------------------------------------------------------------- /libs/foe_imgui/libs/vulkan/test/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include -------------------------------------------------------------------------------- /libs/foe_imgui/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_imgui PRIVATE plain_old_data.cpp state.cpp) 6 | -------------------------------------------------------------------------------- /libs/foe_imgui/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | # Test Setup 6 | enable_testing() 7 | find_package(Catch2 3 REQUIRED) 8 | 9 | add_executable(test_foe_imgui state.cpp) 10 | target_link_libraries(test_foe_imgui PRIVATE foe_imgui Catch2::Catch2WithMain) 11 | target_code_coverage( 12 | test_foe_imgui 13 | AUTO 14 | ALL 15 | EXCLUDE 16 | ${CMAKE_CURRENT_SOURCE_DIR}/.* 17 | ${CMAKE_SOURCE_DIR}/external/.* 18 | OBJECTS 19 | foe_imgui) 20 | 21 | add_test(NAME FoE-ImGui-Tests COMMAND test_foe_imgui) 22 | -------------------------------------------------------------------------------- /libs/foe_model/foe_model-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_model.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_model/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header(foe_model EXPORT_FILE_NAME 6 | ${CMAKE_CURRENT_BINARY_DIR}/foe/model/export.h) 7 | 8 | target_sources( 9 | foe_model 10 | PUBLIC FILE_SET 11 | HEADERS 12 | BASE_DIRS 13 | ${CMAKE_CURRENT_BINARY_DIR} 14 | ${CMAKE_CURRENT_SOURCE_DIR}/ 15 | FILES 16 | ${CMAKE_CURRENT_BINARY_DIR}/foe/model/export.h 17 | foe/model/animation.hpp 18 | foe/model/armature.hpp 19 | foe/model/cube.hpp 20 | foe/model/ico_sphere.hpp 21 | foe/model/importer.hpp 22 | foe/model/vertex_component.hpp) 23 | -------------------------------------------------------------------------------- /libs/foe_model/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_model PRIVATE animation.cpp cube.cpp ico_sphere.cpp 6 | model_log.cpp vertex_component.cpp) 7 | -------------------------------------------------------------------------------- /libs/foe_model/src/model_log.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "model_log.hpp" 6 | 7 | FOE_DEFINE_LOG_CATEGORY(Model, FOE_LOG_LEVEL_ALL) -------------------------------------------------------------------------------- /libs/foe_model/src/model_log.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef MODEL_LOG_HPP 6 | #define MODEL_LOG_HPP 7 | 8 | #include 9 | 10 | FOE_DECLARE_LOG_CATEGORY(Model) 11 | 12 | #endif // MODEL_LOG_HPP -------------------------------------------------------------------------------- /libs/foe_model_assimp/foe_model_assimp-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_model_assimp.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_model_assimp/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header(foe_model_assimp EXPORT_FILE_NAME 6 | ${CMAKE_CURRENT_BINARY_DIR}/foe/model/assimp/export.h) 7 | 8 | target_sources( 9 | foe_model_assimp 10 | PUBLIC FILE_SET 11 | HEADERS 12 | BASE_DIRS 13 | ${CMAKE_CURRENT_BINARY_DIR} 14 | ${CMAKE_CURRENT_SOURCE_DIR}/ 15 | FILES 16 | ${CMAKE_CURRENT_BINARY_DIR}/foe/model/assimp/export.h 17 | foe/model/assimp/flags.hpp 18 | foe/model/assimp/importer.hpp) 19 | -------------------------------------------------------------------------------- /libs/foe_model_assimp/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_model_assimp PRIVATE assimp_mesh_loader.cpp assimp_scene_loader.cpp 7 | flags.cpp importer.cpp) 8 | -------------------------------------------------------------------------------- /libs/foe_model_assimp/src/assimp_scene_loader.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef ASSIMP_SCENE_LOADER_HPP 6 | #define ASSIMP_SCENE_LOADER_HPP 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #include 13 | 14 | auto importSceneArmature(aiScene const *pScene) -> std::vector; 15 | 16 | auto importAnimation(aiAnimation *pAnimation) -> foeAnimation; 17 | 18 | #endif // ASSIMP_SCENE_LOADER_HPP -------------------------------------------------------------------------------- /libs/foe_network/foe_network-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_network.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_network/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header(foe_network EXPORT_FILE_NAME 6 | ${CMAKE_CURRENT_BINARY_DIR}/foe/network/export.h) 7 | 8 | target_sources( 9 | foe_network 10 | PUBLIC FILE_SET 11 | HEADERS 12 | BASE_DIRS 13 | ${CMAKE_CURRENT_BINARY_DIR} 14 | ${CMAKE_CURRENT_SOURCE_DIR}/ 15 | FILES 16 | ${CMAKE_CURRENT_BINARY_DIR}/foe/network/export.h 17 | foe/network/address.h 18 | foe/network/result.h 19 | foe/network/socket.h) 20 | -------------------------------------------------------------------------------- /libs/foe_network/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2023 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_network PRIVATE address.c result.c socket.c) 6 | 7 | if(WIN32) 8 | target_sources(foe_network PRIVATE network_initialization_win32.cpp) 9 | else() 10 | target_sources(foe_network PRIVATE network_initialization_unix.c) 11 | endif() 12 | -------------------------------------------------------------------------------- /libs/foe_network/src/network_initialization.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef NETWORK_INITIALIZATION_H 6 | #define NETWORK_INITIALIZATION_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | foeResultSet initializeNetworkStack(); 15 | 16 | void deinitializeNetworkStack(); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif // NETWORK_INITIALIZATION_H -------------------------------------------------------------------------------- /libs/foe_network/src/network_initialization_unix.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "network_initialization.h" 6 | 7 | #include "result.h" 8 | 9 | foeResultSet initializeNetworkStack() { return to_foeResult(FOE_NETWORK_SUCCESS); } 10 | 11 | void deinitializeNetworkStack() {} 12 | -------------------------------------------------------------------------------- /libs/foe_network/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | static inline foeResultSet to_foeResult(foeNetworkResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foeNetworkResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_network/test/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include 7 | #include -------------------------------------------------------------------------------- /libs/foe_physics/foe_physics-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_physics.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_physics/include/foe/physics/component/rigid_body.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_PHYSICS_COMPONENT_RIGID_BODY_H 6 | #define FOE_PHYSICS_COMPONENT_RIGID_BODY_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | struct foeRigidBody { 15 | float mass; 16 | foeResourceID collisionShape; 17 | }; 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif // FOE_PHYSICS_COMPONENT_RIGID_BODY_H -------------------------------------------------------------------------------- /libs/foe_physics/include/foe/physics/component/rigid_body_pool.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_PHYSICS_COMPONENT_RIGID_BODY_POOL_H 6 | #define FOE_PHYSICS_COMPONENT_RIGID_BODY_POOL_H 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | typedef foeEcsComponentPool foeRigidBodyPool; 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif // FOE_PHYSICS_COMPONENT_RIGID_BODY_POOL_H -------------------------------------------------------------------------------- /libs/foe_physics/include/foe/physics/registration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_PHYSICS_REGISTRATION_H 6 | #define FOE_PHYSICS_REGISTRATION_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | FOE_PHYSICS_EXPORT 16 | int foePhysicsFunctionalityID(); 17 | 18 | FOE_PHYSICS_EXPORT 19 | foeResultSet foePhysicsRegisterFunctionality(); 20 | 21 | FOE_PHYSICS_EXPORT 22 | void foePhysicsDeregisterFunctionality(); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif // FOE_PHYSICS_REGISTRATION_H -------------------------------------------------------------------------------- /libs/foe_physics/include/foe/physics/resource/collision_shape.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_PHYSICS_RESOURCE_COLLISION_SHAPE_HPP 6 | #define FOE_PHYSICS_RESOURCE_COLLISION_SHAPE_HPP 7 | 8 | #include 9 | #include 10 | 11 | #include 12 | 13 | struct foeCollisionShape { 14 | foeResourceType rType; 15 | void *pNext; 16 | std::unique_ptr collisionShape; 17 | }; 18 | 19 | #endif // FOE_PHYSICS_RESOURCE_COLLISION_SHAPE_HPP -------------------------------------------------------------------------------- /libs/foe_physics/include/foe/physics/resource/collision_shape_create_info.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_PHYSICS_RESOURCE_COLLISION_SHAPE_CREATE_INFO_HPP 6 | #define FOE_PHYSICS_RESOURCE_COLLISION_SHAPE_CREATE_INFO_HPP 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | struct foeCollisionShapeCreateInfo { 13 | glm::vec3 boxSize; 14 | }; 15 | 16 | #endif // FOE_PHYSICS_RESOURCE_COLLISION_SHAPE_CREATE_INFO_HPP -------------------------------------------------------------------------------- /libs/foe_physics/include/foe/physics/type_defs.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_PHYSICS_TYPE_DEFS_H 6 | #define FOE_PHYSICS_TYPE_DEFS_H 7 | 8 | #define FOE_PHYSICS_LIBRARY_ID 1000018000 9 | 10 | typedef enum foePhysicsStructureType { 11 | FOE_PHYSICS_STRUCTURE_TYPE_COLLISION_SHAPE = 1000018000, 12 | FOE_PHYSICS_STRUCTURE_TYPE_COLLISION_SHAPE_CREATE_INFO = 1000018001, 13 | FOE_PHYSICS_STRUCTURE_TYPE_COLLISION_SHAPE_LOADER = 1000018002, 14 | FOE_PHYSICS_STRUCTURE_TYPE_PHYSICS_SYSTEM = 1000018003, 15 | FOE_PHYSICS_STRUCTURE_TYPE_RIGID_BODY_POOL = 1000018004, 16 | } foePhysicsStructureType; 17 | 18 | #endif // FOE_PHYSICS_TYPE_DEFS_H -------------------------------------------------------------------------------- /libs/foe_physics/libs/binary/foe_physics_binary-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_physics_binary.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_physics/libs/binary/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header(foe_physics_binary EXPORT_FILE_NAME 6 | ${CMAKE_CURRENT_BINARY_DIR}/foe/physics/binary/export.h) 7 | 8 | target_sources( 9 | foe_physics_binary 10 | PUBLIC FILE_SET 11 | HEADERS 12 | BASE_DIRS 13 | ${CMAKE_CURRENT_BINARY_DIR} 14 | ${CMAKE_CURRENT_SOURCE_DIR}/ 15 | FILES 16 | ${CMAKE_CURRENT_BINARY_DIR}/foe/physics/binary/export.h 17 | foe/physics/binary/export_registration.h 18 | foe/physics/binary/import_registration.h 19 | foe/physics/binary/result.h) 20 | -------------------------------------------------------------------------------- /libs/foe_physics/libs/binary/include/foe/physics/binary/export_registration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_PHYSICS_BINARY_EXPORT_REGISTRATION_HPP 6 | #define FOE_PHYSICS_BINARY_EXPORT_REGISTRATION_HPP 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | FOE_PHYSICS_BINARY_EXPORT 16 | foeResultSet foePhysicsBinaryRegisterExporters(); 17 | 18 | FOE_PHYSICS_BINARY_EXPORT 19 | void foePhysicsBinaryDeregisterExporters(); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | #endif // FOE_PHYSICS_BINARY_EXPORT_REGISTRATION_HPP -------------------------------------------------------------------------------- /libs/foe_physics/libs/binary/include/foe/physics/binary/import_registration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_PHYSICS_BINARY_IMPORT_REGISTRATION_HPP 6 | #define FOE_PHYSICS_BINARY_IMPORT_REGISTRATION_HPP 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | FOE_PHYSICS_BINARY_EXPORT 16 | foeResultSet foePhysicsBinaryRegisterImporters(); 17 | 18 | FOE_PHYSICS_BINARY_EXPORT 19 | void foePhysicsBinaryDeregisterImporters(); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | #endif // FOE_PHYSICS_BINARY_IMPORT_REGISTRATION_HPP -------------------------------------------------------------------------------- /libs/foe_physics/libs/binary/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_physics_binary 7 | PRIVATE collision_shape.c collision_shape.cpp export_registration.c 8 | import_registration.c result.c rigid_body.cpp) 9 | -------------------------------------------------------------------------------- /libs/foe_physics/libs/binary/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline static foeResultSet to_foeResult(foePhysicsBinaryResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foePhysicsBinaryResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_physics/libs/binary/test/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include 7 | #include -------------------------------------------------------------------------------- /libs/foe_physics/libs/imgui/foe_physics_imgui-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_physics_imgui.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_physics/libs/imgui/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header(foe_physics_imgui EXPORT_FILE_NAME 6 | ${CMAKE_CURRENT_BINARY_DIR}/foe/physics/imgui/export.h) 7 | 8 | target_sources( 9 | foe_physics_imgui 10 | PUBLIC FILE_SET 11 | HEADERS 12 | BASE_DIRS 13 | ${CMAKE_CURRENT_BINARY_DIR} 14 | ${CMAKE_CURRENT_SOURCE_DIR}/ 15 | FILES 16 | ${CMAKE_CURRENT_BINARY_DIR}/foe/physics/imgui/export.h 17 | foe/physics/imgui/registration.hpp) 18 | -------------------------------------------------------------------------------- /libs/foe_physics/libs/imgui/include/foe/physics/imgui/registration.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_PHYSICS_IMGUI_REGISTRATION_HPP 6 | #define FOE_PHYSICS_IMGUI_REGISTRATION_HPP 7 | 8 | #include 9 | #include 10 | 11 | class foeSimulationImGuiRegistrar; 12 | 13 | FOE_PHYSICS_IMGUI_EXPORT 14 | foeResultSet foePhysicsImGuiRegister(foeSimulationImGuiRegistrar *pRegistrar); 15 | 16 | FOE_PHYSICS_IMGUI_EXPORT 17 | foeResultSet foePhysicsImGuiDeregister(foeSimulationImGuiRegistrar *pRegistrar); 18 | 19 | #endif // FOE_PHYSICS_IMGUI_REGISTRATION_HPP -------------------------------------------------------------------------------- /libs/foe_physics/libs/imgui/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_physics_imgui PRIVATE collision_shape.cpp registration.cpp 6 | rigid_body.cpp) 7 | -------------------------------------------------------------------------------- /libs/foe_physics/libs/imgui/src/collision_shape.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef COLLISION_SHAPE_HPP 6 | #define COLLISION_SHAPE_HPP 7 | 8 | struct foeCollisionShape; 9 | struct foeCollisionShapeCreateInfo; 10 | 11 | void imgui_foeCollisionShape(foeCollisionShape const *pResource); 12 | 13 | void imgui_foeCollisionShapeCreateInfo(foeCollisionShapeCreateInfo const *pCreateInfo); 14 | 15 | #endif // COLLISION_SHAPE_HPP -------------------------------------------------------------------------------- /libs/foe_physics/libs/imgui/src/rigid_body.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "rigid_body.hpp" 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | void imgui_foeRigidBody(foeRigidBody *pComponent) { 12 | ImGui::Separator(); 13 | ImGui::Text("foeRigidBody"); 14 | 15 | ImGui::InputFloat("Mass", &pComponent->mass); 16 | ImGui::Text("CollisionShape ID: %s", foeIdToString(pComponent->collisionShape).data()); 17 | } -------------------------------------------------------------------------------- /libs/foe_physics/libs/imgui/src/rigid_body.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RIGID_BODY_HPP 6 | #define RIGID_BODY_HPP 7 | 8 | struct foeRigidBody; 9 | 10 | void imgui_foeRigidBody(foeRigidBody *pComponent); 11 | 12 | #endif // RIGID_BODY_HPP -------------------------------------------------------------------------------- /libs/foe_physics/libs/yaml/foe_physics_yaml-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_physics_yaml.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_physics/libs/yaml/include/foe/physics/yaml/export_registration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_PHYSICS_YAML_EXPORT_REGISTRATION_H 6 | #define FOE_PHYSICS_YAML_EXPORT_REGISTRATION_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | FOE_PHYSICS_YAML_EXPORT 16 | foeResultSet foePhysicsYamlRegisterExporters(); 17 | 18 | FOE_PHYSICS_YAML_EXPORT 19 | void foePhysicsYamlDeregisterExporters(); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | #endif // FOE_PHYSICS_YAML_EXPORT_REGISTRATION_H -------------------------------------------------------------------------------- /libs/foe_physics/libs/yaml/include/foe/physics/yaml/import_registration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_PHYSICS_YAML_IMPORT_REGISTRATION_H 6 | #define FOE_PHYSICS_YAML_IMPORT_REGISTRATION_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | FOE_PHYSICS_YAML_EXPORT 16 | foeResultSet foePhysicsYamlRegisterImporters(); 17 | 18 | FOE_PHYSICS_YAML_EXPORT 19 | void foePhysicsYamlDeregisterImporters(); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | #endif // FOE_PHYSICS_YAML_IMPORT_REGISTRATION_H -------------------------------------------------------------------------------- /libs/foe_physics/libs/yaml/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_physics_yaml 7 | PRIVATE collision_shape.cpp export_registration.cpp import_registration.cpp 8 | result.c rigid_body.cpp structs.cpp) 9 | -------------------------------------------------------------------------------- /libs/foe_physics/libs/yaml/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline foeResultSet to_foeResult(foePhysicsYamlResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foePhysicsYamlResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_physics/libs/yaml/src/rigid_body.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RIGID_BODY_HPP 6 | #define RIGID_BODY_HPP 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | char const *yaml_rigid_body_key(); 13 | 14 | auto yaml_read_rigid_body(YAML::Node const &node, foeEcsGroupTranslator groupTranslator) 15 | -> foeRigidBody; 16 | 17 | auto yaml_write_rigid_body(foeRigidBody const &data) -> YAML::Node; 18 | 19 | #endif // RIGID_BODY_HPP -------------------------------------------------------------------------------- /libs/foe_physics/libs/yaml/test/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include 7 | #include -------------------------------------------------------------------------------- /libs/foe_physics/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_physics 7 | PRIVATE binary.cpp 8 | collision_shape_loader.cpp 9 | compare.cpp 10 | log.cpp 11 | registration.cpp 12 | result.c 13 | system.cpp) 14 | -------------------------------------------------------------------------------- /libs/foe_physics/src/log.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "log.hpp" 6 | 7 | FOE_DEFINE_LOG_CATEGORY(foePhysics, FOE_LOG_LEVEL_ALL) -------------------------------------------------------------------------------- /libs/foe_physics/src/log.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef LOG_HPP 6 | #define LOG_HPP 7 | 8 | #include 9 | 10 | FOE_DECLARE_LOG_CATEGORY(foePhysics) 11 | 12 | #endif // LOG_HPP -------------------------------------------------------------------------------- /libs/foe_physics/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline foeResultSet to_foeResult(foePhysicsResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foePhysicsResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_physics/test/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include -------------------------------------------------------------------------------- /libs/foe_position/foe_position-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_position.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_position/include/foe/position/compare.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_POSITION_COMPARE_H 6 | #define FOE_POSITION_COMPARE_H 7 | 8 | #include 9 | 10 | #include 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | typedef struct foePosition3d foePosition3d; 17 | 18 | FOE_POSITION_EXPORT 19 | bool compare_foePosition3d(foePosition3d const *pData1, foePosition3d const *pData2); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | #endif // FOE_POSITION_COMPARE_H 26 | -------------------------------------------------------------------------------- /libs/foe_position/include/foe/position/component/3d.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_POSITION_COMPONENT_3D_HPP 6 | #define FOE_POSITION_COMPONENT_3D_HPP 7 | 8 | #include 9 | #include 10 | 11 | struct foePosition3d { 12 | glm::vec3 position; 13 | glm::quat orientation; 14 | }; 15 | 16 | #endif // FOE_POSITION_COMPONENT_3D_HPP -------------------------------------------------------------------------------- /libs/foe_position/include/foe/position/component/3d_pool.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_POSITION_COMPONENT_3D_POOL_H 6 | #define FOE_POSITION_COMPONENT_3D_POOL_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | typedef foeEcsComponentPool foePosition3dPool; 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | 20 | #endif // FOE_POSITION_COMPONENT_3D_POOL_H -------------------------------------------------------------------------------- /libs/foe_position/include/foe/position/registration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_POSITION_REGISTRATION_H 6 | #define FOE_POSITION_REGISTRATION_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | FOE_POSITION_EXPORT 16 | int foePositionFunctionalityID(); 17 | 18 | FOE_POSITION_EXPORT 19 | foeResultSet foePositionRegisterFunctionality(); 20 | 21 | FOE_POSITION_EXPORT 22 | void foePositionDeregisterFunctionality(); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif // FOE_POSITION_REGISTRATION_H -------------------------------------------------------------------------------- /libs/foe_position/include/foe/position/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_POSITION_RESULT_H 6 | #define FOE_POSITION_RESULT_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | typedef enum foePositionResult { 16 | FOE_POSITION_SUCCESS = 0, 17 | FOE_POSITION_ERROR_OUT_OF_MEMORY = -1000015001, 18 | } foePositionResult; 19 | 20 | FOE_POSITION_EXPORT 21 | void foePositionResultToString(foePositionResult value, char buffer[FOE_MAX_RESULT_STRING_SIZE]); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // FOE_POSITION_RESULT_H -------------------------------------------------------------------------------- /libs/foe_position/include/foe/position/type_defs.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_POSITION_TYPE_DEFS_H 6 | #define FOE_POSITION_TYPE_DEFS_H 7 | 8 | #define FOE_POSITION_LIBRARY_ID 1000015000 9 | 10 | typedef enum foePositionStructureType { 11 | FOE_POSITION_STRUCTURE_TYPE_POSITION_3D_POOL = 1000015000, 12 | } foePositionStructureType; 13 | 14 | #endif // FOE_POSITION_TYPE_DEFS_H -------------------------------------------------------------------------------- /libs/foe_position/libs/binary/foe_position_binary-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_position_binary.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_position/libs/binary/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header(foe_position_binary EXPORT_FILE_NAME 6 | ${CMAKE_CURRENT_BINARY_DIR}/foe/position/binary/export.h) 7 | 8 | target_sources( 9 | foe_position_binary 10 | PUBLIC FILE_SET 11 | HEADERS 12 | BASE_DIRS 13 | ${CMAKE_CURRENT_BINARY_DIR} 14 | ${CMAKE_CURRENT_SOURCE_DIR}/ 15 | FILES 16 | ${CMAKE_CURRENT_BINARY_DIR}/foe/position/binary/export.h 17 | foe/position/binary/export_registration.h 18 | foe/position/binary/import_registration.h 19 | foe/position/binary/result.h) 20 | -------------------------------------------------------------------------------- /libs/foe_position/libs/binary/include/foe/position/binary/export_registration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_POSITION_BINARY_EXPORT_REGISTRATION_HPP 6 | #define FOE_POSITION_BINARY_EXPORT_REGISTRATION_HPP 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | FOE_POSITION_BINARY_EXPORT 16 | foeResultSet foePositionBinaryRegisterExporters(); 17 | 18 | FOE_POSITION_BINARY_EXPORT 19 | void foePositionBinaryDeregisterExporters(); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | #endif // FOE_POSITION_BINARY_EXPORT_REGISTRATION_HPP -------------------------------------------------------------------------------- /libs/foe_position/libs/binary/include/foe/position/binary/import_registration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_POSITION_BINARY_IMPORT_REGISTRATION_HPP 6 | #define FOE_POSITION_BINARY_IMPORT_REGISTRATION_HPP 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | FOE_POSITION_BINARY_EXPORT 16 | foeResultSet foePositionBinaryRegisterImporters(); 17 | 18 | FOE_POSITION_BINARY_EXPORT 19 | void foePositionBinaryDeregisterImporters(); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | #endif // FOE_POSITION_BINARY_IMPORT_REGISTRATION_HPP -------------------------------------------------------------------------------- /libs/foe_position/libs/binary/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_position_binary PRIVATE export_registration.c import_registration.c 7 | position_3d.cpp result.c) 8 | -------------------------------------------------------------------------------- /libs/foe_position/libs/binary/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline static foeResultSet to_foeResult(foePositionBinaryResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foePositionBinaryResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_position/libs/binary/test/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include -------------------------------------------------------------------------------- /libs/foe_position/libs/imgui/foe_position_imgui-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_position_imgui.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_position/libs/imgui/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header(foe_position_imgui EXPORT_FILE_NAME 6 | ${CMAKE_CURRENT_BINARY_DIR}/foe/position/imgui/export.h) 7 | 8 | target_sources( 9 | foe_position_imgui 10 | PUBLIC FILE_SET 11 | HEADERS 12 | BASE_DIRS 13 | ${CMAKE_CURRENT_BINARY_DIR} 14 | ${CMAKE_CURRENT_SOURCE_DIR}/ 15 | FILES 16 | ${CMAKE_CURRENT_BINARY_DIR}/foe/position/imgui/export.h 17 | foe/position/imgui/registration.hpp) 18 | -------------------------------------------------------------------------------- /libs/foe_position/libs/imgui/include/foe/position/imgui/registration.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_POSITION_IMGUI_REGISTRATION_HPP 6 | #define FOE_POSITION_IMGUI_REGISTRATION_HPP 7 | 8 | #include 9 | #include 10 | 11 | class foeSimulationImGuiRegistrar; 12 | 13 | FOE_POSITION_IMGUI_EXPORT 14 | foeResultSet foePositionImGuiRegister(foeSimulationImGuiRegistrar *pRegistrar); 15 | 16 | FOE_POSITION_IMGUI_EXPORT 17 | foeResultSet foePositionImGuiDeregister(foeSimulationImGuiRegistrar *pRegistrar); 18 | 19 | #endif // FOE_POSITION_IMGUI_REGISTRATION_HPP -------------------------------------------------------------------------------- /libs/foe_position/libs/imgui/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_position_imgui PRIVATE position_3d.cpp registration.cpp) 6 | -------------------------------------------------------------------------------- /libs/foe_position/libs/imgui/src/position_3d.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "position_3d.hpp" 6 | 7 | #include 8 | #include 9 | 10 | void imgui_foePosition3d(foePosition3d *pPosition3d) { 11 | ImGui::Separator(); 12 | ImGui::Text("foePosition3d"); 13 | 14 | ImGui::InputFloat3("Position", reinterpret_cast(&pPosition3d->position)); 15 | ImGui::InputFloat4("Orientation(Quat)", reinterpret_cast(&pPosition3d->orientation)); 16 | } -------------------------------------------------------------------------------- /libs/foe_position/libs/imgui/src/position_3d.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef POSITION_3D_HPP 6 | #define POSITION_3D_HPP 7 | 8 | #include 9 | 10 | #include 11 | 12 | struct foePosition3d; 13 | 14 | void imgui_foePosition3d(foePosition3d *pPosition3d); 15 | 16 | #endif // POSITION_3D_HPP -------------------------------------------------------------------------------- /libs/foe_position/libs/yaml/foe_position_yaml-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_position_yaml.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_position/libs/yaml/include/foe/position/yaml/export_registration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_POSITION_YAML_EXPORT_REGISTRATION_H 6 | #define FOE_POSITION_YAML_EXPORT_REGISTRATION_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | FOE_POSITION_YAML_EXPORT 16 | foeResultSet foePositionYamlRegisterExporters(); 17 | 18 | FOE_POSITION_YAML_EXPORT 19 | void foePositionYamlDeregisterExporters(); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | #endif // FOE_POSITION_YAML_EXPORT_REGISTRATION_H -------------------------------------------------------------------------------- /libs/foe_position/libs/yaml/include/foe/position/yaml/import_registration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_POSITION_YAML_IMPORT_REGISTRATION_H 6 | #define FOE_POSITION_YAML_IMPORT_REGISTRATION_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | FOE_POSITION_YAML_EXPORT 16 | foeResultSet foePositionYamlRegisterImporters(); 17 | 18 | FOE_POSITION_YAML_EXPORT 19 | void foePositionYamlDeregisterImporters(); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | #endif // FOE_POSITION_YAML_IMPORT_REGISTRATION_H -------------------------------------------------------------------------------- /libs/foe_position/libs/yaml/src/3d.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "3d.hpp" 6 | 7 | #include 8 | 9 | char const *yaml_position3d_key() { return "position_3d"; } 10 | 11 | auto yaml_read_position3d(YAML::Node const &node) -> foePosition3d { 12 | foePosition3d position; 13 | 14 | yaml_read_foePosition3d("", node, position); 15 | 16 | return position; 17 | } 18 | 19 | auto yaml_write_position3d(foePosition3d const &data) -> YAML::Node { 20 | YAML::Node writeNode; 21 | 22 | yaml_write_foePosition3d("", data, writeNode); 23 | 24 | return writeNode; 25 | } -------------------------------------------------------------------------------- /libs/foe_position/libs/yaml/src/3d.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef POSITION_3D_HPP 6 | #define POSITION_3D_HPP 7 | 8 | #include 9 | #include 10 | 11 | char const *yaml_position3d_key(); 12 | 13 | auto yaml_read_position3d(YAML::Node const &node) -> foePosition3d; 14 | 15 | auto yaml_write_position3d(foePosition3d const &data) -> YAML::Node; 16 | 17 | #endif // POSITION_3D_HPP -------------------------------------------------------------------------------- /libs/foe_position/libs/yaml/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_position_yaml PRIVATE 3d.cpp export_registration.cpp 7 | import_registration.cpp result.c structs.cpp) 8 | -------------------------------------------------------------------------------- /libs/foe_position/libs/yaml/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline foeResultSet to_foeResult(foePositionYamlResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foePositionYamlResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_position/libs/yaml/test/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include 7 | #include -------------------------------------------------------------------------------- /libs/foe_position/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_position PRIVATE binary.cpp compare.cpp log.cpp 6 | registration.cpp result.c) 7 | -------------------------------------------------------------------------------- /libs/foe_position/src/compare.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | #include 8 | 9 | extern "C" bool compare_foePosition3d(foePosition3d const *pData1, foePosition3d const *pData2) { 10 | // glm::vec3 - position 11 | if (pData1->position != pData2->position) { 12 | return false; 13 | } 14 | 15 | // glm::quat - orientation 16 | if (pData1->orientation != pData2->orientation) { 17 | return false; 18 | } 19 | 20 | return true; 21 | } 22 | -------------------------------------------------------------------------------- /libs/foe_position/src/log.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "log.hpp" 6 | 7 | FOE_DEFINE_LOG_CATEGORY(foePosition, FOE_LOG_LEVEL_ALL) -------------------------------------------------------------------------------- /libs/foe_position/src/log.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | FOE_DECLARE_LOG_CATEGORY(foePosition) -------------------------------------------------------------------------------- /libs/foe_position/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline foeResultSet to_foeResult(foePositionResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foePositionResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_resource/foe_resource-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_resource.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_resource/include/foe/resource/type_defs.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_RESOURCE_TYPE_DEFS_H 6 | #define FOE_RESOURCE_TYPE_DEFS_H 7 | 8 | #define FOE_RESOURCE_LIBRARY_ID 1000100000 9 | 10 | typedef int foeResourceType; 11 | 12 | typedef struct foeResourceBase { 13 | foeResourceType rType; 14 | void *pNext; 15 | } foeResourceBase; 16 | 17 | typedef enum foeResourceResourceType { 18 | FOE_RESOURCE_RESOURCE_TYPE_UNDEFINED = 1000100000, 19 | FOE_RESOURCE_RESOURCE_TYPE_REPLACED = 1000100001, 20 | } foeResourceResourceType; 21 | 22 | #endif // FOE_RESOURCE_TYPE_DEFS_H -------------------------------------------------------------------------------- /libs/foe_resource/libs/imgui/foe_resource_imgui-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_resource_imgui.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_resource/libs/imgui/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header( 6 | foe_resource_imgui EXPORT_MACRO_NAME FOE_RES_IMGUI_EXPORT EXPORT_FILE_NAME 7 | ${CMAKE_CURRENT_BINARY_DIR}/foe/resource/imgui/export.h) 8 | 9 | target_sources( 10 | foe_resource_imgui 11 | PUBLIC FILE_SET 12 | HEADERS 13 | BASE_DIRS 14 | ${CMAKE_CURRENT_BINARY_DIR} 15 | ${CMAKE_CURRENT_SOURCE_DIR}/ 16 | FILES 17 | ${CMAKE_CURRENT_BINARY_DIR}/foe/resource/imgui/export.h 18 | foe/resource/imgui/create_info.h 19 | foe/resource/imgui/resource.h) 20 | -------------------------------------------------------------------------------- /libs/foe_resource/libs/imgui/include/foe/resource/imgui/create_info.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_RESOURCE_IMGUI_CREATE_INFO_H 6 | #define FOE_RESOURCE_IMGUI_CREATE_INFO_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | FOE_RES_IMGUI_EXPORT 16 | void imgui_foeResourceCreateInfo(foeResourceCreateInfo createInfo); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif // FOE_RESOURCE_IMGUI_CREATE_INFO_H -------------------------------------------------------------------------------- /libs/foe_resource/libs/imgui/include/foe/resource/imgui/resource.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_RESOURCE_IMGUI_RESOURCE_H 6 | #define FOE_RESOURCE_IMGUI_RESOURCE_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | FOE_RES_IMGUI_EXPORT 16 | void imgui_foeResource(foeResource resource); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif // FOE_RESOURCE_IMGUI_RESOURCE_H -------------------------------------------------------------------------------- /libs/foe_resource/libs/imgui/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_resource_imgui PRIVATE create_info.cpp resource.cpp) 6 | -------------------------------------------------------------------------------- /libs/foe_resource/libs/imgui/src/create_info.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | #include 8 | 9 | extern "C" void imgui_foeResourceCreateInfo(foeResourceCreateInfo createInfo) { 10 | ImGui::Text("Type: %i", foeResourceCreateInfoGetType(createInfo)); 11 | // Decrement ref-count by 1 to account for handle being held for display purposes 12 | ImGui::Text("Ref Count: %i", foeResourceCreateInfoGetRefCount(createInfo) - 1); 13 | } -------------------------------------------------------------------------------- /libs/foe_resource/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022-2023 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_resource PRIVATE create_info.cpp log.cpp pool.cpp 6 | resource.cpp result.c) 7 | -------------------------------------------------------------------------------- /libs/foe_resource/src/log.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "log.hpp" 6 | 7 | FOE_DEFINE_LOG_CATEGORY(foeResource, FOE_LOG_LEVEL_ALL) -------------------------------------------------------------------------------- /libs/foe_resource/src/log.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef LOG_HPP 6 | #define LOG_HPP 7 | 8 | #include 9 | 10 | FOE_DECLARE_LOG_CATEGORY(foeResource) 11 | 12 | #endif // LOG_HPP -------------------------------------------------------------------------------- /libs/foe_resource/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | inline foeResultSet to_foeResult(foeResourceResult value) { 11 | foeResultSet result = { 12 | .value = value, 13 | .toString = (PFN_foeResultToString)foeResourceResultToString, 14 | }; 15 | 16 | return result; 17 | } 18 | 19 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_resource/test/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include -------------------------------------------------------------------------------- /libs/foe_resource/test/test_log_sink.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef TEST_LOG_SINK_HPP 6 | #define TEST_LOG_SINK_HPP 7 | 8 | #include 9 | 10 | struct TestLogSink { 11 | static void log(void *pContext, char const *, foeLogLevel level, char const *msg) { 12 | TestLogSink *pSink = (TestLogSink *)pContext; 13 | 14 | pSink->logMessages.emplace_back(LogEntry{ 15 | .level = level, 16 | .msg = msg, 17 | }); 18 | } 19 | 20 | struct LogEntry { 21 | foeLogLevel level; 22 | std::string msg; 23 | }; 24 | 25 | std::vector logMessages; 26 | }; 27 | 28 | #endif // TEST_LOG_SINK_HPP -------------------------------------------------------------------------------- /libs/foe_simulation/foe_simulation-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_simulation.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_simulation/libs/imgui/foe_simulation_imgui-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_simulation_imgui.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_simulation/libs/imgui/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header( 6 | foe_simulation_imgui EXPORT_MACRO_NAME FOE_SIM_IMGUI_EXPORT EXPORT_FILE_NAME 7 | ${CMAKE_CURRENT_BINARY_DIR}/foe/simulation/imgui/export.h) 8 | 9 | target_sources( 10 | foe_simulation_imgui 11 | PUBLIC FILE_SET 12 | HEADERS 13 | BASE_DIRS 14 | ${CMAKE_CURRENT_BINARY_DIR} 15 | ${CMAKE_CURRENT_SOURCE_DIR}/ 16 | FILES 17 | ${CMAKE_CURRENT_BINARY_DIR}/foe/simulation/imgui/export.h 18 | foe/simulation/imgui/group_data.hpp 19 | foe/simulation/imgui/registrar.hpp 20 | foe/simulation/imgui/result.h) 21 | -------------------------------------------------------------------------------- /libs/foe_simulation/libs/imgui/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_simulation_imgui PRIVATE group_data.cpp registrar.cpp 6 | result.c) 7 | -------------------------------------------------------------------------------- /libs/foe_simulation/libs/imgui/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline foeResultSet to_foeResult(foeSimulationImGuiResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foeSimulationImGuiResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_simulation/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022-2023 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_simulation 7 | PRIVATE group_data.cpp 8 | log.cpp 9 | resource_create_info_history.cpp 10 | resource_create_info_pool.cpp 11 | result.c 12 | simulation.cpp 13 | struct.cpp) 14 | -------------------------------------------------------------------------------- /libs/foe_simulation/src/log.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "log.hpp" 6 | 7 | FOE_DEFINE_LOG_CATEGORY(foeSimulation, FOE_LOG_LEVEL_ALL) -------------------------------------------------------------------------------- /libs/foe_simulation/src/log.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | FOE_DECLARE_LOG_CATEGORY(foeSimulation) -------------------------------------------------------------------------------- /libs/foe_simulation/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline foeResultSet to_foeResult(foeSimulationResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foeSimulationResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_simulation/test/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include -------------------------------------------------------------------------------- /libs/foe_wsi/foe_wsi-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_wsi.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_wsi/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_wsi 7 | PUBLIC FILE_SET 8 | HEADERS 9 | BASE_DIRS 10 | ${CMAKE_CURRENT_SOURCE_DIR}/ 11 | FILES 12 | foe/wsi/keyboard.hpp 13 | foe/wsi/mouse.hpp 14 | foe/wsi/result.h 15 | foe/wsi/vulkan.h 16 | foe/wsi/window.h) 17 | -------------------------------------------------------------------------------- /libs/foe_wsi/libs/imgui/foe_wsi_imgui-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_wsi_imgui.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_wsi/libs/imgui/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header( 6 | foe_wsi_imgui EXPORT_MACRO_NAME FOE_WSI_IMGUI_EXPORT EXPORT_FILE_NAME 7 | ${CMAKE_CURRENT_BINARY_DIR}/foe/wsi/imgui/export.h) 8 | 9 | target_sources( 10 | foe_wsi_imgui 11 | PUBLIC FILE_SET 12 | HEADERS 13 | BASE_DIRS 14 | ${CMAKE_CURRENT_SOURCE_DIR}/ 15 | ${CMAKE_CURRENT_BINARY_DIR} 16 | FILES 17 | ${CMAKE_CURRENT_BINARY_DIR}/foe/wsi/imgui/export.h 18 | foe/wsi/imgui/window.hpp) 19 | -------------------------------------------------------------------------------- /libs/foe_wsi/libs/imgui/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_wsi_imgui PRIVATE window.cpp) 6 | -------------------------------------------------------------------------------- /libs/foe_wsi/libs/loader/foe_wsi_loader-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_wsi_loader.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_wsi/libs/loader/include/foe/wsi/loader.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_WSI_LOADER_HPP 6 | #define FOE_WSI_LOADER_HPP 7 | 8 | #include 9 | 10 | #include 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | FOE_WSI_EXPORT 17 | bool foeWsiLoadedImplementation(); 18 | 19 | FOE_WSI_EXPORT 20 | bool foeWsiLoadImplementation(char const *pPath); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | 26 | #endif // FOE_WSI_LOADER_HPP -------------------------------------------------------------------------------- /libs/foe_wsi/libs/loader/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_wsi_loader PRIVATE loader.cpp) 6 | -------------------------------------------------------------------------------- /libs/foe_wsi/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | # Setup 6 | find_package(Catch2 3 REQUIRED) 7 | 8 | # Declaration 9 | add_test(NAME FoE-WSI-Test COMMAND test_foe_wsi) 10 | add_executable(test_foe_wsi keyboard.cpp mouse.cpp) 11 | 12 | # Definition 13 | target_link_libraries(test_foe_wsi PRIVATE Catch2::Catch2WithMain foe_wsi) 14 | 15 | target_code_coverage( 16 | test_foe_wsi AUTO ALL EXCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/.* 17 | ${CMAKE_SOURCE_DIR}/external/.*) 18 | -------------------------------------------------------------------------------- /libs/foe_wsi_glfw3/foe_wsi_glfw3-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(CMakeFindDependencyMacro) 6 | find_dependency(glfw3) 7 | 8 | include(${CMAKE_CURRENT_LIST_DIR}/foe_wsi_glfw3.cmake) 9 | -------------------------------------------------------------------------------- /libs/foe_wsi_glfw3/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_wsi_glfw3 PRIVATE keyboard.cpp mouse.cpp result.c 6 | vk_result.c vulkan.cpp window.cpp) 7 | -------------------------------------------------------------------------------- /libs/foe_wsi_glfw3/src/keyboard.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef KEYBOARD_HPP 6 | #define KEYBOARD_HPP 7 | 8 | #include 9 | 10 | void keyboardPreprocessing(foeWsiKeyboard *pKeyboard); 11 | 12 | void keyCallback(foeWsiKeyboard *pKeyboard, int key, int, int action, int); 13 | 14 | void charCallback(foeWsiKeyboard *pKeyboard, unsigned int codepoint); 15 | 16 | #endif // KEYBOARD_HPP -------------------------------------------------------------------------------- /libs/foe_wsi_glfw3/src/mouse.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef MOUSE_HPP 6 | #define MOUSE_HPP 7 | 8 | #include 9 | 10 | void mousePreprocessing(foeWsiMouse *pMouse); 11 | 12 | void cursorPositionCallback(foeWsiMouse *pMouse, double xPos, double yPos); 13 | 14 | void cursorEnterCallback(foeWsiMouse *pMouse, int entered); 15 | 16 | void scrollCallback(foeWsiMouse *pMouse, double xOffset, double yOffset); 17 | 18 | void buttonCallback(foeWsiMouse *pMouse, int button, int action, int); 19 | 20 | #endif // MOUSE_HPP -------------------------------------------------------------------------------- /libs/foe_wsi_glfw3/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline foeResultSet to_foeResult(foeWsiResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foeWsiResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_wsi_glfw3/src/vk_result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef VK_RESULT_H 6 | #define VK_RESULT_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | void VkResultToString(VkResult value, char buffer[FOE_MAX_RESULT_STRING_SIZE]); 16 | 17 | inline foeResultSet vk_to_foeResult(VkResult value) { 18 | foeResultSet result = { 19 | .value = value, 20 | .toString = (PFN_foeResultToString)NULL, 21 | }; 22 | 23 | return result; 24 | } 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif // VK_RESULT_H -------------------------------------------------------------------------------- /libs/foe_wsi_glfw3/src/window.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef WINDOW_HPP 6 | #define WINDOW_HPP 7 | 8 | #include 9 | #include 10 | 11 | #include "keyboard.hpp" 12 | #include "mouse.hpp" 13 | 14 | #include 15 | 16 | struct foeWsiWindowGLFW { 17 | GLFWwindow *pWindow = nullptr; 18 | std::string title; 19 | bool resized; 20 | 21 | foeWsiMouse mouse; 22 | foeWsiKeyboard keyboard; 23 | }; 24 | 25 | FOE_DEFINE_HANDLE_CASTS(window, foeWsiWindowGLFW, foeWsiWindow) 26 | 27 | #endif // WINDOW_HPP -------------------------------------------------------------------------------- /libs/foe_wsi_glfw3/test/vulkan.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave - gcave@stablecoder.ca 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include 7 | 8 | TEST_CASE("WSI-GLFW - Vulkan Extensions") { 9 | uint32_t count{0}; 10 | char const **ppExtensionNames{nullptr}; 11 | CHECK(foeWsiWindowGetVulkanExtensions(&count, &ppExtensionNames).value == FOE_SUCCESS); 12 | 13 | CHECK(count > 0); 14 | CHECK(ppExtensionNames != nullptr); 15 | } -------------------------------------------------------------------------------- /libs/foe_xr/foe_xr-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_xr.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_xr/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_xr 7 | PUBLIC FILE_SET 8 | HEADERS 9 | BASE_DIRS 10 | ${CMAKE_CURRENT_SOURCE_DIR}/ 11 | FILES 12 | foe/xr/runtime.h 13 | foe/xr/session.h) 14 | -------------------------------------------------------------------------------- /libs/foe_xr/include/foe/xr/session.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_XR_SESSION_H 6 | #define FOE_XR_SESSION_H 7 | 8 | #include 9 | 10 | #ifdef FOE_XR_SUPPORT 11 | #include 12 | #endif // FOE_XR_SUPPORT 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | FOE_DEFINE_HANDLE(foeXrSession) 19 | 20 | #ifdef FOE_XR_SUPPORT 21 | FOE_XR_EXPORT 22 | void foeXrDestroySession(foeXrSession session); 23 | #endif // FOE_XR_SUPPORT 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | 29 | #endif // FOE_XR_SESSION_H -------------------------------------------------------------------------------- /libs/foe_xr_openxr/foe_xr_openxr-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(CMakeFindDependencyMacro) 6 | 7 | find_dependency(glm) 8 | find_dependency(OpenXR) 9 | 10 | include(${CMAKE_CURRENT_LIST_DIR}/foe_xr_openxr.cmake) 11 | -------------------------------------------------------------------------------- /libs/foe_xr_openxr/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header( 6 | foe_xr_openxr EXPORT_MACRO_NAME FOE_XR_EXPORT EXPORT_FILE_NAME 7 | ${CMAKE_CURRENT_BINARY_DIR}/foe/xr/export.h) 8 | 9 | target_sources( 10 | foe_xr_openxr 11 | PUBLIC FILE_SET 12 | HEADERS 13 | BASE_DIRS 14 | ${CMAKE_CURRENT_BINARY_DIR} 15 | ${CMAKE_CURRENT_SOURCE_DIR}/ 16 | FILES 17 | ${CMAKE_CURRENT_BINARY_DIR}/foe/xr/export.h 18 | foe/xr/openxr/camera_math.hpp 19 | foe/xr/openxr/result.h 20 | foe/xr/openxr/runtime.h 21 | foe/xr/openxr/session.h) 22 | -------------------------------------------------------------------------------- /libs/foe_xr_openxr/include/foe/xr/openxr/camera_math.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_XR_OPENXR_CAMERA_HPP 6 | #define FOE_XR_OPENXR_CAMERA_HPP 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | FOE_XR_EXPORT 13 | glm::mat4 foeOpenXrProjectionMatrix(XrFovf const &fieldOfView, float nearZ, float farZ); 14 | 15 | FOE_XR_EXPORT 16 | glm::quat foeOpenXrPoseOrientation(XrPosef const &pose); 17 | 18 | FOE_XR_EXPORT 19 | glm::vec3 foeOpenXrPosePosition(XrPosef const &pose); 20 | 21 | #endif // FOE_XR_OPENXR_CAMERA_HPP -------------------------------------------------------------------------------- /libs/foe_xr_openxr/include/foe/xr/openxr/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_XR_OPENXR_RESULT_H 6 | #define FOE_XR_OPENXR_RESULT_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | typedef enum foeOpenXrResult { 16 | FOE_OPENXR_SUCCESS = 0, 17 | FOE_OPENXR_INCOMPLETE = 1000012001, 18 | FOE_OPENXR_ERROR_OUT_OF_MEMORY = -1000012001, 19 | } foeOpenXrResult; 20 | 21 | FOE_XR_EXPORT 22 | void foeOpenXrResultToString(foeOpenXrResult value, char buffer[FOE_MAX_RESULT_STRING_SIZE]); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | 28 | #endif // FOE_XR_OPENXR_RESULT_H -------------------------------------------------------------------------------- /libs/foe_xr_openxr/libs/vulkan/foe_xr_openxr_vk-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(${CMAKE_CURRENT_LIST_DIR}/foe_xr_openxr_vk.cmake) 6 | -------------------------------------------------------------------------------- /libs/foe_xr_openxr/libs/vulkan/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header( 6 | foe_xr_openxr_vk EXPORT_MACRO_NAME FOE_OPENXR_VK_EXPORT EXPORT_FILE_NAME 7 | ${CMAKE_CURRENT_BINARY_DIR}/foe/xr/openxr/vk/export.h) 8 | 9 | target_sources( 10 | foe_xr_openxr_vk 11 | PUBLIC FILE_SET 12 | HEADERS 13 | BASE_DIRS 14 | ${CMAKE_CURRENT_BINARY_DIR} 15 | ${CMAKE_CURRENT_SOURCE_DIR}/ 16 | FILES 17 | ${CMAKE_CURRENT_BINARY_DIR}/foe/xr/openxr/vk/export.h 18 | foe/xr/openxr/vk/render_graph_jobs_swapchain.hpp 19 | foe/xr/openxr/vk/result.h 20 | foe/xr/openxr/vk/vulkan.h) 21 | -------------------------------------------------------------------------------- /libs/foe_xr_openxr/libs/vulkan/include/foe/xr/openxr/vk/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_XR_OPENXR_VK_RESULT_H 6 | #define FOE_XR_OPENXR_VK_RESULT_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | typedef enum foeOpenXrVkResult { 16 | FOE_OPENXR_VK_SUCCESS = 0, 17 | FOE_OPENXR_VK_ERROR_OUT_OF_MEMORY = -1000013001, 18 | } foeOpenXrVkResult; 19 | 20 | FOE_XR_EXPORT 21 | void foeOpenXrVkResultToString(foeOpenXrVkResult value, char buffer[FOE_MAX_RESULT_STRING_SIZE]); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // FOE_XR_OPENXR_VK_RESULT_H -------------------------------------------------------------------------------- /libs/foe_xr_openxr/libs/vulkan/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_xr_openxr_vk PRIVATE log.cpp render_graph_jobs_swapchain.cpp result.c 7 | vk_result.c vulkan.cpp xr_result.c) 8 | -------------------------------------------------------------------------------- /libs/foe_xr_openxr/libs/vulkan/src/log.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "log.hpp" 6 | 7 | FOE_DEFINE_LOG_CATEGORY(foeOpenXrVk, FOE_LOG_LEVEL_ALL) -------------------------------------------------------------------------------- /libs/foe_xr_openxr/libs/vulkan/src/log.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef LOG_HPP 6 | #define LOG_HPP 7 | 8 | #include 9 | 10 | FOE_DECLARE_LOG_CATEGORY(foeOpenXrVk) 11 | 12 | #endif // LOG_HPP -------------------------------------------------------------------------------- /libs/foe_xr_openxr/libs/vulkan/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline foeResultSet to_foeResult(foeOpenXrVkResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foeOpenXrVkResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_xr_openxr/libs/vulkan/src/vk_result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef VK_RESULT_H 6 | #define VK_RESULT_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | void VkResultToString(VkResult value, char buffer[FOE_MAX_RESULT_STRING_SIZE]); 16 | 17 | inline foeResultSet vk_to_foeResult(VkResult value) { 18 | foeResultSet result = { 19 | .value = value, 20 | .toString = (PFN_foeResultToString)NULL, 21 | }; 22 | 23 | return result; 24 | } 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif // VK_RESULT_H -------------------------------------------------------------------------------- /libs/foe_xr_openxr/libs/vulkan/src/xr_result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef XR_RESULT_H 6 | #define XR_RESULT_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | void XrResultToString(XrResult value, char buffer[FOE_MAX_RESULT_STRING_SIZE]); 16 | 17 | inline foeResultSet xr_to_foeResult(XrResult value) { 18 | foeResultSet result = { 19 | .value = value, 20 | .toString = (PFN_foeResultToString)XrResultToString, 21 | }; 22 | 23 | return result; 24 | } 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif // XR_RESULT_H -------------------------------------------------------------------------------- /libs/foe_xr_openxr/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_xr_openxr 7 | PRIVATE camera_math.cpp 8 | debug_utils.cpp 9 | log.cpp 10 | result.c 11 | runtime.cpp 12 | session.cpp 13 | xr_result.c) 14 | -------------------------------------------------------------------------------- /libs/foe_xr_openxr/src/debug_utils.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef FOE_XR_DEBUG_UTILS_HPP 6 | #define FOE_XR_DEBUG_UTILS_HPP 7 | 8 | #include 9 | #include 10 | 11 | FOE_XR_EXPORT 12 | XrResult foeOpenXrCreateDebugUtilsMessenger(XrInstance instance, 13 | XrDebugUtilsMessengerEXT *pDebugMessenger); 14 | 15 | FOE_XR_EXPORT 16 | XrResult foeOpenXrDestroyDebugUtilsMessenger(XrInstance instance, 17 | XrDebugUtilsMessengerEXT debugMessenger); 18 | 19 | #endif // FOE_XR_DEBUG_UTILS_HPP -------------------------------------------------------------------------------- /libs/foe_xr_openxr/src/log.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "log.hpp" 6 | 7 | FOE_DEFINE_LOG_CATEGORY(foeOpenXr, FOE_LOG_LEVEL_ALL) -------------------------------------------------------------------------------- /libs/foe_xr_openxr/src/log.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef LOG_HPP 6 | #define LOG_HPP 7 | 8 | #include 9 | 10 | FOE_DECLARE_LOG_CATEGORY(foeOpenXr) 11 | 12 | #endif // LOG_HPP -------------------------------------------------------------------------------- /libs/foe_xr_openxr/src/result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RESULT_H 6 | #define RESULT_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | inline foeResultSet to_foeResult(foeOpenXrResult value) { 15 | foeResultSet result = { 16 | .value = value, 17 | .toString = (PFN_foeResultToString)foeOpenXrResultToString, 18 | }; 19 | 20 | return result; 21 | } 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif 26 | 27 | #endif // RESULT_H -------------------------------------------------------------------------------- /libs/foe_xr_openxr/src/xr_result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef XR_RESULT_H 6 | #define XR_RESULT_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | void XrResultToString(XrResult value, char buffer[FOE_MAX_RESULT_STRING_SIZE]); 16 | 17 | inline foeResultSet xr_to_foeResult(XrResult value) { 18 | foeResultSet result = { 19 | .value = value, 20 | .toString = (PFN_foeResultToString)XrResultToString, 21 | }; 22 | 23 | return result; 24 | } 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif // XR_RESULT_H -------------------------------------------------------------------------------- /libs/foe_xr_openxr/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022-2023 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | # Setup 6 | find_package(Catch2 3 REQUIRED) 7 | 8 | # Declaration 9 | add_test(NAME FoE-OpenXR-Test COMMAND test_foe_openxr) 10 | add_executable(test_foe_openxr) 11 | 12 | # Definition 13 | target_sources(test_foe_openxr PRIVATE c_header_compatibility.c result.cpp) 14 | 15 | target_link_libraries(test_foe_openxr PRIVATE Catch2::Catch2WithMain 16 | foe_xr_openxr) 17 | 18 | target_code_coverage( 19 | test_foe_openxr 20 | AUTO 21 | ALL 22 | OBJECTS 23 | foe_xr_openxr 24 | EXCLUDE 25 | ${CMAKE_CURRENT_SOURCE_DIR}/.* 26 | ${CMAKE_SOURCE_DIR}/external/.*) 27 | -------------------------------------------------------------------------------- /libs/foe_xr_openxr/test/c_header_compatibility.c: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | #include 7 | #include -------------------------------------------------------------------------------- /libs/foe_yaml/foe_yaml-config.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | include(CMakeFindDependencyMacro) 6 | 7 | find_dependency(glm) 8 | find_dependency(yaml-cpp) 9 | 10 | include(${CMAKE_CURRENT_LIST_DIR}/foe_yaml.cmake) 11 | -------------------------------------------------------------------------------- /libs/foe_yaml/include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2025 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | generate_export_header(foe_yaml EXPORT_FILE_NAME 6 | ${CMAKE_CURRENT_BINARY_DIR}/foe/yaml/export.h) 7 | 8 | target_sources( 9 | foe_yaml 10 | PUBLIC FILE_SET 11 | HEADERS 12 | BASE_DIRS 13 | ${CMAKE_CURRENT_BINARY_DIR} 14 | ${CMAKE_CURRENT_SOURCE_DIR}/ 15 | FILES 16 | ${CMAKE_CURRENT_BINARY_DIR}/foe/yaml/export.h 17 | foe/yaml/exception.hpp 18 | foe/yaml/glm_colour_parsing.hpp 19 | foe/yaml/glm.hpp 20 | foe/yaml/pod.hpp) 21 | -------------------------------------------------------------------------------- /libs/foe_yaml/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_yaml PRIVATE exception.cpp glm.cpp pod.cpp) 6 | -------------------------------------------------------------------------------- /libs/foe_yaml/src/exception.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | foeYamlException::foeYamlException(std::string what) : mWhat{what} {} 8 | 9 | foeYamlException::operator std::string() const noexcept { return mWhat; } 10 | 11 | char const *foeYamlException::what() const noexcept { return mWhat.data(); } 12 | 13 | std::string foeYamlException::whatStr() const noexcept { return mWhat; } 14 | -------------------------------------------------------------------------------- /libs/foe_yaml/src/internal_pod_templates.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | #include 8 | 9 | #ifndef INTERNAL_POD_TEMPLATES_HPP 10 | #define INTERNAL_POD_TEMPLATES_HPP 11 | 12 | template 13 | bool yaml_read(std::string const &nodeName, YAML::Node const &node, T &data); 14 | 15 | template 16 | void yaml_write(std::string const &nodeName, T const &data, YAML::Node &node); 17 | 18 | #endif // INTERNAL_POD_TEMPLATES_HPP -------------------------------------------------------------------------------- /src/frame_timer.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "frame_timer.hpp" 6 | 7 | void FrameTimer::newFrame() { 8 | auto currentTime = std::chrono::high_resolution_clock::now(); 9 | mLastFrameTime = 10 | std::chrono::duration_cast(currentTime - mLastFrameStart); 11 | *mCurrentBetweenFrames = mLastFrameTime; 12 | 13 | mLastFrameStart = currentTime; 14 | 15 | ++mCurrentBetweenFrames; 16 | if (mCurrentBetweenFrames == mTimeBetweenFrames.end()) { 17 | mCurrentBetweenFrames = mTimeBetweenFrames.begin(); 18 | } 19 | } -------------------------------------------------------------------------------- /src/imgui/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_bringup_imgui 7 | PRIVATE armature_state.cpp 8 | armature.cpp 9 | bringup_registration.cpp 10 | developer_console.cpp 11 | entity_list.cpp 12 | frame_time_info.cpp 13 | register.cpp 14 | render_state.cpp 15 | resource_list.cpp 16 | save.cpp 17 | termination.cpp) 18 | 19 | if(IMGUI_DEMO) 20 | target_sources(foe_bringup_imgui PRIVATE demo.cpp) 21 | endif() 22 | -------------------------------------------------------------------------------- /src/imgui/armature.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef IMGUI_ARMATURE_HPP 6 | #define IMGUI_ARMATURE_HPP 7 | 8 | struct foeArmature; 9 | struct foeArmatureCreateInfo; 10 | 11 | void imgui_foeArmature(foeArmature const *pResource); 12 | 13 | void imgui_foeArmatureCreateInfo(foeArmatureCreateInfo const *pCreateInfo); 14 | 15 | #endif // IMGUI_ARMATURE_HPP -------------------------------------------------------------------------------- /src/imgui/armature_state.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "armature_state.hpp" 6 | 7 | #include 8 | 9 | #include "../simulation/armature_state.h" 10 | 11 | void imgui_foeArmatureState(foeArmatureState *pArmatureState) { 12 | ImGui::Separator(); 13 | ImGui::Text("foeArmatureState"); 14 | 15 | ImGui::Text("Armature ID: 0x%08x", pArmatureState->armatureID); 16 | 17 | ImGui::Text("Animation ID: 0x%08x", pArmatureState->animationID); 18 | ImGui::Text("Animation TimePoint: %.2f", pArmatureState->time); 19 | } -------------------------------------------------------------------------------- /src/imgui/armature_state.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef IMGUI_ARMATURE_STATE_HPP 6 | #define IMGUI_ARMATURE_STATE_HPP 7 | 8 | struct foeArmatureState; 9 | 10 | void imgui_foeArmatureState(foeArmatureState *pArmatureState); 11 | 12 | #endif // IMGUI_ARMATURE_STATE_HPP -------------------------------------------------------------------------------- /src/imgui/bringup_registration.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef IMGUI_BRINGUP_REGISTRATION_HPP 6 | #define IMGUI_BRINGUP_REGISTRATION_HPP 7 | 8 | #include 9 | 10 | class foeSimulationImGuiRegistrar; 11 | 12 | foeResultSet foeBringupImGuiRegister(foeSimulationImGuiRegistrar *pRegistrar); 13 | 14 | foeResultSet foeBringupImGuiDeregister(foeSimulationImGuiRegistrar *pRegistrar); 15 | 16 | #endif // IMGUI_BRINGUP_REGISTRATION_HPP -------------------------------------------------------------------------------- /src/imgui/demo.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "demo.hpp" 6 | 7 | #include 8 | #include 9 | 10 | bool foeImGuiDemo::registerUI(foeImGuiState *pState) { 11 | return pState->addUI(this, nullptr, foeImGuiDemo::renderCustomUI, nullptr, 0); 12 | } 13 | 14 | void foeImGuiDemo::deregisterUI(foeImGuiState *pState) { 15 | pState->removeUI(this, nullptr, foeImGuiDemo::renderCustomUI, nullptr, 0); 16 | } 17 | 18 | void foeImGuiDemo::renderCustomUI(ImGuiContext *pImGuiContext, void *pUserData) { 19 | ImGui::ShowDemoWindow(); 20 | } -------------------------------------------------------------------------------- /src/imgui/demo.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef IMGUI_DEMO_HPP 6 | #define IMGUI_DEMO_HPP 7 | 8 | struct ImGuiContext; 9 | class foeImGuiState; 10 | 11 | class foeImGuiDemo { 12 | public: 13 | bool registerUI(foeImGuiState *pState); 14 | void deregisterUI(foeImGuiState *pState); 15 | 16 | private: 17 | static void renderCustomUI(ImGuiContext *pImGuiContext, void *pUserData); 18 | }; 19 | 20 | #endif // IMGUI_DEMO_HPP -------------------------------------------------------------------------------- /src/imgui/register.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef IMGUI_REGISTER_ELEMENTS_HPP 6 | #define IMGUI_REGISTER_ELEMENTS_HPP 7 | 8 | #include 9 | 10 | class foeSimulationImGuiRegistrar; 11 | 12 | foeResultSet registerImGui(foeSimulationImGuiRegistrar *pRegistrar) noexcept; 13 | 14 | void deregisterImGui(foeSimulationImGuiRegistrar *pRegistrar) noexcept; 15 | 16 | #endif // IMGUI_REGISTER_ELEMENTS_HPP -------------------------------------------------------------------------------- /src/imgui/render_state.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "render_state.hpp" 6 | 7 | #include 8 | 9 | #include "../simulation/render_state.h" 10 | 11 | void imgui_foeRenderState(foeRenderState *pComponent) { 12 | ImGui::Separator(); 13 | ImGui::Text("foeRenderState"); 14 | 15 | ImGui::Text("Vertex Descriptor: %08x", pComponent->vertexDescriptor); 16 | 17 | ImGui::Text("Boned Vertex Descriptor: %08x", pComponent->bonedVertexDescriptor); 18 | 19 | ImGui::Text("Material: %08x", pComponent->material); 20 | 21 | ImGui::Text("Mesh: %08x", pComponent->mesh); 22 | } -------------------------------------------------------------------------------- /src/imgui/render_state.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef IMGUI_RENDER_STATE_HPP 6 | #define IMGUI_RENDER_STATE_HPP 7 | 8 | struct foeRenderState; 9 | 10 | void imgui_foeRenderState(foeRenderState *pComponent); 11 | 12 | #endif // IMGUI_RENDER_STATE_HPP -------------------------------------------------------------------------------- /src/imgui/termination.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef IMGUI_TERMINATION_HPP 6 | #define IMGUI_TERMINATION_HPP 7 | 8 | class foeImGuiState; 9 | struct ImGuiContext; 10 | 11 | class foeImGuiTermination { 12 | public: 13 | bool terminationRequested() const noexcept; 14 | 15 | bool registerUI(foeImGuiState *pState); 16 | void deregisterUI(foeImGuiState *pState); 17 | 18 | private: 19 | static bool renderMenuElements(ImGuiContext *pImGuiContext, void *pUserData, char const *pMenu); 20 | 21 | void fileMainMenu(); 22 | 23 | bool mTerminate{false}; 24 | }; 25 | 26 | #endif // IMGUI_TERMINATION_HPP -------------------------------------------------------------------------------- /src/log.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "log.hpp" 6 | 7 | FOE_DEFINE_LOG_CATEGORY(foeBringup, FOE_LOG_LEVEL_ALL) -------------------------------------------------------------------------------- /src/log.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include 6 | 7 | FOE_DECLARE_LOG_CATEGORY(foeBringup) -------------------------------------------------------------------------------- /src/logging.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "logging.hpp" 6 | 7 | #include 8 | 9 | #include 10 | 11 | namespace { 12 | 13 | void log(void *, char const *pCategoryName, foeLogLevel level, char const *pMessage) { 14 | std::cout << foeLogLevel_to_string(level) << " : " << pCategoryName << " : " << pMessage 15 | << "\n"; 16 | } 17 | 18 | void exception(void *) { std::cout << std::flush; } 19 | 20 | } // namespace 21 | 22 | void initializeLogging() { foeLogRegisterSink(nullptr, log, exception); } -------------------------------------------------------------------------------- /src/logging.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef LOGGING_HPP 6 | #define LOGGING_HPP 7 | 8 | void initializeLogging(); 9 | 10 | #endif // LOGGING_HPP -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2020 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "application.hpp" 6 | 7 | int main(int argc, char **argv) { 8 | Application app; 9 | 10 | auto [continueRun, retVal] = app.initialize(argc, argv); 11 | if (continueRun) { 12 | retVal = app.mainloop(); 13 | } 14 | app.deinitialize(); 15 | 16 | return retVal; 17 | } -------------------------------------------------------------------------------- /src/register_basic_functionality.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef REGISTER_BASIC_FUNCTIONALITY_H 6 | #define REGISTER_BASIC_FUNCTIONALITY_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | foeResultSet registerBasicFunctionality(); 15 | 16 | void deregisterBasicFunctionality(); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif // REGISTER_BASIC_FUNCTIONALITY_H -------------------------------------------------------------------------------- /src/simulation/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022-2023 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_bringup_shared 7 | PRIVATE ../log.cpp 8 | ../result.c 9 | ../vk_result.c 10 | animated_bone_state.cpp 11 | animated_bone_system.cpp 12 | armature_loader.cpp 13 | binary.cpp 14 | cleanup.c 15 | compare.c 16 | registration.cpp 17 | render_system_armature.cpp 18 | render_system_position.cpp 19 | render_system.cpp) 20 | 21 | add_subdirectory(binary) 22 | add_subdirectory(yaml) 23 | -------------------------------------------------------------------------------- /src/simulation/animated_bone_state.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #include "animated_bone_state.hpp" 6 | 7 | void cleanup_foeAnimatedBoneState(foeAnimatedBoneState const *pData) { 8 | if (pData->armature) { 9 | foeResourceDecrementUseCount(pData->armature); 10 | foeResourceDecrementRefCount(pData->armature); 11 | } 12 | 13 | free(pData->pBones); 14 | } -------------------------------------------------------------------------------- /src/simulation/animated_bone_state.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef ANIMATED_BONE_STATE_HPP 6 | #define ANIMATED_BONE_STATE_HPP 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #include "type_defs.h" 13 | 14 | typedef foeEcsComponentPool foeAnimatedBoneStatePool; 15 | 16 | struct foeAnimatedBoneState { 17 | foeResource armature; 18 | 19 | uint32_t boneCount{0}; 20 | glm::mat4 *pBones{nullptr}; 21 | }; 22 | 23 | void cleanup_foeAnimatedBoneState(foeAnimatedBoneState const *pData); 24 | 25 | #endif // ANIMATED_BONE_STATE_HPP -------------------------------------------------------------------------------- /src/simulation/animated_bone_state_pool.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef ANIMATED_BONE_STATE_POOL_H 6 | #define ANIMATED_BONE_STATE_POOL_H 7 | 8 | #include 9 | 10 | #include "type_defs.h" 11 | 12 | typedef foeEcsComponentPool foeAnimatedBoneStatePool; 13 | 14 | #endif // ANIMATED_BONE_STATE_POOL_H -------------------------------------------------------------------------------- /src/simulation/armature.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef ARMATURE_HPP 6 | #define ARMATURE_HPP 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | struct foeArmature { 13 | foeResourceType rType; 14 | void *pNext; 15 | std::vector armature; 16 | std::vector animations; 17 | }; 18 | 19 | #endif // ARMATURE_HPP -------------------------------------------------------------------------------- /src/simulation/armature_state.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef ARMATURE_STATE_H 6 | #define ARMATURE_STATE_H 7 | 8 | #include 9 | #include 10 | 11 | #include "type_defs.h" 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | typedef foeEcsComponentPool foeArmatureStatePool; 18 | 19 | struct foeArmatureState { 20 | // Armature information 21 | foeId armatureID{FOE_INVALID_ID}; 22 | // Animation info 23 | uint32_t animationID{UINT32_MAX}; 24 | float time{0.f}; 25 | }; 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif // ARMATURE_STATE_H -------------------------------------------------------------------------------- /src/simulation/armature_state_pool.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef ARMATURE_STATE_POOL_H 6 | #define ARMATURE_STATE_POOL_H 7 | 8 | #include 9 | 10 | #include "type_defs.h" 11 | 12 | typedef foeEcsComponentPool foeArmatureStatePool; 13 | 14 | #endif // ARMATURE_STATE_POOL_H -------------------------------------------------------------------------------- /src/simulation/binary/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_bringup_binary 7 | PRIVATE armature_create_info.c 8 | armature_create_info.cpp 9 | armature_state.cpp 10 | export_registration.c 11 | import_registration.c 12 | render_state.cpp 13 | result.c) 14 | 15 | target_link_libraries(foe_bringup_binary PRIVATE foe_model foe_position) 16 | -------------------------------------------------------------------------------- /src/simulation/binary/export_registration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef SIMULATION_BINARY_EXPORT_REGISTRATION_H 6 | #define SIMULATION_BINARY_EXPORT_REGISTRATION_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | foeResultSet foeBringupBinaryRegisterExporters(); 15 | 16 | void foeBringupBinaryDeregisterExporters(); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif // SIMULATION_BINARY_EXPORT_REGISTRATION_H -------------------------------------------------------------------------------- /src/simulation/binary/import_registration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef SIMULATION_BINARY_IMPORT_REGISTRATION_H 6 | #define SIMULATION_BINARY_IMPORT_REGISTRATION_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | foeResultSet foeBringupBinaryRegisterImporters(); 15 | 16 | void foeBringupBinaryDeregisterImporters(); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif // SIMULATION_BINARY_IMPORT_REGISTRATION_H -------------------------------------------------------------------------------- /src/simulation/cleanup.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef BRINGUP_CLEANUP_H 6 | #define BRINGUP_CLEANUP_H 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | typedef struct AnimationImportInfo AnimationImportInfo; 13 | typedef struct foeArmatureCreateInfo foeArmatureCreateInfo; 14 | 15 | void cleanup_AnimationImportInfo(AnimationImportInfo *pData); 16 | void cleanup_foeArmatureCreateInfo(foeArmatureCreateInfo *pData); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif // BRINGUP_CLEANUP_H 23 | -------------------------------------------------------------------------------- /src/simulation/registration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef BRINGUP_REGISTRATION_H 6 | #define BRINGUP_REGISTRATION_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | foeResultSet foeBringupRegisterFunctionality(); 15 | 16 | void foeBringupDeregisterFunctionality(); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif // BRINGUP_REGISTRATION_H -------------------------------------------------------------------------------- /src/simulation/render_state.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RENDER_STATE_H 6 | #define RENDER_STATE_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | struct foeRenderState { 15 | foeId vertexDescriptor; 16 | foeId bonedVertexDescriptor; 17 | foeId material; 18 | foeId mesh; 19 | }; 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | #endif // RENDER_STATE_H -------------------------------------------------------------------------------- /src/simulation/render_state_pool.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2023 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef RENDER_STATE_POOL_H 6 | #define RENDER_STATE_POOL_H 7 | 8 | #include 9 | 10 | #include "render_state.h" 11 | #include "type_defs.h" 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | typedef foeEcsComponentPool foeRenderStatePool; 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif // RENDER_STATE_POOL_H -------------------------------------------------------------------------------- /src/simulation/yaml/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources( 6 | foe_bringup_yaml PRIVATE armature.cpp export_registration.cpp 7 | import_registration.cpp result.c structs.cpp) 8 | 9 | target_link_libraries(foe_bringup_yaml PRIVATE foe_model foe_position) 10 | -------------------------------------------------------------------------------- /src/simulation/yaml/armature.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef YAML_ARMATURE_HPP 6 | #define YAML_ARMATURE_HPP 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | struct foeArmatureCreateInfo; 13 | 14 | char const *yaml_armature_key(); 15 | 16 | void yaml_read_armature(YAML::Node const &node, 17 | foeEcsGroupTranslator groupTranslator, 18 | foeResourceCreateInfo *pCreateInfo); 19 | 20 | auto yaml_write_armature(foeArmatureCreateInfo const &data) -> YAML::Node; 21 | 22 | #endif // YAML_ARMATURE_HPP -------------------------------------------------------------------------------- /src/simulation/yaml/export_registration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef SIMULATION_YAML_EXPORT_REGISTRATION_H 6 | #define SIMULATION_YAML_EXPORT_REGISTRATION_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | foeResultSet foeBringupYamlRegisterExporters(); 15 | 16 | void foeBringupYamlDeregisterExporters(); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif // SIMULATION_YAML_EXPORT_REGISTRATION_H -------------------------------------------------------------------------------- /src/simulation/yaml/import_registration.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef SIMULATION_YAML_IMPORT_REGISTRATION_H 6 | #define SIMULATION_YAML_IMPORT_REGISTRATION_H 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | foeResultSet foeBringupYamlRegisterImporters(); 15 | 16 | void foeBringupYamlDeregisterImporters(); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif // SIMULATION_YAML_IMPORT_REGISTRATION_H -------------------------------------------------------------------------------- /src/state_import/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2022 George Cave. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | target_sources(foe_bringup_lib PRIVATE import_state.cpp result.c) 6 | -------------------------------------------------------------------------------- /src/state_import/import_state.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2021-2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef IMPORT_STATE_HPP 6 | #define IMPORT_STATE_HPP 7 | 8 | #include 9 | 10 | #include 11 | 12 | class foeSearchPaths; 13 | struct foeSimulation; 14 | 15 | /// Imports data set and its dependencies 16 | foeResultSet importState(std::string_view topLevelDataSet, 17 | foeSearchPaths *pSearchPaths, 18 | foeSimulation **ppSimulationSet); 19 | 20 | #endif // IMPORT_STATE_HPP -------------------------------------------------------------------------------- /src/vk_result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef VK_RESULT_H 6 | #define VK_RESULT_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | void VkResultToString(VkResult value, char buffer[FOE_MAX_RESULT_STRING_SIZE]); 16 | 17 | inline foeResultSet vk_to_foeResult(VkResult value) { 18 | foeResultSet result = { 19 | .value = value, 20 | .toString = (PFN_foeResultToString)VkResultToString, 21 | }; 22 | 23 | return result; 24 | } 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif // VK_RESULT_H -------------------------------------------------------------------------------- /src/xr_result.h: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2022 George Cave. 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef XR_RESULT_H 6 | #define XR_RESULT_H 7 | 8 | #include 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | void XrResultToString(XrResult value, char buffer[FOE_MAX_RESULT_STRING_SIZE]); 16 | 17 | inline foeResultSet xr_to_foeResult(XrResult value) { 18 | foeResultSet result = { 19 | .value = value, 20 | .toString = (PFN_foeResultToString)XrResultToString, 21 | }; 22 | 23 | return result; 24 | } 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif // XR_RESULT_H --------------------------------------------------------------------------------