├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature_request.md │ └── wiki-update-request.md ├── actions │ └── ibt-workspace-init │ │ └── action.yaml └── workflows │ ├── build-dispatch.yaml │ ├── build-manual.yaml │ ├── build-validate-code.yaml │ ├── cache-create.yaml │ └── discord.yaml ├── .gitignore ├── LICENSE ├── README.md ├── ice.bat ├── ice.sh ├── scenarios.json ├── source ├── asset_compiler.bff ├── code │ ├── core │ │ ├── collections │ │ │ ├── collections.bff │ │ │ ├── collections_tests.bff │ │ │ ├── natvis │ │ │ │ ├── collections.natvis │ │ │ │ └── string.natvis │ │ │ ├── public │ │ │ │ └── ice │ │ │ │ │ ├── container │ │ │ │ │ ├── array.hxx │ │ │ │ │ ├── hashmap.hxx │ │ │ │ │ ├── impl │ │ │ │ │ │ ├── array_impl.inl │ │ │ │ │ │ ├── hashmap_impl.inl │ │ │ │ │ │ ├── linked_queue_impl.inl │ │ │ │ │ │ └── queue_impl.inl │ │ │ │ │ ├── linked_queue.hxx │ │ │ │ │ └── queue.hxx │ │ │ │ │ ├── container_concepts.hxx │ │ │ │ │ ├── container_logic.hxx │ │ │ │ │ ├── container_types.hxx │ │ │ │ │ ├── shard_container.hxx │ │ │ │ │ ├── sort.hxx │ │ │ │ │ ├── span.hxx │ │ │ │ │ ├── string │ │ │ │ │ ├── heap_string.hxx │ │ │ │ │ ├── heap_var_string.hxx │ │ │ │ │ ├── impl │ │ │ │ │ │ ├── heap_string.inl │ │ │ │ │ │ ├── heap_var_string.inl │ │ │ │ │ │ ├── static_string.inl │ │ │ │ │ │ ├── string.inl │ │ │ │ │ │ └── var_string.inl │ │ │ │ │ ├── static_string.hxx │ │ │ │ │ ├── string.hxx │ │ │ │ │ └── var_string.hxx │ │ │ │ │ └── string_types.hxx │ │ │ └── tests │ │ │ │ ├── test_array.cxx │ │ │ │ ├── test_data_memory.cxx │ │ │ │ ├── test_hashmap.cxx │ │ │ │ ├── test_heap_string.cxx │ │ │ │ ├── test_queue.cxx │ │ │ │ ├── test_shard_container.cxx │ │ │ │ ├── test_static_string.cxx │ │ │ │ ├── util_tracking_object.cxx │ │ │ │ └── util_tracking_object.hxx │ │ ├── core │ │ │ ├── core.bff │ │ │ ├── core_tests.bff │ │ │ ├── natvis │ │ │ │ ├── core.natvis │ │ │ │ ├── datetime.natvis │ │ │ │ ├── math.natvis │ │ │ │ └── shard_names.natvis │ │ │ ├── private │ │ │ │ └── clock.cxx │ │ │ ├── public │ │ │ │ └── ice │ │ │ │ │ ├── assert_core.hxx │ │ │ │ │ ├── base.hxx │ │ │ │ │ ├── build │ │ │ │ │ ├── build.hxx │ │ │ │ │ ├── config.hxx │ │ │ │ │ ├── constants.hxx │ │ │ │ │ ├── info.hxx │ │ │ │ │ ├── platform.hxx │ │ │ │ │ ├── validate.hxx │ │ │ │ │ └── warnings.hxx │ │ │ │ │ ├── clock.hxx │ │ │ │ │ ├── clock_types.hxx │ │ │ │ │ ├── concept │ │ │ │ │ ├── enum_bools.hxx │ │ │ │ │ ├── enum_flags.hxx │ │ │ │ │ ├── strong_type_base.hxx │ │ │ │ │ ├── strong_type_integral.hxx │ │ │ │ │ └── strong_type_value.hxx │ │ │ │ │ ├── constants.hxx │ │ │ │ │ ├── error.hxx │ │ │ │ │ ├── error_codes.hxx │ │ │ │ │ ├── hash.hxx │ │ │ │ │ ├── hash │ │ │ │ │ ├── murmur2.hxx │ │ │ │ │ └── murmur3.hxx │ │ │ │ │ ├── os.hxx │ │ │ │ │ ├── os │ │ │ │ │ ├── android.hxx │ │ │ │ │ ├── handle.hxx │ │ │ │ │ ├── unix.hxx │ │ │ │ │ └── windows.hxx │ │ │ │ │ ├── profiler.hxx │ │ │ │ │ ├── shard.hxx │ │ │ │ │ ├── stringid.hxx │ │ │ │ │ ├── types.hxx │ │ │ │ │ ├── types_extended.hxx │ │ │ │ │ ├── utility.hxx │ │ │ │ │ └── workarounds.hxx │ │ │ └── tests │ │ │ │ └── test_hash.cxx │ │ ├── devui │ │ │ ├── devui.bff │ │ │ ├── private │ │ │ │ ├── devui_context.cxx │ │ │ │ ├── devui_imgui.cxx │ │ │ │ ├── devui_module.cxx │ │ │ │ └── devui_widget.cxx │ │ │ └── public │ │ │ │ └── ice │ │ │ │ ├── devui_context.hxx │ │ │ │ ├── devui_frame.hxx │ │ │ │ ├── devui_imgui.hxx │ │ │ │ ├── devui_module.hxx │ │ │ │ ├── devui_types.hxx │ │ │ │ └── devui_widget.hxx │ │ ├── math │ │ │ ├── math.bff │ │ │ ├── math_tests.bff │ │ │ ├── public │ │ │ │ └── ice │ │ │ │ │ ├── color.hxx │ │ │ │ │ ├── math.hxx │ │ │ │ │ └── math │ │ │ │ │ ├── algorithm.hxx │ │ │ │ │ ├── array.hxx │ │ │ │ │ ├── array │ │ │ │ │ ├── array_operations.hxx │ │ │ │ │ └── array_operators.hxx │ │ │ │ │ ├── common.hxx │ │ │ │ │ ├── constants.hxx │ │ │ │ │ ├── decompose.hxx │ │ │ │ │ ├── lookat.hxx │ │ │ │ │ ├── matrix.hxx │ │ │ │ │ ├── matrix │ │ │ │ │ ├── matrix_operations.hxx │ │ │ │ │ └── matrix_operators.hxx │ │ │ │ │ ├── projection.hxx │ │ │ │ │ ├── rotate.hxx │ │ │ │ │ ├── scale.hxx │ │ │ │ │ ├── swizzle.hxx │ │ │ │ │ ├── translate.hxx │ │ │ │ │ ├── types.hxx │ │ │ │ │ ├── vector.hxx │ │ │ │ │ └── vector │ │ │ │ │ ├── vector_operations.hxx │ │ │ │ │ └── vector_operators.hxx │ │ │ └── tests │ │ │ │ └── tests_math_vector.cxx │ │ ├── memsys │ │ │ ├── memsys.bff │ │ │ ├── memsys_tests.bff │ │ │ ├── natvis │ │ │ │ └── memsys.natvis │ │ │ ├── private │ │ │ │ ├── mem.cxx │ │ │ │ ├── mem_allocator.cxx │ │ │ │ ├── mem_allocator_buddy.cxx │ │ │ │ ├── mem_allocator_forward.cxx │ │ │ │ ├── mem_allocator_host.cxx │ │ │ │ ├── mem_allocator_ring.cxx │ │ │ │ └── mem_allocator_snake.cxx │ │ │ ├── public │ │ │ │ └── ice │ │ │ │ │ ├── mem.hxx │ │ │ │ │ ├── mem_align.hxx │ │ │ │ │ ├── mem_allocator.hxx │ │ │ │ │ ├── mem_allocator_buddy.hxx │ │ │ │ │ ├── mem_allocator_forward.hxx │ │ │ │ │ ├── mem_allocator_host.hxx │ │ │ │ │ ├── mem_allocator_null.hxx │ │ │ │ │ ├── mem_allocator_proxy.hxx │ │ │ │ │ ├── mem_allocator_ring.hxx │ │ │ │ │ ├── mem_allocator_snake.hxx │ │ │ │ │ ├── mem_allocator_stack.hxx │ │ │ │ │ ├── mem_arithmetic.hxx │ │ │ │ │ ├── mem_buffer.hxx │ │ │ │ │ ├── mem_data.hxx │ │ │ │ │ ├── mem_info.hxx │ │ │ │ │ ├── mem_initializers.hxx │ │ │ │ │ ├── mem_memory.hxx │ │ │ │ │ ├── mem_size_types.hxx │ │ │ │ │ ├── mem_types.hxx │ │ │ │ │ ├── mem_unique_ptr.hxx │ │ │ │ │ └── mem_utils.hxx │ │ │ └── tests │ │ │ │ ├── test_allocator_forward.cxx │ │ │ │ ├── test_allocator_host.cxx │ │ │ │ ├── test_allocator_proxy.cxx │ │ │ │ ├── test_mem_types.cxx │ │ │ │ ├── test_unique_ptr.cxx │ │ │ │ └── test_utils.hxx │ │ ├── modules │ │ │ ├── modules.bff │ │ │ ├── private │ │ │ │ ├── module.cxx │ │ │ │ ├── module_globals.cxx │ │ │ │ ├── module_globals.hxx │ │ │ │ ├── module_native.cxx │ │ │ │ ├── module_native.hxx │ │ │ │ ├── module_negotiator.cxx │ │ │ │ └── module_register.cxx │ │ │ └── public │ │ │ │ └── ice │ │ │ │ ├── module.hxx │ │ │ │ ├── module_concepts.hxx │ │ │ │ ├── module_info.hxx │ │ │ │ ├── module_negotiator.hxx │ │ │ │ ├── module_query.hxx │ │ │ │ ├── module_register.hxx │ │ │ │ └── module_types.hxx │ │ ├── tasks │ │ │ ├── private │ │ │ │ ├── internal_tasks │ │ │ │ │ ├── task_detached.hxx │ │ │ │ │ ├── task_tracked.hxx │ │ │ │ │ ├── task_tracked_promise.hxx │ │ │ │ │ ├── task_tracked_queue_promise.hxx │ │ │ │ │ ├── task_utils.cxx │ │ │ │ │ └── task_utils.hxx │ │ │ │ ├── sync_manual_events.cxx │ │ │ │ ├── task_checkpoint.cxx │ │ │ │ ├── task_native_thread.cxx │ │ │ │ ├── task_native_thread.hxx │ │ │ │ ├── task_queue.cxx │ │ │ │ ├── task_scoped_container.cxx │ │ │ │ ├── task_thread.cxx │ │ │ │ ├── task_thread_pool.cxx │ │ │ │ ├── task_thread_pool_impl.cxx │ │ │ │ ├── task_thread_pool_impl.hxx │ │ │ │ └── task_utils.cxx │ │ │ ├── public │ │ │ │ └── ice │ │ │ │ │ ├── impl │ │ │ │ │ └── task_utils.inl │ │ │ │ │ ├── sync_manual_events.hxx │ │ │ │ │ ├── task.hxx │ │ │ │ │ ├── task_awaitable.hxx │ │ │ │ │ ├── task_cancelation_token.hxx │ │ │ │ │ ├── task_checkpoint.hxx │ │ │ │ │ ├── task_container.hxx │ │ │ │ │ ├── task_debug_allocator.hxx │ │ │ │ │ ├── task_expected.hxx │ │ │ │ │ ├── task_expected_promise.hxx │ │ │ │ │ ├── task_flags.hxx │ │ │ │ │ ├── task_generator.hxx │ │ │ │ │ ├── task_handle.hxx │ │ │ │ │ ├── task_info.hxx │ │ │ │ │ ├── task_promise.hxx │ │ │ │ │ ├── task_promise_base.hxx │ │ │ │ │ ├── task_queue.hxx │ │ │ │ │ ├── task_scheduler.hxx │ │ │ │ │ ├── task_scoped_container.hxx │ │ │ │ │ ├── task_stage.hxx │ │ │ │ │ ├── task_thread.hxx │ │ │ │ │ ├── task_thread_pool.hxx │ │ │ │ │ ├── task_transaction.hxx │ │ │ │ │ ├── task_types.hxx │ │ │ │ │ └── task_utils.hxx │ │ │ └── tasks.bff │ │ ├── threading │ │ │ ├── public │ │ │ │ └── ice │ │ │ │ │ └── sync_manual_reset_event.hxx │ │ │ └── threading.bff │ │ └── utils │ │ │ ├── private │ │ │ ├── assert.cxx │ │ │ ├── config.cxx │ │ │ ├── config │ │ │ │ ├── config_builder.cxx │ │ │ │ ├── config_builder.hxx │ │ │ │ ├── config_builder_setters.cxx │ │ │ │ ├── config_builder_types.cxx │ │ │ │ ├── config_builder_types.hxx │ │ │ │ ├── config_builder_utils.cxx │ │ │ │ ├── config_builder_utils.hxx │ │ │ │ ├── config_builder_value.cxx │ │ │ │ ├── config_detail.cxx │ │ │ │ ├── config_detail.hxx │ │ │ │ └── config_internal.hxx │ │ │ ├── config_getters.cxx │ │ │ ├── config_json.cxx │ │ │ ├── data_storage.cxx │ │ │ ├── log.cxx │ │ │ ├── log_android.cxx │ │ │ ├── log_android.hxx │ │ │ ├── log_buffer.cxx │ │ │ ├── log_buffer.hxx │ │ │ ├── log_internal.cxx │ │ │ ├── log_internal.hxx │ │ │ ├── log_module.cxx │ │ │ ├── log_sink.cxx │ │ │ ├── log_tag.cxx │ │ │ ├── log_webasm.cxx │ │ │ ├── log_webasm.hxx │ │ │ ├── native_aio.cxx │ │ │ ├── native_aio.hxx │ │ │ ├── native_file.cxx │ │ │ ├── params.cxx │ │ │ ├── path_utils.cxx │ │ │ └── string_utils.cxx │ │ │ ├── public │ │ │ └── ice │ │ │ │ ├── assert.hxx │ │ │ │ ├── concept │ │ │ │ └── named_type.hxx │ │ │ │ ├── config.hxx │ │ │ │ ├── config │ │ │ │ ├── config_builder.hxx │ │ │ │ ├── config_details.hxx │ │ │ │ ├── config_impl.hxx │ │ │ │ ├── config_impl.inl │ │ │ │ └── config_types.hxx │ │ │ │ ├── data_storage.hxx │ │ │ │ ├── expected.hxx │ │ │ │ ├── interfaces.hxx │ │ │ │ ├── log.hxx │ │ │ │ ├── log_formatters.hxx │ │ │ │ ├── log_module.hxx │ │ │ │ ├── log_severity.hxx │ │ │ │ ├── log_sink.hxx │ │ │ │ ├── log_tag.hxx │ │ │ │ ├── native_aio.hxx │ │ │ │ ├── native_file.hxx │ │ │ │ ├── params.hxx │ │ │ │ ├── params_types.hxx │ │ │ │ ├── path_utils.hxx │ │ │ │ ├── shard_payloads.hxx │ │ │ │ └── string_utils.hxx │ │ │ ├── tests │ │ │ └── test_config.cxx │ │ │ ├── utils.bff │ │ │ └── utils_tests.bff │ ├── example │ │ ├── android │ │ │ ├── build.gradle.template.kts │ │ │ ├── settings.gradle.template.kts │ │ │ └── simple │ │ │ │ ├── build.gradle.template.kts │ │ │ │ ├── private │ │ │ │ └── example_android.cxx │ │ │ │ ├── simple.bff │ │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java │ │ │ │ └── net │ │ │ │ │ └── example │ │ │ │ │ └── simple │ │ │ │ │ └── MyApp.java │ │ │ │ └── res │ │ │ │ └── values │ │ │ │ └── strings.xml │ │ └── webasm │ │ │ ├── private │ │ │ └── example_webasm.cxx │ │ │ └── webasm.bff │ ├── framework │ │ └── framework_base │ │ │ ├── framework_base.bff │ │ │ ├── private │ │ │ ├── asset │ │ │ │ ├── asset_types.cxx │ │ │ │ └── tilemap │ │ │ │ │ ├── asset_tilemap.hxx │ │ │ │ │ ├── asset_tilemap_loader.cxx │ │ │ │ │ └── asset_tilemap_oven_tmx.cxx │ │ │ ├── framework_main.cxx │ │ │ ├── framework_module.cxx │ │ │ ├── framework_tilemap.cxx │ │ │ └── traits │ │ │ │ ├── physics │ │ │ │ ├── chipmunk2d.hxx │ │ │ │ ├── devui_chipmunk2d.cxx │ │ │ │ ├── devui_chipmunk2d.hxx │ │ │ │ ├── trait_chipmunk2d.cxx │ │ │ │ └── trait_chipmunk2d.hxx │ │ │ │ ├── render │ │ │ │ ├── trait_render_debug.cxx │ │ │ │ ├── trait_render_debug.hxx │ │ │ │ ├── trait_render_gfx.cxx │ │ │ │ ├── trait_render_gfx.hxx │ │ │ │ ├── trait_render_glyphs.cxx │ │ │ │ ├── trait_render_glyphs.hxx │ │ │ │ ├── trait_render_postprocess.cxx │ │ │ │ ├── trait_render_postprocess.hxx │ │ │ │ ├── trait_render_resource.cxx │ │ │ │ ├── trait_render_resource.hxx │ │ │ │ ├── trait_render_sprites.cxx │ │ │ │ ├── trait_render_sprites.hxx │ │ │ │ ├── trait_render_texture_loader.cxx │ │ │ │ ├── trait_render_texture_loader.hxx │ │ │ │ ├── trait_render_tilemap.cxx │ │ │ │ └── trait_render_tilemap.hxx │ │ │ │ ├── trait_camera.cxx │ │ │ │ ├── trait_camera.hxx │ │ │ │ ├── trait_player_actor.cxx │ │ │ │ ├── trait_player_actor.hxx │ │ │ │ ├── trait_sprite_animator.cxx │ │ │ │ ├── trait_sprite_animator.hxx │ │ │ │ ├── trait_tilemap.cxx │ │ │ │ ├── trait_tilemap.hxx │ │ │ │ └── ui │ │ │ │ ├── game_ui_page.cxx │ │ │ │ ├── game_ui_page.hxx │ │ │ │ ├── game_ui_trait.cxx │ │ │ │ ├── game_ui_trait.hxx │ │ │ │ ├── render_ui_trait.cxx │ │ │ │ └── render_ui_trait.hxx │ │ │ └── public │ │ │ └── ice │ │ │ ├── framework_app.hxx │ │ │ ├── framework_module.hxx │ │ │ ├── game_actor.hxx │ │ │ ├── game_anim.hxx │ │ │ ├── game_camera.hxx │ │ │ ├── game_entity.hxx │ │ │ ├── game_module.hxx │ │ │ ├── game_physics.hxx │ │ │ ├── game_render_traits.hxx │ │ │ ├── game_sprites.hxx │ │ │ ├── game_tilemap.hxx │ │ │ └── game_ui.hxx │ ├── iceshard │ │ ├── engine │ │ │ ├── engine.bff │ │ │ ├── private │ │ │ │ ├── action │ │ │ │ │ ├── action_system.cxx │ │ │ │ │ └── action_trigger.cxx │ │ │ │ ├── ecs │ │ │ │ │ ├── ecs_archetype_index.cxx │ │ │ │ │ ├── ecs_data_block_pool.cxx │ │ │ │ │ ├── ecs_entity_index.cxx │ │ │ │ │ ├── ecs_entity_operations.cxx │ │ │ │ │ ├── ecs_entity_storage.cxx │ │ │ │ │ └── ecs_entity_tracker.cxx │ │ │ │ ├── engine_module.cxx │ │ │ │ ├── engine_state_tracker_default.cxx │ │ │ │ ├── engine_state_tracker_default.hxx │ │ │ │ ├── gfx │ │ │ │ │ ├── gfx_utils.cxx │ │ │ │ │ ├── ice_gfx_graph.cxx │ │ │ │ │ ├── ice_gfx_graph.hxx │ │ │ │ │ ├── ice_gfx_graph_runtime.cxx │ │ │ │ │ ├── ice_gfx_graph_runtime.hxx │ │ │ │ │ ├── ice_gfx_graph_snapshot.hxx │ │ │ │ │ ├── ice_gfx_object_storage.cxx │ │ │ │ │ ├── ice_gfx_object_storage.hxx │ │ │ │ │ └── ice_gfx_stage_registry.cxx │ │ │ │ ├── world_trait.cxx │ │ │ │ ├── world_trait_archive.cxx │ │ │ │ └── world_trait_module.cxx │ │ │ └── public │ │ │ │ └── ice │ │ │ │ ├── action │ │ │ │ ├── action.hxx │ │ │ │ ├── action_system.hxx │ │ │ │ └── action_trigger.hxx │ │ │ │ ├── ecs │ │ │ │ ├── ecs_archetype.hxx │ │ │ │ ├── ecs_archetype_detail.hxx │ │ │ │ ├── ecs_archetype_index.hxx │ │ │ │ ├── ecs_component.hxx │ │ │ │ ├── ecs_concepts.hxx │ │ │ │ ├── ecs_data_block.hxx │ │ │ │ ├── ecs_data_block_pool.hxx │ │ │ │ ├── ecs_entity.hxx │ │ │ │ ├── ecs_entity_index.hxx │ │ │ │ ├── ecs_entity_operations.hxx │ │ │ │ ├── ecs_entity_storage.hxx │ │ │ │ ├── ecs_entity_tracker.hxx │ │ │ │ ├── ecs_query.hxx │ │ │ │ ├── ecs_query_awaitable.hxx │ │ │ │ ├── ecs_query_builder.hxx │ │ │ │ ├── ecs_query_definition.hxx │ │ │ │ ├── ecs_query_details.hxx │ │ │ │ ├── ecs_query_object.hxx │ │ │ │ ├── ecs_query_object_part.hxx │ │ │ │ ├── ecs_query_operations.hxx │ │ │ │ ├── ecs_query_provider.hxx │ │ │ │ ├── ecs_query_storage.hxx │ │ │ │ ├── ecs_query_storage_entry.hxx │ │ │ │ ├── ecs_query_type.hxx │ │ │ │ └── ecs_types.hxx │ │ │ │ ├── engine.hxx │ │ │ │ ├── engine_data_storage.hxx │ │ │ │ ├── engine_devui.hxx │ │ │ │ ├── engine_frame.hxx │ │ │ │ ├── engine_frame_data.hxx │ │ │ │ ├── engine_module.hxx │ │ │ │ ├── engine_params.hxx │ │ │ │ ├── engine_runner.hxx │ │ │ │ ├── engine_service_provider.hxx │ │ │ │ ├── engine_shards.hxx │ │ │ │ ├── engine_state.hxx │ │ │ │ ├── engine_state_definition.hxx │ │ │ │ ├── engine_state_processor.hxx │ │ │ │ ├── engine_state_tracker.hxx │ │ │ │ ├── engine_types.hxx │ │ │ │ ├── engine_types_mappers.hxx │ │ │ │ ├── gfx │ │ │ │ ├── gfx_context.hxx │ │ │ │ ├── gfx_graph.hxx │ │ │ │ ├── gfx_graph_resource.hxx │ │ │ │ ├── gfx_graph_runtime.hxx │ │ │ │ ├── gfx_object.hxx │ │ │ │ ├── gfx_object_storage.hxx │ │ │ │ ├── gfx_queue.hxx │ │ │ │ ├── gfx_runner.hxx │ │ │ │ ├── gfx_shards.hxx │ │ │ │ ├── gfx_stage.hxx │ │ │ │ ├── gfx_stage_registry.hxx │ │ │ │ ├── gfx_types.hxx │ │ │ │ └── gfx_utils.hxx │ │ │ │ └── world │ │ │ │ ├── world.hxx │ │ │ │ ├── world_assembly.hxx │ │ │ │ ├── world_trait.hxx │ │ │ │ ├── world_trait_archive.hxx │ │ │ │ ├── world_trait_context.hxx │ │ │ │ ├── world_trait_descriptor.hxx │ │ │ │ ├── world_trait_details.hxx │ │ │ │ ├── world_trait_module.hxx │ │ │ │ ├── world_trait_types.hxx │ │ │ │ ├── world_types.hxx │ │ │ │ └── world_updater.hxx │ │ └── iceshard │ │ │ ├── iceshard.bff │ │ │ ├── natvis │ │ │ └── iceshard.natvis │ │ │ └── private │ │ │ ├── gfx │ │ │ ├── iceshard_gfx_device.cxx │ │ │ ├── iceshard_gfx_device.hxx │ │ │ ├── iceshard_gfx_queue.cxx │ │ │ ├── iceshard_gfx_queue.hxx │ │ │ ├── iceshard_gfx_queue_group.cxx │ │ │ ├── iceshard_gfx_queue_group.hxx │ │ │ └── traits │ │ │ │ ├── iceshard_gfx_image_storage_trait.cxx │ │ │ │ ├── iceshard_gfx_image_storage_trait.hxx │ │ │ │ ├── iceshard_gfx_shader_storage_trait.cxx │ │ │ │ ├── iceshard_gfx_shader_storage_trait.hxx │ │ │ │ └── iceshard_gfx_traits.cxx │ │ │ ├── iceshard_data_storage.cxx │ │ │ ├── iceshard_data_storage.hxx │ │ │ ├── iceshard_engine.cxx │ │ │ ├── iceshard_engine.hxx │ │ │ ├── iceshard_frame.cxx │ │ │ ├── iceshard_frame.hxx │ │ │ ├── iceshard_gfx_frame.cxx │ │ │ ├── iceshard_gfx_frame.hxx │ │ │ ├── iceshard_gfx_runner.cxx │ │ │ ├── iceshard_gfx_runner.hxx │ │ │ ├── iceshard_runner.cxx │ │ │ ├── iceshard_runner.hxx │ │ │ ├── iceshard_task_executor.cxx │ │ │ ├── iceshard_task_executor.hxx │ │ │ ├── iceshard_trait_context.cxx │ │ │ ├── iceshard_trait_context.hxx │ │ │ ├── iceshard_world.cxx │ │ │ ├── iceshard_world.hxx │ │ │ ├── iceshard_world_context.cxx │ │ │ ├── iceshard_world_context.hxx │ │ │ ├── iceshard_world_devui.cxx │ │ │ ├── iceshard_world_devui.hxx │ │ │ ├── iceshard_world_manager.cxx │ │ │ ├── iceshard_world_manager.hxx │ │ │ ├── iceshard_world_manager_devui.cxx │ │ │ ├── iceshard_world_manager_devui.hxx │ │ │ ├── iceshard_world_tasks_devui.cxx │ │ │ ├── iceshard_world_tasks_devui.hxx │ │ │ ├── iceshard_world_tasks_launcher.cxx │ │ │ └── iceshard_world_tasks_launcher.hxx │ ├── modules │ │ ├── iceshard_pipelines │ │ │ ├── iceshard_pipelines.bff │ │ │ └── private │ │ │ │ ├── asset_font.cxx │ │ │ │ ├── asset_font.hxx │ │ │ │ ├── asset_image.cxx │ │ │ │ ├── asset_image.hxx │ │ │ │ ├── asset_image_external │ │ │ │ └── stb_image.h │ │ │ │ ├── mesh_pipeline │ │ │ │ ├── mesh_loader.cxx │ │ │ │ ├── mesh_loader.hxx │ │ │ │ ├── mesh_oven.cxx │ │ │ │ ├── mesh_oven.hxx │ │ │ │ ├── mesh_pipeline.cxx │ │ │ │ └── mesh_pipeline.hxx │ │ │ │ ├── pipeline_ui │ │ │ │ ├── ip_ui_asset.cxx │ │ │ │ ├── ip_ui_asset.hxx │ │ │ │ ├── ip_ui_oven.cxx │ │ │ │ ├── ip_ui_oven.hxx │ │ │ │ ├── ip_ui_oven_containers.cxx │ │ │ │ ├── ip_ui_oven_containers.hxx │ │ │ │ ├── ip_ui_oven_elements.cxx │ │ │ │ ├── ip_ui_oven_elements.hxx │ │ │ │ ├── ip_ui_oven_page.cxx │ │ │ │ ├── ip_ui_oven_page.hxx │ │ │ │ ├── ip_ui_oven_types.hxx │ │ │ │ ├── ip_ui_oven_utils.cxx │ │ │ │ └── ip_ui_oven_utils.hxx │ │ │ │ └── pipelines_module.cxx │ │ ├── imgui_module │ │ │ ├── imgui_module.bff │ │ │ └── private │ │ │ │ ├── imgui_gfx_stage.cxx │ │ │ │ ├── imgui_gfx_stage.hxx │ │ │ │ ├── imgui_module.cxx │ │ │ │ ├── imgui_system.cxx │ │ │ │ ├── imgui_system.hxx │ │ │ │ ├── imgui_trait.cxx │ │ │ │ ├── imgui_trait.hxx │ │ │ │ └── widgets │ │ │ │ ├── imgui_allocator_tree.cxx │ │ │ │ ├── imgui_allocator_tree.hxx │ │ │ │ ├── imgui_devui_manager.cxx │ │ │ │ ├── imgui_devui_manager.hxx │ │ │ │ ├── imgui_logger.cxx │ │ │ │ └── imgui_logger.hxx │ │ ├── shader_tools │ │ │ ├── private │ │ │ │ ├── shader_tools.cxx │ │ │ │ ├── shader_tools_asl.hxx │ │ │ │ ├── shader_tools_asl_allocator.hxx │ │ │ │ ├── shader_tools_asl_database.hxx │ │ │ │ ├── shader_tools_asl_importer.cxx │ │ │ │ ├── shader_tools_asl_importer.hxx │ │ │ │ ├── shader_tools_asl_patcher.cxx │ │ │ │ ├── shader_tools_asl_patcher.hxx │ │ │ │ ├── shader_tools_asl_script.cxx │ │ │ │ ├── shader_tools_asl_script.hxx │ │ │ │ ├── shader_tools_asl_shader.cxx │ │ │ │ ├── shader_tools_asl_shader.hxx │ │ │ │ ├── shader_tools_asl_utils.cxx │ │ │ │ ├── shader_tools_asl_utils.hxx │ │ │ │ ├── shader_tools_glsl.cxx │ │ │ │ ├── shader_tools_glsl.hxx │ │ │ │ ├── shader_tools_glsl_patcher.cxx │ │ │ │ ├── shader_tools_glsl_patcher.hxx │ │ │ │ ├── shader_tools_wgsl.cxx │ │ │ │ ├── shader_tools_wgsl.hxx │ │ │ │ ├── shader_tools_wgsl_patcher.cxx │ │ │ │ └── shader_tools_wgsl_patcher.hxx │ │ │ ├── public │ │ │ │ └── ice │ │ │ │ │ └── shader_tools.hxx │ │ │ └── shader_tools.bff │ │ ├── vulkan_renderer │ │ │ ├── private │ │ │ │ ├── vk_allocator.cxx │ │ │ │ ├── vk_allocator.hxx │ │ │ │ ├── vk_buffer.cxx │ │ │ │ ├── vk_buffer.hxx │ │ │ │ ├── vk_command_buffer.hxx │ │ │ │ ├── vk_device.cxx │ │ │ │ ├── vk_device.hxx │ │ │ │ ├── vk_driver.cxx │ │ │ │ ├── vk_driver.hxx │ │ │ │ ├── vk_extensions.cxx │ │ │ │ ├── vk_extensions.hxx │ │ │ │ ├── vk_fence.cxx │ │ │ │ ├── vk_fence.hxx │ │ │ │ ├── vk_framebuffer.cxx │ │ │ │ ├── vk_framebuffer.hxx │ │ │ │ ├── vk_image.cxx │ │ │ │ ├── vk_image.hxx │ │ │ │ ├── vk_include.hxx │ │ │ │ ├── vk_memory_allocator.cxx │ │ │ │ ├── vk_memory_allocator.hxx │ │ │ │ ├── vk_module.cxx │ │ │ │ ├── vk_pipeline.cxx │ │ │ │ ├── vk_pipeline.hxx │ │ │ │ ├── vk_pipeline_layout.cxx │ │ │ │ ├── vk_pipeline_layout.hxx │ │ │ │ ├── vk_queue.cxx │ │ │ │ ├── vk_queue.hxx │ │ │ │ ├── vk_render_profiler.hxx │ │ │ │ ├── vk_render_surface.cxx │ │ │ │ ├── vk_render_surface.hxx │ │ │ │ ├── vk_render_target.cxx │ │ │ │ ├── vk_render_target.hxx │ │ │ │ ├── vk_renderpass.cxx │ │ │ │ ├── vk_renderpass.hxx │ │ │ │ ├── vk_resource_allocator.cxx │ │ │ │ ├── vk_resource_allocator.hxx │ │ │ │ ├── vk_resource_set.cxx │ │ │ │ ├── vk_resource_set.hxx │ │ │ │ ├── vk_resource_set_layout.cxx │ │ │ │ ├── vk_resource_set_layout.hxx │ │ │ │ ├── vk_shader_asset.cxx │ │ │ │ ├── vk_shader_asset.hxx │ │ │ │ ├── vk_swapchain.cxx │ │ │ │ ├── vk_swapchain.hxx │ │ │ │ └── vk_utility.hxx │ │ │ └── vulkan_renderer.bff │ │ └── webgpu_renderer │ │ │ ├── private │ │ │ ├── webgpu_buffer.hxx │ │ │ ├── webgpu_command_buffer.hxx │ │ │ ├── webgpu_commands.cxx │ │ │ ├── webgpu_commands.hxx │ │ │ ├── webgpu_device.cxx │ │ │ ├── webgpu_device.hxx │ │ │ ├── webgpu_driver.cxx │ │ │ ├── webgpu_driver.hxx │ │ │ ├── webgpu_fence.hxx │ │ │ ├── webgpu_framebuffer.hxx │ │ │ ├── webgpu_image.hxx │ │ │ ├── webgpu_module.cxx │ │ │ ├── webgpu_pipeline.hxx │ │ │ ├── webgpu_queue.cxx │ │ │ ├── webgpu_queue.hxx │ │ │ ├── webgpu_renderpass.hxx │ │ │ ├── webgpu_resources.hxx │ │ │ ├── webgpu_sampler.hxx │ │ │ ├── webgpu_shader.hxx │ │ │ ├── webgpu_shader_asset.cxx │ │ │ ├── webgpu_shader_asset.hxx │ │ │ ├── webgpu_surface.hxx │ │ │ ├── webgpu_swapchain.cxx │ │ │ ├── webgpu_swapchain.hxx │ │ │ └── webgpu_utils.hxx │ │ │ └── webgpu_renderer.bff │ ├── platforms │ │ ├── application │ │ │ ├── application.bff │ │ │ ├── private │ │ │ │ ├── app_args.cxx │ │ │ │ ├── app_info.cxx │ │ │ │ ├── app_init.cxx │ │ │ │ ├── app_resume.cxx │ │ │ │ ├── app_setup.cxx │ │ │ │ ├── app_shutdown.cxx │ │ │ │ ├── app_suspend.cxx │ │ │ │ └── app_update.cxx │ │ │ └── public │ │ │ │ └── ice │ │ │ │ ├── app.hxx │ │ │ │ └── app_info.hxx │ │ ├── platform │ │ │ ├── platform.bff │ │ │ └── public │ │ │ │ └── ice │ │ │ │ ├── platform.hxx │ │ │ │ ├── platform_core.hxx │ │ │ │ ├── platform_event.hxx │ │ │ │ ├── platform_render_surface.hxx │ │ │ │ ├── platform_storage.hxx │ │ │ │ ├── platform_threads.hxx │ │ │ │ ├── platform_vitals.hxx │ │ │ │ └── platform_window_surface.hxx │ │ ├── platform_android │ │ │ ├── platform_android.bff │ │ │ └── private │ │ │ │ ├── android_app.cxx │ │ │ │ ├── android_app.hxx │ │ │ │ ├── android_app_core.cxx │ │ │ │ ├── android_app_core.hxx │ │ │ │ ├── android_app_info.cxx │ │ │ │ ├── android_input_motion.cxx │ │ │ │ ├── android_input_motion.hxx │ │ │ │ ├── android_main.cxx │ │ │ │ ├── android_platform.cxx │ │ │ │ ├── android_render_surface.cxx │ │ │ │ ├── android_render_surface.hxx │ │ │ │ ├── android_threads.cxx │ │ │ │ └── android_threads.hxx │ │ ├── platform_webasm │ │ │ ├── platform_webasm.bff │ │ │ └── private │ │ │ │ ├── webasm_app.cxx │ │ │ │ ├── webasm_app.hxx │ │ │ │ ├── webasm_core_app.cxx │ │ │ │ ├── webasm_core_app.hxx │ │ │ │ ├── webasm_include.hxx │ │ │ │ ├── webasm_inputs.cxx │ │ │ │ ├── webasm_inputs.hxx │ │ │ │ ├── webasm_main.cxx │ │ │ │ ├── webasm_platform.cxx │ │ │ │ ├── webasm_render_surface.cxx │ │ │ │ ├── webasm_render_surface.hxx │ │ │ │ ├── webasm_threads.cxx │ │ │ │ └── webasm_threads.hxx │ │ └── platform_win32 │ │ │ ├── platform_win32.bff │ │ │ └── private │ │ │ ├── win32_app_info.cxx │ │ │ ├── win32_main.cxx │ │ │ ├── win32_sdl2_platform.cxx │ │ │ ├── win32_sdl2_platform.hxx │ │ │ ├── win32_sdl2_platform_render_surface.cxx │ │ │ ├── win32_sdl2_platform_render_surface.hxx │ │ │ ├── win32_sdl2_utils.cxx │ │ │ ├── win32_sdl2_utils.hxx │ │ │ ├── win32_storage.cxx │ │ │ ├── win32_storage.hxx │ │ │ ├── win32_threads.cxx │ │ │ └── win32_threads.hxx │ ├── projects.bff │ ├── systems │ │ ├── asset_system │ │ │ ├── asset_system.bff │ │ │ ├── natvis │ │ │ │ └── asset_types.natvis │ │ │ ├── private │ │ │ │ ├── asset.cxx │ │ │ │ ├── asset_data.hxx │ │ │ │ ├── asset_entry.hxx │ │ │ │ ├── asset_module.cxx │ │ │ │ ├── asset_request_awaitable.cxx │ │ │ │ ├── asset_request_awaitable.hxx │ │ │ │ ├── asset_shelve.cxx │ │ │ │ ├── asset_shelve.hxx │ │ │ │ ├── asset_shelve_devui.cxx │ │ │ │ ├── asset_shelve_devui.hxx │ │ │ │ ├── asset_storage.cxx │ │ │ │ ├── asset_storage.hxx │ │ │ │ ├── asset_storage_devui.cxx │ │ │ │ ├── asset_storage_devui.hxx │ │ │ │ ├── asset_transaction.hxx │ │ │ │ ├── asset_type_archive.cxx │ │ │ │ └── asset_types_internal.hxx │ │ │ └── public │ │ │ │ └── ice │ │ │ │ ├── asset.hxx │ │ │ │ ├── asset_category.hxx │ │ │ │ ├── asset_category_archive.hxx │ │ │ │ ├── asset_category_details.hxx │ │ │ │ ├── asset_module.hxx │ │ │ │ ├── asset_request.hxx │ │ │ │ ├── asset_storage.hxx │ │ │ │ └── asset_types.hxx │ │ ├── font_system │ │ │ ├── font_system.bff │ │ │ ├── private │ │ │ │ ├── font.cxx │ │ │ │ └── font_utils.cxx │ │ │ └── public │ │ │ │ └── ice │ │ │ │ ├── font.hxx │ │ │ │ └── font_utils.hxx │ │ ├── input_system │ │ │ ├── input_system.bff │ │ │ ├── private │ │ │ │ ├── input_controller.cxx │ │ │ │ ├── input_devices.hxx │ │ │ │ ├── input_keyboard.cxx │ │ │ │ ├── input_mouse.cxx │ │ │ │ ├── input_state_helpers.cxx │ │ │ │ ├── input_state_helpers.hxx │ │ │ │ ├── input_touchscreen.cxx │ │ │ │ └── input_tracker.cxx │ │ │ └── public │ │ │ │ └── ice │ │ │ │ └── input │ │ │ │ ├── device_event.hxx │ │ │ │ ├── device_event_queue.hxx │ │ │ │ ├── device_handle.hxx │ │ │ │ ├── input_controller.hxx │ │ │ │ ├── input_device.hxx │ │ │ │ ├── input_event.hxx │ │ │ │ ├── input_keyboard.hxx │ │ │ │ ├── input_mouse.hxx │ │ │ │ ├── input_touchscreen.hxx │ │ │ │ ├── input_tracker.hxx │ │ │ │ └── input_types.hxx │ │ ├── render_system │ │ │ ├── private │ │ │ │ └── render_module.cxx │ │ │ ├── public │ │ │ │ └── ice │ │ │ │ │ └── render │ │ │ │ │ ├── render_buffer.hxx │ │ │ │ │ ├── render_command_buffer.hxx │ │ │ │ │ ├── render_declarations.hxx │ │ │ │ │ ├── render_device.hxx │ │ │ │ │ ├── render_driver.hxx │ │ │ │ │ ├── render_fence.hxx │ │ │ │ │ ├── render_framebuffer.hxx │ │ │ │ │ ├── render_image.hxx │ │ │ │ │ ├── render_module.hxx │ │ │ │ │ ├── render_pass.hxx │ │ │ │ │ ├── render_pipeline.hxx │ │ │ │ │ ├── render_profiler.hxx │ │ │ │ │ ├── render_queue.hxx │ │ │ │ │ ├── render_resource.hxx │ │ │ │ │ ├── render_shader.hxx │ │ │ │ │ ├── render_surface.hxx │ │ │ │ │ └── render_swapchain.hxx │ │ │ └── render_system.bff │ │ ├── resource_system │ │ │ ├── natvis │ │ │ │ └── resource.natvis │ │ │ ├── private │ │ │ │ ├── resource_aio_request.hxx │ │ │ │ ├── resource_compiler_api.cxx │ │ │ │ ├── resource_dynlib.cxx │ │ │ │ ├── resource_dynlib.hxx │ │ │ │ ├── resource_filesystem.hxx │ │ │ │ ├── resource_filesystem_baked.cxx │ │ │ │ ├── resource_filesystem_baked.hxx │ │ │ │ ├── resource_filesystem_loose.cxx │ │ │ │ ├── resource_filesystem_loose.hxx │ │ │ │ ├── resource_filesystem_traverser.cxx │ │ │ │ ├── resource_filesystem_traverser.hxx │ │ │ │ ├── resource_filesystem_writable.cxx │ │ │ │ ├── resource_filesystem_writable.hxx │ │ │ │ ├── resource_hailstorm_entry.cxx │ │ │ │ ├── resource_hailstorm_entry.hxx │ │ │ │ ├── resource_handle.cxx │ │ │ │ ├── resource_internal.cxx │ │ │ │ ├── resource_internal.hxx │ │ │ │ ├── resource_provider_custom.cxx │ │ │ │ ├── resource_provider_custom.hxx │ │ │ │ ├── resource_provider_dynlib.cxx │ │ │ │ ├── resource_provider_filelist.cxx │ │ │ │ ├── resource_provider_filelist.hxx │ │ │ │ ├── resource_provider_filesystem.cxx │ │ │ │ ├── resource_provider_filesystem.hxx │ │ │ │ ├── resource_provider_filesystem_devui.cxx │ │ │ │ ├── resource_provider_filesystem_devui.hxx │ │ │ │ ├── resource_provider_hailstorm.cxx │ │ │ │ ├── resource_provider_hailstorm.hxx │ │ │ │ ├── resource_provider_hailstorm_devui.cxx │ │ │ │ ├── resource_provider_hailstorm_devui.hxx │ │ │ │ ├── resource_tracker.cxx │ │ │ │ ├── resource_tracker.hxx │ │ │ │ ├── resource_tracker_devui.cxx │ │ │ │ ├── resource_tracker_devui.hxx │ │ │ │ ├── resource_writer_filesystem.cxx │ │ │ │ └── resource_writer_filesystem.hxx │ │ │ ├── public │ │ │ │ └── ice │ │ │ │ │ ├── resource.hxx │ │ │ │ │ ├── resource_compiler.hxx │ │ │ │ │ ├── resource_compiler_api.hxx │ │ │ │ │ ├── resource_flags.hxx │ │ │ │ │ ├── resource_format.hxx │ │ │ │ │ ├── resource_handle.hxx │ │ │ │ │ ├── resource_provider.hxx │ │ │ │ │ ├── resource_status.hxx │ │ │ │ │ ├── resource_tracker.hxx │ │ │ │ │ ├── resource_types.hxx │ │ │ │ │ ├── resource_writer.hxx │ │ │ │ │ └── uri.hxx │ │ │ ├── resource_system.bff │ │ │ ├── resource_system_tests.bff │ │ │ └── tests │ │ │ │ └── test_resource_meta.cxx │ │ └── ui_system │ │ │ ├── private │ │ │ ├── ui_element.cxx │ │ │ └── ui_element_info.cxx │ │ │ ├── public │ │ │ └── ice │ │ │ │ ├── ui.hxx │ │ │ │ ├── ui_action.hxx │ │ │ │ ├── ui_asset.hxx │ │ │ │ ├── ui_button.hxx │ │ │ │ ├── ui_data_ref.hxx │ │ │ │ ├── ui_data_utils.hxx │ │ │ │ ├── ui_element.hxx │ │ │ │ ├── ui_element_draw.hxx │ │ │ │ ├── ui_element_info.hxx │ │ │ │ ├── ui_font.hxx │ │ │ │ ├── ui_label.hxx │ │ │ │ ├── ui_page.hxx │ │ │ │ ├── ui_resource.hxx │ │ │ │ ├── ui_shard.hxx │ │ │ │ ├── ui_style.hxx │ │ │ │ └── ui_types.hxx │ │ │ └── ui_system.bff │ ├── test │ │ ├── private │ │ │ ├── game.cxx │ │ │ ├── game.hxx │ │ │ └── systems │ │ │ │ ├── terrain.cxx │ │ │ │ └── terrain.hxx │ │ └── test.bff │ └── tools │ │ ├── asset_compiler │ │ ├── asset_compiler.bff │ │ └── private │ │ │ ├── asset_compiler_app.cxx │ │ │ ├── asset_compiler_resource_provider.cxx │ │ │ └── asset_compiler_resource_provider.hxx │ │ ├── hsc_packer │ │ ├── hsc_packer.bff │ │ └── private │ │ │ ├── hsc_packer.cxx │ │ │ ├── hsc_packer_aiostream.cxx │ │ │ ├── hsc_packer_aiostream.hxx │ │ │ ├── hsc_packer_app.cxx │ │ │ └── hsc_packer_app.hxx │ │ ├── hsc_reader │ │ ├── hsc_reader.bff │ │ └── private │ │ │ ├── hsc_reader.cxx │ │ │ ├── hsc_reader_app.cxx │ │ │ ├── hsc_reader_app.hxx │ │ │ ├── hsc_reader_funcs.cxx │ │ │ └── hsc_reader_funcs.hxx │ │ └── tool_base │ │ ├── private │ │ ├── tool.cxx │ │ └── tool_app.cxx │ │ ├── public │ │ └── ice │ │ │ ├── tool.hxx │ │ │ └── tool_app.hxx │ │ └── tool_base.bff ├── conanfile.txt ├── conanprofiles.txt ├── configs.bff ├── configs │ ├── .clang-format │ ├── doxyfile │ ├── hscp_shaders.json │ ├── test-renderdoc.cap │ └── uncrustify_code_style.cfg ├── data │ ├── config.json │ ├── config.json.isrm │ ├── mesh │ │ ├── box │ │ │ ├── box.blend │ │ │ ├── box.dae │ │ │ ├── dbox.blend │ │ │ └── dbox.dae │ │ └── test │ │ │ ├── box.msh │ │ │ └── box.msh.isrm │ ├── shaders │ │ ├── arctic │ │ │ └── test.arctic │ │ ├── color │ │ │ ├── blue-frag.glsl │ │ │ ├── blue-frag.wgsl │ │ │ ├── blue-vert.glsl │ │ │ └── blue-vert.wgsl │ │ ├── common.asl │ │ ├── debug │ │ │ ├── debug-frag.glsl │ │ │ ├── debug-vert.glsl │ │ │ ├── font-debug-frag.glsl │ │ │ ├── font-debug-vert.glsl │ │ │ ├── font-frag.glsl │ │ │ ├── font-vert.glsl │ │ │ ├── imgui-frag.asl │ │ │ ├── imgui-vert.asl │ │ │ ├── imgui.asl │ │ │ ├── pp-frag.glsl │ │ │ ├── pp-frag.glsl.isrm │ │ │ ├── pp-vert.glsl │ │ │ ├── pp-vert.glsl.isrm │ │ │ ├── test-frag.glsl │ │ │ ├── test-frag.glsl.isrm │ │ │ ├── test-vert.glsl │ │ │ ├── test-vert.glsl.isrm │ │ │ ├── texture-frag.glsl │ │ │ ├── texture-frag.glsl.isrm │ │ │ ├── texture-vert.glsl │ │ │ └── texture-vert.glsl.isrm │ │ ├── game2d │ │ │ ├── sprite-pix.glsl │ │ │ ├── sprite-vtx.glsl │ │ │ ├── tiled-pix.glsl │ │ │ └── tiled-vtx.glsl │ │ ├── hlsl │ │ │ ├── test-frag.cso │ │ │ ├── test-frag.hlsl │ │ │ ├── test-vert.cso │ │ │ └── test-vert.hlsl │ │ ├── isometric │ │ │ ├── texture-frag.glsl │ │ │ ├── texture-frag.glsl.isrm │ │ │ ├── texture-vert.glsl │ │ │ └── texture-vert.glsl.isrm │ │ ├── shaders.bff │ │ ├── terrain │ │ │ ├── terrain-frag.glsl │ │ │ ├── terrain-hm-frag.glsl │ │ │ ├── terrain-hm-geom.glsl │ │ │ ├── terrain-hm-tes-ctrl.glsl │ │ │ ├── terrain-hm-tes-eval.glsl │ │ │ ├── terrain-hm-vert.glsl │ │ │ └── terrain-vert.glsl │ │ └── ui │ │ │ ├── ui-frag.glsl │ │ │ ├── ui-frag.glsl.isrm │ │ │ ├── ui-vert.glsl │ │ │ └── ui-vert.glsl.isrm │ ├── ui │ │ ├── test.isui │ │ ├── test.isui.isrm │ │ ├── test2.isui │ │ ├── test2.isui.isrm │ │ ├── test3.isui │ │ └── test3.isui.isrm │ ├── 漢字のテスト.json │ └── 漢字のテスト.json.isrm └── fbuild.bff ├── thirdparty ├── LICENSES.txt ├── README.md └── details.json ├── tools ├── codestyle.moon ├── conanfile.txt ├── doxy.moon ├── iceshard.moon ├── natvis.moon ├── run.moon ├── scripts │ └── start.moon └── settings.json └── workspace.moon /.editorconfig: -------------------------------------------------------------------------------- 1 | # Rules in this file were initially inferred by Visual Studio IntelliCode from the D:\Repositories\GitHub\Iceshard\engine codebase based on best match to current usage at 10/08/2021 2 | # You can modify the rules from these initially generated values to suit your own policies 3 | # You can learn more about editorconfig here: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference 4 | 5 | # top-most EditorConfig file 6 | root = true 7 | 8 | [*.{natvis,xml}] 9 | indent_style = space 10 | indent_size = 2 11 | insert_final_newline = true 12 | trim_trailing_whitespace = true 13 | 14 | [*.{c++,cc,cpp,cppm,cxx,h,h++,hh,hpp,hxx,inl,ipp,ixx,tlh,tli}] 15 | indent_style = space 16 | insert_final_newline = true 17 | trim_trailing_whitespace = true 18 | 19 | 20 | # Visual C++ Code Style settings 21 | 22 | cpp_generate_documentation_comments = doxygen_double_slash_exclamation 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: feature 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/wiki-update-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Wiki Update Request 3 | about: Send a quick request to update the Wiki. 4 | title: "[Wiki]" 5 | labels: documentation 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe your question you want have answered** 11 | A clear and concise description of what you were searching an answer for. 12 | Example: "I wanted to know how to create a new World Trait." 13 | 14 | **Provide detailed information** 15 | Provide what topics, related to your question, you want to have better documentation of. 16 | Example: "Adding a world trait to a world." 17 | -------------------------------------------------------------------------------- /.github/actions/ibt-workspace-init/action.yaml: -------------------------------------------------------------------------------- 1 | name: ibt-workspace-init 2 | author: dandielo@iceshard.net 3 | description: Initialization of IBT workspace tools and dependencies. 4 | 5 | inputs: 6 | ibt-android: 7 | description: 'Controls the installation of any required Android packages' 8 | required: false 9 | default: false 10 | ibt-emscripten: 11 | description: 'Controls the installation of any required Emscripten packages' 12 | required: false 13 | default: false 14 | 15 | runs: 16 | using: 'composite' 17 | steps: 18 | - name: Install Conan2 19 | shell: powershell 20 | steps: pip install conan 21 | -------------------------------------------------------------------------------- /.github/workflows/build-manual.yaml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | configuration: 7 | description: Target build configuration 8 | required: true 9 | type: choice 10 | default: Develop 11 | options: 12 | - Debug 13 | - Develop 14 | - Profile 15 | - Release 16 | 17 | jobs: 18 | build: 19 | name: Build Target 20 | uses: ./.github/workflows/build-dispatch.yaml 21 | strategy: 22 | matrix: 23 | project: [all] 24 | pipeline: [x64] 25 | include: 26 | - host: windows-latest 27 | with: 28 | host-platform: ${{ matrix.host }} 29 | target: "${{ matrix.project }}-${{ matrix.pipeline }}-${{ inputs.configuration }}" 30 | -------------------------------------------------------------------------------- /.github/workflows/build-validate-code.yaml: -------------------------------------------------------------------------------- 1 | name: Code Validation 2 | run-name: Code Validation (${{ github.ref_name }}) 3 | 4 | on: 5 | push: 6 | paths: 7 | - 'source/**' 8 | - '!source/data/**' 9 | 10 | jobs: 11 | validate: 12 | name: Validate (${{ matrix.project }}-${{ matrix.pipeline }}-${{ matrix.config }}, ${{ matrix.host }}) 13 | uses: ./.github/workflows/build-dispatch.yaml 14 | strategy: 15 | matrix: 16 | project: [all] 17 | pipeline: [x64] 18 | config: [Debug,Develop,Profile,Release] 19 | include: 20 | - host: windows-latest 21 | with: 22 | host-platform: ${{ matrix.host }} 23 | target: "${{ matrix.project }}-${{ matrix.pipeline }}-${{ matrix.config }}" 24 | -------------------------------------------------------------------------------- /.github/workflows/cache-create.yaml: -------------------------------------------------------------------------------- 1 | name: Cache Creation 2 | run-name: Cache Creation 3 | 4 | on: 5 | push: 6 | paths: 7 | source/tools/conanfile.txt 8 | source/code/conanfile.txt 9 | source/code/conanprofiles.txt 10 | source/code/fbuild.bff 11 | schedule: 12 | - cron: '30 6 * * 1,5' 13 | workflow_dispatch: 14 | 15 | jobs: 16 | create-cache: 17 | strategy: 18 | matrix: 19 | os: [windows-latest,ubuntu-latest] 20 | name: Create Dependencies Cache (Conan2) 21 | runs-on: ${{ matrix.os }} 22 | steps: 23 | - name: Checkout 24 | uses: actions/checkout@v4 25 | 26 | - name: Setup Conan2 27 | uses: iceshard-engine/.github/.github/actions/conan2@main 28 | with: 29 | conan-cache: true 30 | conan-cache-version: 'v1' 31 | conan-config-url: https://github.com/iceshard-engine/conan-config.git 32 | 33 | - name: Setup IBT 34 | uses: iceshard-engine/.github/.github/actions/ibt-wks@main 35 | with: 36 | script_basename: 'ice' 37 | platform-android: false 38 | platform-web: false 39 | workspace-cache: false 40 | -------------------------------------------------------------------------------- /.github/workflows/discord.yaml: -------------------------------------------------------------------------------- 1 | name: Discord notification 2 | 3 | # TODO: We will change this workflow later into a 'workflow_call' allowing us to send various notifications from other workflows easily 4 | # 5 | 6 | on: 7 | push: 8 | branches: '*' 9 | 10 | jobs: 11 | notify_discord_commits_pushed: 12 | name: Notify discord (commits) 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Notify build started 16 | uses: Ilshidur/action-discord@master 17 | env: 18 | DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_YUKI }} 19 | DISCORD_USERNAME: 'Yuki ' 20 | with: 21 | args: | 22 | New commits have been pushed to `{{ EVENT_PAYLOAD.repository.full_name }}`! 23 | {{ EVENT_PAYLOAD.commits.map(e => '- ' + e.message + ' (<' + e.url + '>) <' + e.author.name + '>').join('\n').slice(0, 2000) }} 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Temporary paths to ignore 2 | /.vs/ 3 | /.vscode/ 4 | /build/ 5 | /test_files/ 6 | 7 | # Binary compiled assets 8 | *.isr 9 | 10 | # Local data 11 | /source/data/temp 12 | /source/data/local 13 | /tools/scripts/generate_version.moon 14 | 15 | # Temporary files to ignore 16 | compile_commands.json 17 | *.patch 18 | *.cso 19 | *.sln 20 | *.fdb 21 | *.spv* 22 | *.hsc 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019-2022 Daniel Penkala 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /source/code/core/collections/collections.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'collections' 7 | .Kind = .Kind_HeaderOnly 8 | .Group = 'Core' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/core/collections' 11 | 12 | .Public = 13 | [ 14 | .Uses = { 15 | 'core' 16 | 'memsys' 17 | } 18 | ] 19 | ] 20 | .Projects + .Project 21 | -------------------------------------------------------------------------------- /source/code/core/collections/collections_tests.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'collections_tests' 7 | .Kind = .Kind_ConsoleApp 8 | .Group = 'Tests' 9 | .Requires = { 'Windows' } 10 | .Tags = { 'UnitTests' } 11 | 12 | .BaseDir = '$WorkspaceCodeDir$/core/collections' 13 | 14 | .InputPaths = { 15 | 'tests' 16 | } 17 | .VStudioPaths = .InputPaths 18 | 19 | .Private = 20 | [ 21 | .Uses = { 22 | 'collections' 23 | } 24 | 25 | .Modules = { 26 | 'fmt' 27 | 'catch2' 28 | } 29 | ] 30 | 31 | .UnitTests = 32 | [ 33 | .Enabled = true 34 | ] 35 | ] 36 | .Projects + .Project 37 | -------------------------------------------------------------------------------- /source/code/core/collections/public/ice/container_concepts.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice 8 | { 9 | 10 | template 11 | concept LinkedListNode = requires(Node node) { 12 | { node.next } -> std::convertible_to; 13 | }; 14 | 15 | } // namespace ice 16 | -------------------------------------------------------------------------------- /source/code/core/core/core.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'core' 7 | .Kind = .Kind_StaticLib 8 | .Group = 'Core' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/core/core' 11 | 12 | ; We only profile the tracy module in the 'Profile' configuration. 13 | .TracyProfiler_Profile = 14 | [ 15 | .Requires = { 'Profile' } 16 | .Public = 17 | [ 18 | .Modules = { 19 | 'tracy' 20 | } 21 | ] 22 | ] 23 | .TracyProfiler_Develop = 24 | [ 25 | .Requires = { 'Develop' } 26 | .Public = 27 | [ 28 | .Modules = { 29 | 'tracy' 30 | } 31 | ] 32 | ] 33 | // TODO: Does not compile for WebAssembly 34 | .Rules = { .TracyProfiler_Develop, .TracyProfiler_Profile } 35 | ] 36 | .Projects + .Project 37 | -------------------------------------------------------------------------------- /source/code/core/core/core_tests.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'core_tests' 7 | .Kind = .Kind_ConsoleApp 8 | .Group = 'Tests' 9 | .Requires = { 'Windows' } 10 | .Tags = { 'UnitTests' } 11 | 12 | .BaseDir = '$WorkspaceCodeDir$/core/core' 13 | 14 | .InputPaths = { 15 | 'tests' 16 | } 17 | .VStudioPaths = .InputPaths 18 | 19 | .Private = 20 | [ 21 | .Uses = { 22 | 'core' 23 | } 24 | 25 | .Modules = { 26 | 'catch2' 27 | } 28 | ] 29 | 30 | .UnitTests = 31 | [ 32 | .Enabled = true 33 | ] 34 | ] 35 | .Projects + .Project 36 | -------------------------------------------------------------------------------- /source/code/core/core/public/ice/assert_core.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | #include 8 | #include 9 | #undef assert 10 | 11 | #if ISP_WINDOWS 12 | 13 | #define ICE_ASSERT_CORE(expression) do { if (std::is_constant_evaluated() == false) { \ 14 | (void)( \ 15 | (!!(expression)) || \ 16 | (_wassert(_CRT_WIDE(#expression), _CRT_WIDE(__FILE__), (unsigned)(__LINE__)), 0) \ 17 | ); } } while(false) 18 | 19 | #elif ISP_WEBAPP 20 | 21 | #define ICE_ASSERT_CORE(expression) ((expression) \ 22 | ? (void)0 \ 23 | : __assert_fail(#expression, __FILE__, __LINE__, __PRETTY_FUNCTION__)) 24 | 25 | #else 26 | 27 | #define ICE_ASSERT_CORE(expression) ((expression) \ 28 | ? __assert_no_op \ 29 | : __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, #expression)) 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /source/code/core/core/public/ice/os.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2024, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | #include 9 | -------------------------------------------------------------------------------- /source/code/core/core/public/ice/types_extended.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice 8 | { 9 | 10 | using ucount = ice::u32; 11 | using icount = ice::i32; 12 | 13 | } // namespace ice 14 | -------------------------------------------------------------------------------- /source/code/core/core/public/ice/workarounds.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | 6 | // Kept until finally fixed in next VS Release. 7 | #if 0 8 | //! \brief This macro is required for a bug apprearing in the MSVC compiler when generating optimized code with '/O2'. 9 | //! It affects coroutine functions / methods and seems to mainly occur when using loops in the function body. 10 | //! A workaround for this problem is to separate the logic of such a coroutine into a separate function and mark it as 'noinline' 11 | //! Once the bug is fixed this macro should be removed. 12 | //! 13 | //! GitHub Issue: #108 14 | #define ISATTR_NOINLINE 15 | 16 | #if ISP_WINDOWS 17 | 18 | #undef ISATTR_NOINLINE 19 | #define ISATTR_NOINLINE __declspec(noinline) 20 | 21 | #endif // #if ISP_WINDOWS 22 | #endif 23 | -------------------------------------------------------------------------------- /source/code/core/devui/devui.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'devui' 7 | .Kind = .Kind_StaticLib 8 | .Group = 'Core' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/core/devui' 11 | 12 | .Public = 13 | [ 14 | .Uses = { 15 | 'memsys' 16 | 'collections' 17 | 'utils' 18 | } 19 | 20 | .Modules = { 21 | 'imgui' 22 | } 23 | ] 24 | 25 | .Rule_Win32Editor = 26 | [ 27 | .Name = 'EditorPlugins' 28 | .Requires = { 'Windows' } 29 | .Public = 30 | [ 31 | .Modules = { 32 | 'imguizmo' 33 | } 34 | ] 35 | ] 36 | .Rules = { .Rule_Win32Editor } 37 | ] 38 | .Projects + .Project 39 | -------------------------------------------------------------------------------- /source/code/core/devui/private/devui_module.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace ice 10 | { 11 | 12 | } // namespace ice 13 | -------------------------------------------------------------------------------- /source/code/core/devui/private/devui_widget.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace ice 9 | { 10 | 11 | DevUIWidget::DevUIWidget(ice::DevUIWidgetInfo const& info) noexcept 12 | : info{ info } 13 | { 14 | } 15 | 16 | void DevUIWidget::build_widget(ice::DevUIFrame& frame, ice::DevUIWidgetState& state) noexcept 17 | { 18 | if (frame.begin(info, state)) 19 | { 20 | this->build_menu(); 21 | this->build_content(); 22 | } 23 | frame.end(); 24 | } 25 | 26 | void DevUIWidget::build_menu() noexcept 27 | { 28 | } 29 | 30 | bool DevUIWidget::build_mainmenu(ice::DevUIWidgetState& state) noexcept 31 | { 32 | return true; 33 | } 34 | 35 | } // namespace ice 36 | -------------------------------------------------------------------------------- /source/code/core/devui/public/ice/devui_frame.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice 8 | { 9 | 10 | struct DevUIWidgetState 11 | { 12 | bool active = false; 13 | }; 14 | 15 | class DevUIFrame 16 | { 17 | public: 18 | virtual ~DevUIFrame() noexcept = default; 19 | 20 | virtual void mainmenu(ice::DevUIWidgetInfo const& widget, ice::DevUIWidgetState& state) noexcept = 0; 21 | 22 | virtual bool begin(ice::DevUIWidgetInfo const& widget, ice::DevUIWidgetState& state) noexcept = 0; 23 | virtual void end() noexcept = 0; 24 | }; 25 | 26 | } // namespace ice 27 | -------------------------------------------------------------------------------- /source/code/core/devui/public/ice/devui_types.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice 8 | { 9 | 10 | class DevUIContext; 11 | class DevUIFrame; 12 | class DevUIWidget; 13 | 14 | struct DevUIWidgetInfo; 15 | struct DevUIWidgetState; 16 | struct DevUIContextSetupParams; 17 | 18 | using FnDevUIAlloc = void*(*)(size_t size, void* userdata) noexcept; 19 | using FnDevUIDealloc = void(*)(void* size, void* userdata) noexcept; 20 | 21 | using FnDevUIContextSetupCallback = bool(*)( 22 | ice::StringID_Arg context_name, 23 | ice::DevUIContextSetupParams const& params, 24 | void* userdata 25 | ) noexcept; 26 | 27 | } // namespace ice 28 | -------------------------------------------------------------------------------- /source/code/core/devui/public/ice/devui_widget.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace ice 9 | { 10 | 11 | struct DevUIWidgetInfo 12 | { 13 | ice::String category; 14 | ice::String name; 15 | }; 16 | 17 | class DevUIWidget 18 | { 19 | public: 20 | DevUIWidget(ice::DevUIWidgetInfo const& info) noexcept; 21 | virtual ~DevUIWidget() noexcept = default; 22 | 23 | virtual void update_state(ice::DevUIWidgetState& state) noexcept { } 24 | 25 | virtual void build_content() noexcept = 0; 26 | 27 | virtual void build_widget(ice::DevUIFrame& frame, ice::DevUIWidgetState& state) noexcept; 28 | 29 | virtual void build_menu() noexcept; 30 | 31 | virtual bool build_mainmenu(ice::DevUIWidgetState& state) noexcept; 32 | 33 | ice::DevUIWidgetInfo const info; 34 | }; 35 | 36 | } // namespace ice 37 | -------------------------------------------------------------------------------- /source/code/core/math/math.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'math' 7 | .Kind = .Kind_HeaderOnly 8 | .Group = 'Core' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/core/math' 11 | 12 | .Public = 13 | [ 14 | .Uses = { 15 | 'core' 16 | } 17 | ] 18 | ] 19 | .Projects + .Project 20 | -------------------------------------------------------------------------------- /source/code/core/math/math_tests.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'math_tests' 7 | .Kind = .Kind_ConsoleApp 8 | .Group = 'Tests' 9 | .Requires = { 'Windows' } 10 | .Tags = { 'UnitTests' } 11 | 12 | .BaseDir = '$WorkspaceCodeDir$/core/math' 13 | 14 | .InputPaths = { 15 | 'tests' 16 | } 17 | .VStudioPaths = .InputPaths 18 | 19 | .Private = 20 | [ 21 | .Uses = { 22 | 'math' 23 | } 24 | 25 | .Modules = { 26 | 'catch2' 27 | } 28 | ] 29 | 30 | .UnitTests = 31 | [ 32 | .Enabled = true 33 | ] 34 | ] 35 | .Projects + .Project 36 | -------------------------------------------------------------------------------- /source/code/core/math/public/ice/math.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 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 19 | #include 20 | 21 | namespace ice 22 | { 23 | 24 | using namespace math; 25 | 26 | using std::abs; 27 | 28 | template<> 29 | constexpr inline ShardPayloadID Constant_ShardPayloadID = ice::shard_payloadid("ice::vec2u"); 30 | 31 | template<> 32 | constexpr inline ShardPayloadID Constant_ShardPayloadID = ice::shard_payloadid("ice::vec2i"); 33 | 34 | } // namespace ice 35 | -------------------------------------------------------------------------------- /source/code/core/math/public/ice/math/constants.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::math 8 | { 9 | 10 | static constexpr ice::f32 const_pi = 3.14159265358979323846f; 11 | 12 | } // namespace ice::math 13 | -------------------------------------------------------------------------------- /source/code/core/math/public/ice/math/lookat.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::math 8 | { 9 | 10 | inline auto lookat( 11 | vec<3, f32> pos, 12 | vec<3, f32> target, 13 | vec<3, f32> up 14 | ) noexcept -> mat<4, 4, f32>; 15 | 16 | inline auto lookat( 17 | vec<3, f32> pos, 18 | vec<3, f32> target, 19 | vec<3, f32> up 20 | ) noexcept -> mat<4, 4, f32> 21 | { 22 | vec<3, f32> const dir = normalize(pos - target); 23 | vec<3, f32> const right = normalize(cross(up, dir)); 24 | vec<3, f32> const view_up = cross(dir, right); 25 | 26 | mat<4, 4, f32> const temp { 27 | right.v[0][0], view_up.v[0][0], dir.v[0][0], 0.0f, 28 | right.v[0][1], view_up.v[0][1], dir.v[0][1], 0.0f, 29 | right.v[0][2], view_up.v[0][2], dir.v[0][2], 0.0f, 30 | 0.0f, 0.0f, 0.0f, 1.0f, 31 | }; 32 | return temp * translate(-pos); 33 | } 34 | 35 | } // namespace core::math 36 | -------------------------------------------------------------------------------- /source/code/core/math/public/ice/math/matrix/matrix_operators.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::math 8 | { 9 | 10 | template 11 | constexpr auto operator*( 12 | mat left, 13 | mat right 14 | ) noexcept -> mat 15 | { 16 | return ice::math::mul(left, right); 17 | } 18 | 19 | } // namespace ice::math 20 | -------------------------------------------------------------------------------- /source/code/core/math/public/ice/math/types.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::math 8 | { 9 | 10 | using deg = struct { f32 value; }; 11 | using rad = struct { f32 value; }; 12 | 13 | } // namespace ice::math 14 | -------------------------------------------------------------------------------- /source/code/core/memsys/memsys.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2020 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'memsys' 7 | .Kind = .Kind_StaticLib 8 | .Group = 'Core' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/core/memsys' 11 | 12 | .Public = 13 | [ 14 | .Uses = { 15 | 'core' 16 | } 17 | ] 18 | ] 19 | .Projects + .Project 20 | -------------------------------------------------------------------------------- /source/code/core/memsys/memsys_tests.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'memsys_tests' 7 | .Kind = .Kind_ConsoleApp 8 | .Group = 'Tests' 9 | .Requires = { 'Windows' } 10 | .Tags = { 'UnitTests' } 11 | 12 | .BaseDir = '$WorkspaceCodeDir$/core/memsys' 13 | 14 | .InputPaths = { 15 | 'tests' 16 | } 17 | .VStudioPaths = .InputPaths 18 | 19 | .Private = 20 | [ 21 | .Uses = { 22 | 'memsys' 23 | } 24 | 25 | .Modules = { 26 | 'catch2' 27 | } 28 | ] 29 | 30 | .UnitTests = 31 | [ 32 | .Enabled = true 33 | ] 34 | ] 35 | .Projects + .Project 36 | -------------------------------------------------------------------------------- /source/code/core/memsys/private/mem_allocator_buddy.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/code/core/memsys/private/mem_allocator_buddy.cxx -------------------------------------------------------------------------------- /source/code/core/memsys/private/mem_allocator_host.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | 6 | namespace ice 7 | { 8 | 9 | HostAllocator::HostAllocator(std::source_location src_loc) noexcept 10 | : Allocator{ src_loc, "Host" } 11 | { 12 | } 13 | 14 | auto HostAllocator::do_allocate(ice::AllocRequest request) noexcept -> ice::AllocResult 15 | { 16 | return ice::alloc_aligned(request.size, request.alignment); 17 | } 18 | 19 | void HostAllocator::do_deallocate(void* pointer) noexcept 20 | { 21 | ice::release_aligned(pointer); 22 | } 23 | 24 | } // namespace ice 25 | -------------------------------------------------------------------------------- /source/code/core/memsys/public/ice/mem_allocator_buddy.hxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/code/core/memsys/public/ice/mem_allocator_buddy.hxx -------------------------------------------------------------------------------- /source/code/core/memsys/public/ice/mem_allocator_host.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2024, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice 8 | { 9 | 10 | struct HostAllocator final : ice::Allocator 11 | { 12 | HostAllocator(std::source_location = std::source_location::current()) noexcept; 13 | 14 | protected: 15 | auto do_allocate(ice::AllocRequest request) noexcept -> ice::AllocResult override; 16 | void do_deallocate(void* pointer) noexcept override; 17 | }; 18 | 19 | } // namespace ice 20 | -------------------------------------------------------------------------------- /source/code/core/memsys/public/ice/mem_allocator_null.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice 8 | { 9 | 10 | class NullAllocator final : public ice::Allocator 11 | { 12 | public: 13 | NullAllocator(std::source_location src_loc = std::source_location::current()) noexcept 14 | : ice::Allocator{ src_loc } 15 | { } 16 | 17 | protected: 18 | auto do_allocate(ice::AllocRequest) noexcept -> ice::AllocResult override 19 | { 20 | return { nullptr, 0_B, ice::ualign::invalid }; 21 | } 22 | 23 | void do_deallocate(void*) noexcept override { } 24 | }; 25 | 26 | } // namespace ice 27 | -------------------------------------------------------------------------------- /source/code/core/memsys/public/ice/mem_utils.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | 9 | namespace ice 10 | { 11 | 12 | constexpr auto mem_max_capacity(ice::usize element_size, ice::usize memory_space) noexcept -> ice::ucount; 13 | 14 | template 15 | constexpr auto mem_max_capacity(ice::usize memory_space) noexcept -> ice::ucount; 16 | 17 | constexpr auto mem_max_capacity(ice::usize element_size, ice::usize memory_space) noexcept -> ice::ucount 18 | { 19 | return static_cast(memory_space.value / element_size.value); 20 | } 21 | 22 | template 23 | constexpr auto mem_max_capacity(ice::usize memory_space) noexcept -> ice::ucount 24 | { 25 | return ice::mem_max_capacity(ice::size_of, memory_space); 26 | } 27 | 28 | } // namespace ice 29 | -------------------------------------------------------------------------------- /source/code/core/memsys/tests/test_utils.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace Catch 9 | { 10 | template<> 11 | struct StringMaker 12 | { 13 | static std::string convert(ice::usize const& value) 14 | { 15 | return StringMaker::convert(value.value); 16 | } 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /source/code/core/modules/modules.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2021 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'modules' 7 | .Kind = .Kind_StaticLib 8 | .Group = 'Core' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/core/modules' 11 | 12 | .Public = 13 | [ 14 | .Uses = { 15 | 'collections' 16 | } 17 | ] 18 | ] 19 | .Projects + .Project 20 | -------------------------------------------------------------------------------- /source/code/core/modules/private/module.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2024, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | #include 6 | #include "module_globals.hxx" 7 | 8 | namespace ice 9 | { 10 | 11 | ModulesEntry const* Global_ModulesList = nullptr; 12 | 13 | ModulesEntry::ModulesEntry( 14 | ice::FnModuleLoad* fn_load, 15 | ice::FnModuleUnload* fn_unload 16 | ) noexcept 17 | : ModuleInfo{ fn_load, fn_unload } 18 | , next{ ice::exchange(Global_ModulesList, this) } 19 | { 20 | ICE_ASSERT_CORE(fn_load != nullptr); 21 | ICE_ASSERT_CORE(fn_unload != nullptr); 22 | } 23 | 24 | } // namespace ice 25 | -------------------------------------------------------------------------------- /source/code/core/modules/private/module_globals.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2024, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice 8 | { 9 | 10 | //! \brief This is the global modules list that will be defined for each dynamic module and the actuall app. 11 | //! This list is used to load all available modules when a dynamic library is loaded via ModuleRegister. 12 | extern ModulesEntry const* Global_ModulesList; 13 | 14 | } // namespace ice 15 | -------------------------------------------------------------------------------- /source/code/core/modules/private/module_native.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2024, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace ice::native_module 9 | { 10 | 11 | #if ISP_WINDOWS 12 | 13 | using ModuleHandle = ice::win32::DynLibHandle; 14 | 15 | #elif ISP_UNIX 16 | 17 | using ModuleHandle = ice::unix_::DynLibHandle; 18 | 19 | #endif 20 | 21 | auto module_open(ice::String path) noexcept -> ice::native_module::ModuleHandle; 22 | 23 | void module_close(ice::native_module::ModuleHandle module) noexcept; 24 | 25 | auto module_find_address(ice::native_module::ModuleHandle const& module, ice::String symbol_name) noexcept -> void*; 26 | 27 | } // namespace ice 28 | -------------------------------------------------------------------------------- /source/code/core/modules/private/module_negotiator.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | 6 | namespace ice 7 | { 8 | 9 | bool ModuleNegotiatorBase::query_apis( 10 | ice::StringID_Arg api_name, 11 | ice::u32 api_version, 12 | ice::ModuleAPI* api_array, 13 | ice::u32* array_size 14 | ) const noexcept 15 | { 16 | return negotiator_api->fn_select_apis(negotiator_context, ice::stringid_hash(api_name), api_version, api_array, array_size); 17 | } 18 | 19 | bool ModuleNegotiatorBase::register_api(ice::StringID_Arg api_name, ice::FnModuleSelectAPI* api_selector) const noexcept 20 | { 21 | return negotiator_api->fn_register_api(negotiator_context, ice::stringid_hash(api_name), api_selector); 22 | } 23 | 24 | } // namespace ice 25 | -------------------------------------------------------------------------------- /source/code/core/modules/public/ice/module_types.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace ice 9 | { 10 | 11 | template 12 | class Module; 13 | class ModuleRegister; 14 | class ModuleNegotiatorBase; 15 | template 16 | class ModuleNegotiatorTagged; 17 | 18 | struct ModuleQuery; 19 | struct ModuleAPI; 20 | struct ModuleNegotiatorAPI; 21 | struct ModuleNegotiatorAPIContext; 22 | 23 | using FnModuleLoad = void (ice::Allocator*, ice::ModuleNegotiatorAPIContext*, ice::ModuleNegotiatorAPI*); 24 | using FnModuleUnload = void (ice::Allocator*); 25 | using FnModuleSelectAPI = bool (ice::StringID_Hash, ice::u32, ice::ModuleAPI*); 26 | 27 | template 28 | using ProcAPIQuickRegisterFunc = void(*)(T& out_api) noexcept; 29 | 30 | } // namespace ice 31 | -------------------------------------------------------------------------------- /source/code/core/tasks/private/internal_tasks/task_utils.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include "task_utils.hxx" 5 | -------------------------------------------------------------------------------- /source/code/core/tasks/private/task_thread.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include "task_native_thread.hxx" 5 | 6 | namespace ice 7 | { 8 | 9 | auto create_thread( 10 | ice::Allocator& alloc, 11 | ice::TaskQueue& queue, 12 | ice::TaskThreadInfo const& thread_info 13 | ) noexcept -> ice::UniquePtr 14 | { 15 | ice::UniquePtr thread = ice::make_unique( 16 | alloc, 17 | queue, 18 | thread_info 19 | ); 20 | 21 | if (thread->valid()) 22 | { 23 | return thread; 24 | } 25 | return { }; 26 | } 27 | 28 | } // namespace ice 29 | -------------------------------------------------------------------------------- /source/code/core/tasks/private/task_thread_pool.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include "task_thread_pool_impl.hxx" 5 | 6 | namespace ice 7 | { 8 | 9 | auto create_thread_pool( 10 | ice::Allocator& alloc, 11 | ice::TaskQueue& queue, 12 | ice::TaskThreadPoolCreateInfo const& threadpool_info 13 | ) noexcept -> ice::UniquePtr 14 | { 15 | return ice::make_unique(alloc, alloc, queue, threadpool_info); 16 | } 17 | 18 | } // namespace ice 19 | -------------------------------------------------------------------------------- /source/code/core/tasks/public/ice/task_container.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | namespace ice 11 | { 12 | 13 | struct TaskContainer 14 | { 15 | virtual ~TaskContainer() noexcept = default; 16 | 17 | virtual auto create_tasks(ice::u32 count, ice::ShardID id) noexcept -> ice::Span> = 0; 18 | 19 | virtual auto await_tasks_scheduled_on(ice::TaskScheduler& scheduler, ice::TaskScheduler& resumer) noexcept -> ice::Task<> = 0; 20 | 21 | virtual auto execute_tasks() noexcept -> ice::ucount = 0; 22 | 23 | virtual auto running_tasks() const noexcept -> ice::ucount = 0; 24 | 25 | virtual void wait_tasks() noexcept = 0; 26 | 27 | virtual auto extract_tasks() noexcept -> ice::Array> = 0; 28 | }; 29 | 30 | } // namespace ice 31 | -------------------------------------------------------------------------------- /source/code/core/tasks/tasks.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'tasks' 7 | .Kind = .Kind_StaticLib 8 | .Group = 'Core' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/core/tasks' 11 | 12 | .Public = 13 | [ 14 | .Uses = { 15 | 'utils' 16 | 'collections' 17 | } 18 | ] 19 | 20 | .Win32_Libs = 21 | [ 22 | .Name = 'Win32-Synchronization' 23 | .Requires = { 'SDK-Windows-10' } 24 | .Public = 25 | [ 26 | .Libs = { 27 | 'Synchronization' 28 | } 29 | ] 30 | ] 31 | .Unix_Libs = 32 | [ 33 | .Name = 'Unix-Synchronization' 34 | .Requires = { 'POSIX' } 35 | 36 | .Public = 37 | [ 38 | .Libs = { 39 | 'pthread' 40 | } 41 | ] 42 | ] 43 | .Rules = { .Win32_Libs } 44 | ] 45 | .Projects + .Project 46 | -------------------------------------------------------------------------------- /source/code/core/threading/public/ice/sync_manual_reset_event.hxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/code/core/threading/public/ice/sync_manual_reset_event.hxx -------------------------------------------------------------------------------- /source/code/core/threading/threading.bff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/code/core/threading/threading.bff -------------------------------------------------------------------------------- /source/code/core/utils/private/log_android.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::detail::android 8 | { 9 | 10 | void logcat_assert( 11 | ice::String condition, 12 | ice::String message, 13 | fmt::format_args args, 14 | ice::detail::LogLocation location 15 | ) noexcept; 16 | 17 | void logcat_message( 18 | ice::LogSeverity severity, 19 | ice::LogTag tag, 20 | ice::String message, 21 | fmt::format_args args, 22 | ice::detail::LogLocation location 23 | ) noexcept; 24 | 25 | } // namespace ice 26 | -------------------------------------------------------------------------------- /source/code/core/utils/private/log_buffer.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | 9 | namespace ice::detail 10 | { 11 | 12 | class LogMessageBuffer final : public fmt::v10::detail::buffer 13 | { 14 | public: 15 | LogMessageBuffer(ice::Allocator& alloc, ice::ucount initial_allocation) noexcept; 16 | ~LogMessageBuffer() noexcept; 17 | 18 | void grow(size_t size) noexcept override; 19 | 20 | private: 21 | ice::Allocator& _allocator; 22 | }; 23 | 24 | static thread_local ice::StackAllocator_2048 log_buffer_alloc{ }; 25 | 26 | } // ice::detail 27 | -------------------------------------------------------------------------------- /source/code/core/utils/private/log_sink.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include "log_internal.hxx" 5 | 6 | namespace ice::detail 7 | { 8 | 9 | auto default_register_sink_fn(ice::LogSinkFn fn_sink, void* userdata) noexcept -> ice::LogSinkID 10 | { 11 | return ice::detail::internal_log_state->register_sink(fn_sink, userdata); 12 | } 13 | 14 | void default_unregister_sink_fn(ice::LogSinkID sinkid) noexcept 15 | { 16 | ice::detail::internal_log_state->unregister_sink(sinkid); 17 | } 18 | 19 | auto uninitialized_register_sink_fn(ice::LogSinkFn /*fn_sin*/, void* /*userdata*/) noexcept -> ice::LogSinkID 20 | { 21 | return {}; 22 | } 23 | 24 | void uninitialized_unregister_sink_fn(ice::LogSinkID /*sinkid*/) noexcept 25 | { 26 | } 27 | 28 | } // namespace ice::detail 29 | 30 | ice::detail::RegisterLogSinkFn* ice::detail::fn_register_log_sink = ice::detail::uninitialized_register_sink_fn; 31 | ice::detail::UnregisterLogSinkFn* ice::detail::fn_unregister_log_sink = ice::detail::uninitialized_unregister_sink_fn; 32 | -------------------------------------------------------------------------------- /source/code/core/utils/private/log_webasm.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::detail::webasm 8 | { 9 | 10 | void alert_assert( 11 | ice::String condition, 12 | ice::String message, 13 | fmt::format_args args, 14 | ice::detail::LogLocation location 15 | ) noexcept; 16 | 17 | void console_message( 18 | ice::LogSeverity severity, 19 | ice::LogTag tag, 20 | ice::String message, 21 | fmt::format_args args, 22 | ice::detail::LogLocation location 23 | ) noexcept; 24 | 25 | } // namespace ice 26 | -------------------------------------------------------------------------------- /source/code/core/utils/public/ice/concept/named_type.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::concepts 8 | { 9 | 10 | template 11 | concept NamedDataType = requires(T t) { 12 | { ice::clear_type_t::Identifier } -> std::convertible_to; 13 | } && std::is_trivially_destructible_v; 14 | 15 | } // namespace ice 16 | -------------------------------------------------------------------------------- /source/code/core/utils/public/ice/config/config_impl.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/code/core/utils/public/ice/config/config_impl.inl -------------------------------------------------------------------------------- /source/code/core/utils/public/ice/log_module.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice 8 | { 9 | 10 | void log_module_init(ice::Allocator& alloc, ice::ModuleNegotiatorBase const& negotiator) noexcept; 11 | 12 | struct LogModule 13 | { 14 | static void init(ice::Allocator& alloc, ice::ModuleNegotiatorBase const& negotiator) noexcept; 15 | 16 | static bool on_load(ice::Allocator& alloc, ice::ModuleNegotiatorBase const& negotiator) noexcept; 17 | static void on_unload(ice::Allocator& alloc) noexcept; 18 | }; 19 | 20 | } // namespace ice 21 | -------------------------------------------------------------------------------- /source/code/core/utils/public/ice/log_severity.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice 8 | { 9 | 10 | enum class LogSeverity : ice::u32 11 | { 12 | Critical = 0x1, 13 | Retail, 14 | 15 | Error, 16 | Warning, 17 | Info, 18 | Verbose, 19 | Debug, 20 | 21 | None = 0x0, 22 | All = 0xffff'ffff 23 | }; 24 | 25 | static constexpr LogSeverity lowest_compiled_log_severity = []() -> ice::LogSeverity 26 | { 27 | if constexpr (ice::build::is_debug) 28 | { 29 | return LogSeverity::Debug; 30 | } 31 | else if constexpr (ice::build::is_release) 32 | { 33 | return LogSeverity::Retail; 34 | } 35 | else 36 | { 37 | return LogSeverity::Verbose; 38 | } 39 | }(); 40 | 41 | } // namespace ice 42 | -------------------------------------------------------------------------------- /source/code/core/utils/public/ice/log_sink.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace ice 9 | { 10 | 11 | enum class LogSeverity : ice::u32; 12 | enum class LogTag : ice::u64; 13 | 14 | struct LogSinkMessage 15 | { 16 | ice::LogSeverity severity; 17 | ice::LogTag tag; 18 | ice::String tag_name; 19 | ice::String message; 20 | }; 21 | 22 | enum class LogSinkID : uint8_t { Invalid = 0 }; 23 | 24 | using LogSinkFn = void(*)(void* userdata, ice::LogSinkMessage const& message) noexcept; 25 | 26 | auto log_module_register_sink(LogSinkFn fn_sink, void* userdata) noexcept -> ice::LogSinkID; 27 | void log_module_unregister_sink(ice::LogSinkID sinkid) noexcept; 28 | 29 | } // namespace ice 30 | -------------------------------------------------------------------------------- /source/code/core/utils/public/ice/params_types.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | namespace ice 12 | { 13 | 14 | struct ParamsInternal; 15 | struct ParamInstanceBase; 16 | 17 | using Params = ice::UniquePtr const; 18 | using ParamsCustomCallback = bool(*)(void* userdata, ice::Span results) noexcept; 19 | 20 | namespace concepts 21 | { 22 | 23 | template 24 | concept ParamCustomType = requires(T t) { 25 | std::is_same_v) noexcept>; 26 | }; 27 | 28 | } // namespace concepts 29 | 30 | } // namespace ice 31 | -------------------------------------------------------------------------------- /source/code/core/utils/public/ice/shard_payloads.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | 9 | namespace ice 10 | { 11 | 12 | template<> 13 | constexpr inline ice::ShardPayloadID Constant_ShardPayloadID = ice::shard_payloadid("ice::String const*"); 14 | 15 | template<> 16 | constexpr inline ice::ShardPayloadID Constant_ShardPayloadID = ice::shard_payloadid("ice::Tns"); 17 | 18 | } // namespace ice 19 | -------------------------------------------------------------------------------- /source/code/core/utils/utils.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'utils' 7 | .Kind = .Kind_StaticLib 8 | .Group = 'Core' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/core/utils' 11 | 12 | .Public = 13 | [ 14 | .Modules = { 15 | 'fmt' 16 | 'cli11' 17 | } 18 | .Uses = { 19 | 'math' 20 | 'collections' 21 | 'modules' 22 | } 23 | ] 24 | 25 | .Private = 26 | [ 27 | .Modules = { 28 | 'rapidjson' 29 | } 30 | ] 31 | ] 32 | .Projects + .Project 33 | -------------------------------------------------------------------------------- /source/code/core/utils/utils_tests.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'utils_tests' 7 | .Kind = .Kind_ConsoleApp 8 | .Group = 'Tests' 9 | .Requires = { 'Windows' } 10 | .Tags = { 'UnitTests' } 11 | 12 | .BaseDir = '$WorkspaceCodeDir$/core/utils' 13 | 14 | .InputPaths = { 15 | 'tests' 16 | } 17 | .VStudioPaths = .InputPaths 18 | 19 | .Private = 20 | [ 21 | .Uses = { 22 | 'utils' 23 | } 24 | 25 | .Modules = { 26 | 'catch2' 27 | } 28 | ] 29 | 30 | .UnitTests = 31 | [ 32 | .Enabled = true 33 | ] 34 | ] 35 | .Projects + .Project 36 | -------------------------------------------------------------------------------- /source/code/example/android/build.gradle.template.kts: -------------------------------------------------------------------------------- 1 | 2 | plugins { 3 | 4 | /** 5 | * Use `apply false` in the top-level build.gradle file to add a Gradle 6 | * plugin as a build dependency but not apply it to the current (root) 7 | * project. Don't use `apply false` in sub-projects. For more information, 8 | * see Applying external plugins with same version to subprojects. 9 | */ 10 | 11 | $(Plugins '{} apply false') 12 | } 13 | -------------------------------------------------------------------------------- /source/code/example/android/simple/src/main/java/net/example/simple/MyApp.java: -------------------------------------------------------------------------------- 1 | 2 | package net.example.simple; 3 | 4 | import android.app.Activity; 5 | import android.app.NativeActivity; 6 | import android.widget.TextView; 7 | import android.os.Bundle; 8 | 9 | public class MyApp extends Activity 10 | { 11 | static 12 | { 13 | System.loadLibrary("simple"); 14 | } 15 | 16 | public native String stringFromJNI(); 17 | 18 | /** Called when the activity is first created. */ 19 | @Override 20 | public void onCreate(Bundle savedInstanceState) 21 | { 22 | super.onCreate(savedInstanceState); 23 | 24 | /* Create a TextView and set its text to "Hello world" */ 25 | TextView tv = new TextView(this); 26 | tv.setText(stringFromJNI()); 27 | setContentView(tv); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /source/code/example/android/simple/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | MyApp 4 | 5 | -------------------------------------------------------------------------------- /source/code/framework/framework_base/private/asset/tilemap/asset_tilemap.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | namespace ice 12 | { 13 | 14 | class AssetStorage; 15 | class ResourceTracker; 16 | 17 | auto asset_tilemap_oven_tmx( 18 | void*, 19 | ice::Allocator&, 20 | ice::ResourceTracker const&, 21 | ice::LooseResource const&, 22 | ice::Data, 23 | ice::Memory& 24 | ) noexcept -> ice::Task; 25 | 26 | auto asset_tilemap_loader( 27 | void*, 28 | ice::Allocator& alloc, 29 | ice::AssetStorage&, 30 | ice::Config const& meta, 31 | ice::Data data, 32 | ice::Memory& out_data 33 | ) noexcept -> ice::Task; 34 | 35 | constexpr ice::LogTagDefinition LogTag_TiledOven = ice::create_log_tag(ice::LogTag::Asset, "Tiled TMX Oven"); 36 | 37 | } // namespace ice 38 | -------------------------------------------------------------------------------- /source/code/framework/framework_base/private/framework_tilemap.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | 6 | namespace ice 7 | { 8 | 9 | auto make_tileset_id( 10 | ice::u8 tileset_idx, 11 | ice::u8 tile_flip, 12 | ice::u16 tile_x, 13 | ice::u16 tile_y 14 | ) noexcept -> ice::TileSetID 15 | { 16 | ice::u32 result = tileset_idx & 0x0000'000f; 17 | result <<= 4; 18 | result |= tile_flip & 0x0000'000f; 19 | result <<= 12; 20 | result |= 0x0000'0fff & tile_y; 21 | result <<= 12; 22 | result |= 0x0000'0fff & tile_x; 23 | return static_cast(result); 24 | } 25 | 26 | } // namespace ice 27 | -------------------------------------------------------------------------------- /source/code/framework/framework_base/private/traits/physics/chipmunk2d.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | 6 | //#include 7 | //#include 8 | #undef assert 9 | -------------------------------------------------------------------------------- /source/code/framework/framework_base/private/traits/physics/devui_chipmunk2d.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | #include "trait_chipmunk2d.hxx" 8 | #include "chipmunk2d.hxx" 9 | 10 | namespace ice 11 | { 12 | 13 | #if 0 // TODO: Update? 14 | class DevUI_Chipmunk2D : public ice::devui::DevUIWidget 15 | { 16 | public: 17 | DevUI_Chipmunk2D( 18 | cpSpace& space 19 | ) noexcept; 20 | 21 | auto settings() const noexcept -> ice::devui::WidgetSettings const& override; 22 | 23 | void on_prepare(void* context, ice::devui::WidgetState& state) noexcept override; 24 | void on_draw() noexcept override; 25 | 26 | void on_frame(ice::EngineFrame& frame) noexcept; 27 | 28 | private: 29 | cpSpace& _space; 30 | ice::devui::WidgetState* _state; 31 | ice::u32 _debug_draw_flags; 32 | }; 33 | #endif 34 | 35 | } // namespace ice 36 | -------------------------------------------------------------------------------- /source/code/framework/framework_base/public/ice/framework_module.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace ice::framework 9 | { 10 | 11 | class FrameworkModule : public ice::Module 12 | { 13 | public: 14 | static bool on_load(ice::Allocator& alloc, ice::ModuleNegotiatorTagged const& negotiator) noexcept; 15 | 16 | IS_WORKAROUND_MODULE_INITIALIZATION(FrameworkModule); 17 | }; 18 | 19 | } // namespace ice::framework 20 | -------------------------------------------------------------------------------- /source/code/framework/framework_base/public/ice/game_actor.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | 9 | namespace ice 10 | { 11 | 12 | static constexpr ice::StringID Constant_TraitName_Actor 13 | = "ice.base-framework.trait-actor"_sid; 14 | 15 | enum class ActorType : ice::u32 16 | { 17 | Player, 18 | }; 19 | 20 | struct Actor 21 | { 22 | static constexpr ice::StringID Identifier = "ice.component.actor"_sid; 23 | 24 | ice::ActorType type; 25 | }; 26 | 27 | } // namespace ice 28 | -------------------------------------------------------------------------------- /source/code/framework/framework_base/public/ice/game_anim.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | namespace ice 11 | { 12 | 13 | static constexpr ice::StringID Constant_TraitName_SpriteAnimator 14 | = "ice.base-framework.trait-sprite-animator"_sid; 15 | 16 | struct Animation 17 | { 18 | static constexpr ice::StringID Identifier = "ice.component.animation"_sid; 19 | 20 | ice::StringID_Hash animation; 21 | ice::f32 speed = 1.f / 60.f; 22 | }; 23 | 24 | struct AnimationState 25 | { 26 | static constexpr ice::StringID Identifier = "ice.component.animation-state"_sid; 27 | 28 | ice::StringID_Hash current_animation; 29 | ice::i64 timestamp; 30 | ice::vec2u frame; 31 | }; 32 | 33 | } // namespace ice 34 | -------------------------------------------------------------------------------- /source/code/framework/framework_base/public/ice/game_module.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace ice 9 | { 10 | 11 | void load_game_module( 12 | ice::Allocator* alloc, 13 | ice::ModuleNegotiatorAPIContext* ctx, 14 | ice::ModuleNegotiatorAPI* api 15 | ) noexcept; 16 | 17 | void unload_game_module( 18 | ice::Allocator* alloc 19 | ) noexcept; 20 | 21 | } // namespace ice 22 | -------------------------------------------------------------------------------- /source/code/framework/framework_base/public/ice/game_sprites.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace ice 9 | { 10 | 11 | struct Sprite 12 | { 13 | static constexpr ice::StringID Identifier = "ice.component.sprite"_sid; 14 | 15 | ice::String material; 16 | }; 17 | 18 | struct SpriteTile 19 | { 20 | static constexpr ice::StringID Identifier = "ice.component.sprite-tile"_sid; 21 | 22 | ice::vec2u material_tile{ 0, 0 }; 23 | }; 24 | 25 | } // namespace ice 26 | -------------------------------------------------------------------------------- /source/code/iceshard/engine/engine.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2021 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'engine' 7 | .Kind = .Kind_StaticLib 8 | .Group = 'Engine' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/iceshard/engine' 11 | 12 | .Public = 13 | [ 14 | .Modules = { 15 | // 'cppcoro' 16 | } 17 | .Uses = { 18 | 'tasks' 19 | 'modules' 20 | 'platform' 21 | 'input_system' 22 | 'render_system' 23 | } 24 | ] 25 | 26 | .Private = 27 | [ 28 | .Uses = { 29 | 'utils' 30 | } 31 | ] 32 | ] 33 | .Projects + .Project 34 | -------------------------------------------------------------------------------- /source/code/iceshard/engine/private/gfx/ice_gfx_object_storage.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace ice::gfx 9 | { 10 | 11 | #if 0 // DEPRECATED 12 | class SimpleGfxObjectStorage : public ice::gfx::GfxObjectStorage 13 | { 14 | public: 15 | SimpleGfxObjectStorage(ice::Allocator& alloc) noexcept; 16 | 17 | bool set(ice::StringID_Arg name, ice::gfx::GfxObject object) noexcept override; 18 | auto get(ice::StringID_Arg name) const noexcept -> ice::gfx::GfxObject override; 19 | void destroy_all(ice::render::RenderDevice& device) noexcept; 20 | 21 | private: 22 | ice::HashMap _objects; 23 | }; 24 | #endif 25 | 26 | } // namespace ice::gfx 27 | -------------------------------------------------------------------------------- /source/code/iceshard/engine/private/world_trait_module.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | namespace ice 11 | { 12 | 13 | void load_trait_descriptions( 14 | ice::Allocator&, 15 | ice::ModuleRegister const& registry, 16 | ice::TraitArchive& asset_category_archive 17 | ) noexcept 18 | { 19 | using ice::detail::world_traits::TraitsModuleAPI; 20 | 21 | ice::StackAllocator * 20> static_alloc{}; 22 | ice::Array api_ptrs{ static_alloc }; 23 | if (registry.query_apis(api_ptrs)) 24 | { 25 | for (TraitsModuleAPI const& api : api_ptrs) 26 | { 27 | api.register_traits_fn(asset_category_archive); 28 | } 29 | } 30 | } 31 | 32 | } // namespace ice 33 | -------------------------------------------------------------------------------- /source/code/iceshard/engine/public/ice/action/action_system.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | namespace ice::action 12 | { 13 | 14 | struct Action; 15 | 16 | class ActionSystem 17 | { 18 | public: 19 | virtual ~ActionSystem() noexcept = default; 20 | 21 | virtual void create_action( 22 | ice::StringID_Arg action_name, 23 | ice::action::Action const& action 24 | ) noexcept = 0; 25 | 26 | virtual void step_actions( 27 | ice::ShardContainer& shards 28 | ) noexcept = 0; 29 | }; 30 | 31 | class ActionTriggerDatabase; 32 | 33 | auto create_action_system( 34 | ice::Allocator& alloc, 35 | ice::Clock const& clock, 36 | ice::action::ActionTriggerDatabase& triggers 37 | ) noexcept -> ice::UniquePtr; 38 | 39 | } // namespace ice::action 40 | -------------------------------------------------------------------------------- /source/code/iceshard/engine/public/ice/ecs/ecs_query_object_part.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::ecs::detail 8 | { 9 | 10 | template 11 | struct QueryObjectPart 12 | { 13 | using Definition = ice::ecs::QueryDefinition; 14 | using ResultType = ice::ecs::detail::QueryEntityTupleResult; 15 | using BlockResultType = ice::ecs::detail::QueryBlockTupleResult; 16 | using ComponentsTypeList = std::tuple; 17 | 18 | static constexpr Definition Constant_QueryDefinition; 19 | 20 | static constexpr ice::u32 RefIndex = ReferencedIdx; 21 | static constexpr ice::u32 ComponentCount = sizeof...(Components); 22 | }; 23 | 24 | } // namespace ice::ecs 25 | -------------------------------------------------------------------------------- /source/code/iceshard/engine/public/ice/ecs/ecs_types.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace ice::ecs 9 | { 10 | 11 | enum class Archetype : ice::u64; 12 | 13 | template 14 | struct ArchetypeDefinition; 15 | struct ArchetypeInfo; 16 | 17 | class ArchetypeIndex; 18 | 19 | 20 | enum class Entity : ice::u32; 21 | 22 | struct EntityInfo; 23 | struct EntityDataSlot; 24 | 25 | class EntityIndex; 26 | class EntityStorage; 27 | class EntityOperations; 28 | 29 | 30 | enum class QueryType 31 | { 32 | Unchecked, 33 | Synchronized, 34 | 35 | Default = Unchecked, 36 | }; 37 | 38 | template 39 | struct Query; 40 | 41 | class QueryStorage; 42 | struct QueryProvider; 43 | struct QueryAccessTracker; 44 | 45 | struct QueryView; 46 | 47 | } // namespace ice::ecs 48 | -------------------------------------------------------------------------------- /source/code/iceshard/engine/public/ice/engine_frame_data.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice 8 | { 9 | 10 | struct EngineFrameData 11 | { 12 | virtual ~EngineFrameData() noexcept = default; 13 | 14 | // virtual auto frame() noexcept -> ice::DataStorage& = 0; 15 | virtual auto runtime() noexcept -> ice::DataStorage& = 0; 16 | 17 | // virtual auto frame() const noexcept -> ice::DataStorage const& = 0; 18 | virtual auto runtime() const noexcept -> ice::DataStorage const& = 0; 19 | virtual auto persistent() const noexcept -> ice::DataStorage const& = 0; 20 | }; 21 | 22 | } // namespace ice 23 | -------------------------------------------------------------------------------- /source/code/iceshard/engine/public/ice/engine_service_provider.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | 6 | namespace ice 7 | { 8 | 9 | class ServiceProvider 10 | { 11 | public: 12 | virtual ~ServiceProvider() noexcept = default; 13 | }; 14 | 15 | } // namespace ice 16 | -------------------------------------------------------------------------------- /source/code/iceshard/engine/public/ice/engine_shards.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace ice 9 | { 10 | 11 | static constexpr ice::Shard Shard_FrameTick = "event/frame/tick"_shard; 12 | 13 | static constexpr ice::ShardID ShardID_WorldCreated = "event/world/created`ice::StringID_Hash"_shardid; 14 | static constexpr ice::ShardID ShardID_WorldDestroyed = "event/world/destroyed`ice::StringID_Hash"_shardid; 15 | 16 | static constexpr ice::ShardID ShardID_WorldActivate = "action/world/activate"_shardid; 17 | static constexpr ice::ShardID ShardID_WorldDeactivate = "action/world/deactivate"_shardid; 18 | 19 | static constexpr ice::ShardID ShardID_WorldActivated = "event/world/activated`ice::StringID_Hash"_shardid; 20 | static constexpr ice::ShardID ShardID_WorldDeactivated = "event/world/deactivated`ice::StringID_Hash"_shardid; 21 | 22 | static constexpr ice::ShardID ShardID_InputEvent = "event/input`ice::input::InputEvent"_shardid; 23 | 24 | } // namespace ice 25 | -------------------------------------------------------------------------------- /source/code/iceshard/engine/public/ice/engine_state.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2024, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace ice 9 | { 10 | 11 | struct EngineStateGraph 12 | { 13 | using TypeTag = ice::StrongValue; 14 | 15 | ice::StringID value; 16 | }; 17 | 18 | struct EngineState 19 | { 20 | ice::EngineStateGraph graph; 21 | ice::StringID value; 22 | }; 23 | 24 | 25 | inline constexpr auto operator""_state_graph(char const* str, size_t len) noexcept 26 | { 27 | return ice::EngineStateGraph{ ice::stringid(str, len) }; 28 | } 29 | 30 | template 31 | inline constexpr auto operator|(ice::EngineStateGraph graph, char const (&str)[Size]) noexcept 32 | { 33 | return ice::EngineState{ graph, ice::stringid(str, Size) }; 34 | } 35 | 36 | inline constexpr bool operator==(ice::EngineState lhs, ice::EngineState rhs) noexcept 37 | { 38 | return lhs.graph == rhs.graph && lhs.value == rhs.value; 39 | } 40 | 41 | } // namespace ice 42 | -------------------------------------------------------------------------------- /source/code/iceshard/engine/public/ice/engine_state_definition.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | 9 | namespace ice 10 | { 11 | 12 | struct EngineStateTrigger 13 | { 14 | ice::ShardID when; 15 | ice::EngineState before; 16 | ice::EngineState from; 17 | ice::EngineState to; 18 | ice::ShardID results = ice::Shard_Invalid; 19 | }; 20 | 21 | struct EngineStateCommitter 22 | { 23 | virtual ~EngineStateCommitter() noexcept = default; 24 | 25 | virtual bool commit( 26 | ice::EngineStateTrigger const& trigger, 27 | ice::Shard trigger_shard, 28 | ice::ShardContainer& out_shards 29 | ) noexcept = 0; 30 | }; 31 | 32 | } // namespace ice 33 | -------------------------------------------------------------------------------- /source/code/iceshard/engine/public/ice/engine_state_processor.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice 8 | { 9 | 10 | } // namespace ice 11 | -------------------------------------------------------------------------------- /source/code/iceshard/engine/public/ice/engine_types.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | namespace ice 13 | { 14 | 15 | struct DataStorage; 16 | 17 | struct Engine; 18 | struct EngineCreateInfo; 19 | struct EngineDevUI; 20 | struct EngineFrame; 21 | struct EngineFrameData; 22 | struct EngineFrameSchedulers; 23 | struct EngineFrameUpdate; 24 | struct EngineParamsBase; 25 | struct EngineRunner; 26 | struct EngineRunnerCreateInfo; 27 | struct EngineStateTracker; 28 | 29 | struct EngineSchedulers 30 | { 31 | ice::TaskScheduler& main; 32 | ice::TaskScheduler& tasks; 33 | ice::TaskScheduler& gfx; 34 | }; 35 | 36 | } // namespace ice 37 | -------------------------------------------------------------------------------- /source/code/iceshard/engine/public/ice/gfx/gfx_graph_resource.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2024, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::gfx 8 | { 9 | 10 | enum class GfxResourceType : ice::u8 11 | { 12 | Invalid = 0, 13 | RenderTarget, 14 | DepthStencil, 15 | }; 16 | 17 | struct GfxResource 18 | { 19 | using TypeTag = ice::StrongValue; 20 | 21 | ice::u64 value; 22 | }; 23 | 24 | constexpr auto gfx_resource_type_val(ice::gfx::GfxResource res) noexcept -> ice::u32 25 | { 26 | return ice::u32((res.value & 0x0000'00ff'0000'0000) >> 32); 27 | } 28 | 29 | constexpr auto gfx_resource_type(ice::gfx::GfxResource res) noexcept -> ice::gfx::GfxResourceType 30 | { 31 | return static_cast(gfx_resource_type_val(res)); 32 | } 33 | 34 | } // namespace ice::gfx 35 | -------------------------------------------------------------------------------- /source/code/iceshard/engine/public/ice/gfx/gfx_stage_registry.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | namespace ice::gfx 11 | { 12 | 13 | struct GfxStageRegistry 14 | { 15 | virtual ~GfxStageRegistry() noexcept = default; 16 | 17 | virtual void register_stage( 18 | ice::StringID_Arg key, 19 | ice::gfx::GfxStage* stage 20 | ) noexcept = 0; 21 | 22 | virtual void remove_stage( 23 | ice::StringID_Arg key 24 | ) noexcept = 0; 25 | 26 | virtual bool query_stages( 27 | ice::Span stage_keys, 28 | ice::Array& out_stages 29 | ) const noexcept = 0; 30 | }; 31 | 32 | auto create_stage_registry( 33 | ice::Allocator& alloc 34 | ) noexcept -> ice::UniquePtr; 35 | 36 | } // namespace ice::gfx 37 | -------------------------------------------------------------------------------- /source/code/iceshard/engine/public/ice/gfx/gfx_types.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | 9 | namespace ice::gfx 10 | { 11 | 12 | struct GfxContext; 13 | struct GfxFrameStages; 14 | struct RenderFrameUpdate; 15 | struct GfxGraph; 16 | struct GfxGraphRuntime; 17 | struct GfxQueueDefinition; 18 | struct GfxRunner; 19 | struct GfxRunnerCreateInfo; 20 | struct GfxStage; 21 | struct GfxStageRegistry; 22 | struct GfxStateChange; 23 | 24 | struct GfxFrameStages 25 | { 26 | ice::TaskScheduler& scheduler; 27 | ice::TaskStage frame_transfer; 28 | ice::TaskStage<> frame_end; 29 | }; 30 | 31 | namespace v2 32 | { 33 | struct GfxQueueGroup_Temp; 34 | } 35 | 36 | } // namespace ice::gfx 37 | -------------------------------------------------------------------------------- /source/code/iceshard/engine/public/ice/gfx/gfx_utils.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | namespace ice::gfx 11 | { 12 | 13 | auto load_shader_program( 14 | ice::String name, 15 | ice::AssetStorage& assets 16 | ) noexcept -> ice::TaskExpected; 17 | 18 | //auto await_shader_program_on( 19 | // ice::String name, 20 | // ice::AssetStorage& assets, 21 | // ice::TaskScheduler& scheduler 22 | //) noexcept -> ice::TaskExpected; 23 | 24 | } // namespace ice::gfx 25 | -------------------------------------------------------------------------------- /source/code/iceshard/engine/public/ice/world/world_trait_archive.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | namespace ice 12 | { 13 | 14 | class TraitArchive 15 | { 16 | public: 17 | virtual ~TraitArchive() noexcept = default; 18 | 19 | virtual void register_trait(ice::TraitDescriptor const& trait_descriptor) noexcept = 0; 20 | 21 | virtual auto trait(ice::StringID_Arg traitid) const noexcept -> ice::TraitDescriptor const* = 0; 22 | }; 23 | 24 | auto create_default_trait_archive( 25 | ice::Allocator& alloc, 26 | ice::ecs::ArchetypeIndex& archetypes, 27 | ice::EngineStateTracker& states 28 | ) noexcept -> ice::UniquePtr; 29 | 30 | } // namespace ice 31 | -------------------------------------------------------------------------------- /source/code/iceshard/engine/public/ice/world/world_trait_module.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2024, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice 8 | { 9 | 10 | class ModuleRegister; 11 | 12 | void load_trait_descriptions( 13 | ice::Allocator& alloc, 14 | ice::ModuleRegister const& registry, 15 | ice::TraitArchive& trait_archive 16 | ) noexcept; 17 | 18 | namespace detail::world_traits 19 | { 20 | 21 | using RegisterTraitsFn = bool( 22 | ice::TraitArchive& 23 | ) noexcept; 24 | 25 | struct TraitsModuleAPI 26 | { 27 | static constexpr ice::StringID Constant_APIName = "ice.world-traits-module"_sid; 28 | static constexpr ice::u32 Constant_APIVersion = 1; 29 | 30 | RegisterTraitsFn* register_traits_fn; 31 | }; 32 | 33 | } // namespace detail::engine::v1 34 | 35 | } // namespace ice 36 | -------------------------------------------------------------------------------- /source/code/iceshard/engine/public/ice/world/world_types.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | 11 | namespace ice 12 | { 13 | 14 | struct World; 15 | struct WorldAssembly; 16 | struct WorldStateParams; 17 | struct WorldUpdater; 18 | 19 | struct WorldStateParams 20 | { 21 | ice::Clock const& clock; 22 | ice::AssetStorage& assets; 23 | ice::Engine& engine; 24 | ice::EngineSchedulers thread; 25 | ice::World& world; 26 | }; 27 | 28 | } // namespace ice 29 | -------------------------------------------------------------------------------- /source/code/iceshard/iceshard/iceshard.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2021 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'iceshard' 7 | .Kind = .Kind_SharedLib 8 | .Group = 'Engine' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/iceshard/iceshard' 11 | 12 | .Private = 13 | [ 14 | .Uses = { 15 | 'utils' 16 | 'modules' 17 | 'engine' 18 | 'devui' 19 | } 20 | ] 21 | 22 | .Rule_Monolythic = 23 | [ 24 | .Name = 'Monolythic' 25 | .Requires = { 'Monolythic' } 26 | .Kind = .Kind_ObjectList 27 | ] 28 | .Rules = { 29 | .Rule_Monolythic 30 | } 31 | ] 32 | .Projects + .Project 33 | -------------------------------------------------------------------------------- /source/code/iceshard/iceshard/private/iceshard_data_storage.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include "iceshard_data_storage.hxx" 5 | -------------------------------------------------------------------------------- /source/code/iceshard/iceshard/private/iceshard_gfx_frame.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/code/iceshard/iceshard/private/iceshard_gfx_frame.cxx -------------------------------------------------------------------------------- /source/code/iceshard/iceshard/private/iceshard_gfx_frame.hxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/code/iceshard/iceshard/private/iceshard_gfx_frame.hxx -------------------------------------------------------------------------------- /source/code/iceshard/iceshard/private/iceshard_world_devui.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include "iceshard_world.hxx" 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | namespace ice 13 | { 14 | 15 | class IceshardWorld::DevUI : public ice::DevUIWidget 16 | { 17 | public: 18 | DevUI( 19 | ice::Allocator& alloc, 20 | ice::IceshardWorld& world, 21 | ice::IceshardWorldContext& context 22 | ) noexcept; 23 | 24 | void build_content() noexcept override; 25 | 26 | ice::Shard world_operation; 27 | private: 28 | ice::Allocator& _allocator; 29 | ice::IceshardWorld& _world; 30 | ice::IceshardWorldContext& _context; 31 | }; 32 | 33 | } // namespace ice 34 | -------------------------------------------------------------------------------- /source/code/iceshard/iceshard/private/iceshard_world_manager_devui.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include "iceshard_world_manager.hxx" 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | namespace ice 13 | { 14 | 15 | class IceshardWorldManager::DevUI : public ice::DevUIWidget 16 | { 17 | public: 18 | DevUI( 19 | ice::Allocator& alloc, 20 | ice::DevUIWidgetInfo const& info, 21 | ice::IceshardWorldManager& manager 22 | ) noexcept; 23 | 24 | void build_content() noexcept override; 25 | 26 | private: 27 | ice::Allocator& _allocator; 28 | ice::IceshardWorldManager& _manager; 29 | 30 | struct Entry 31 | { 32 | ice::i32 status; 33 | }; 34 | 35 | ice::Array _entries; 36 | ice::u32 _selected; 37 | }; 38 | 39 | } // namespace ice 40 | -------------------------------------------------------------------------------- /source/code/modules/iceshard_pipelines/iceshard_pipelines.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'iceshard_pipelines' 7 | .Kind = .Kind_SharedLib 8 | .Group = 'Modules' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/modules/iceshard_pipelines' 11 | 12 | .Requires = { 13 | 'Windows' 14 | } 15 | 16 | .Private = 17 | [ 18 | .Modules = { 19 | 'arctic' 20 | 'assimp' 21 | 'freetype' 22 | 'msdfgen' 23 | 'msdf_atlas_gen' 24 | 'rapidxml_ns' 25 | } 26 | .Uses = { 27 | 'utils' 28 | 'modules' 29 | 'asset_system' 30 | 'render_system' 31 | 'ui_system' 32 | 'engine' 33 | } 34 | ] 35 | ] 36 | .Projects + .Project 37 | -------------------------------------------------------------------------------- /source/code/modules/iceshard_pipelines/private/asset_font.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice 8 | { 9 | 10 | void asset_category_font_definition(ice::AssetCategoryArchive& asset_category_archive) noexcept; 11 | 12 | } // namespace iceshard 13 | -------------------------------------------------------------------------------- /source/code/modules/iceshard_pipelines/private/asset_image.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice 8 | { 9 | 10 | void asset_category_image_definition(ice::AssetCategoryArchive& asset_category_archive) noexcept; 11 | 12 | } // namespace iceshard 13 | -------------------------------------------------------------------------------- /source/code/modules/iceshard_pipelines/private/mesh_pipeline/mesh_loader.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | //#include 6 | 7 | namespace ice 8 | { 9 | 10 | //class IceshardMeshLoader final : public ice::AssetLoader 11 | //{ 12 | //public: 13 | // auto load( 14 | // ice::AssetCategory type, 15 | // ice::Data data, 16 | // ice::Allocator& alloc, 17 | // ice::Memory& out_data 18 | // ) const noexcept -> ice::AssetStatus override; 19 | //}; 20 | 21 | } // namespace iceshard 22 | -------------------------------------------------------------------------------- /source/code/modules/iceshard_pipelines/private/mesh_pipeline/mesh_oven.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | 6 | namespace ice 7 | { 8 | 9 | //class ResourceSystem; 10 | 11 | //class IceshardMeshOven final : public ice::AssetOven 12 | //{ 13 | //public: 14 | // auto bake( 15 | // ice::ResourceHandle& resource, 16 | // ice::ResourceTracker& resource_tracker, 17 | // ice::Allocator& asset_alloc, 18 | // ice::Memory& asset_data 19 | // ) const noexcept -> ice::BakeResult override; 20 | //}; 21 | 22 | } // namespace iceshard 23 | -------------------------------------------------------------------------------- /source/code/modules/iceshard_pipelines/private/pipeline_ui/ip_ui_asset.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include "ip_ui_oven.hxx" 7 | 8 | namespace ice 9 | { 10 | 11 | void asset_category_ui_definition( 12 | ice::AssetCategoryArchive& type_archive 13 | ) noexcept; 14 | 15 | } // namespace ice::ui 16 | -------------------------------------------------------------------------------- /source/code/modules/iceshard_pipelines/private/pipeline_ui/ip_ui_oven_containers.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include "ip_ui_oven_containers.hxx" 5 | #include "ip_ui_oven_elements.hxx" 6 | #include "ip_ui_oven_page.hxx" 7 | #include "ip_ui_oven_utils.hxx" 8 | 9 | #include 10 | 11 | namespace ice 12 | { 13 | 14 | void parse_layout_element( 15 | rapidxml_ns::xml_node const* xml_element, 16 | ice::Allocator& alloc, 17 | ice::RawElement& info 18 | ) noexcept 19 | { 20 | rapidxml_ns::xml_attribute const* type_attrib = ice::xml_first_attrib(xml_element, ice::Constant_UIAttribute_LayoutType); 21 | 22 | ice::String const attrib_value = ice::xml_value(type_attrib); 23 | if (attrib_value == ice::Constant_UIAttributeKeyword_Vertical) 24 | { 25 | info.type = ice::ui::ElementType::LayoutV; 26 | } 27 | } 28 | 29 | } // namespace ice 30 | -------------------------------------------------------------------------------- /source/code/modules/iceshard_pipelines/private/pipeline_ui/ip_ui_oven_containers.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | #include "ip_ui_oven.hxx" 8 | 9 | namespace ice 10 | { 11 | static constexpr ice::String Constant_UIElement_Layout = "layout"; 12 | static constexpr ice::String Constant_UIAttribute_LayoutType = "direction"; 13 | 14 | static constexpr ice::String Constant_UIAttributeKeyword_Vertical = "vertical"; 15 | static constexpr ice::String Constant_UIAttributeKeyword_Horizontal = "horizontal"; 16 | 17 | struct RawLayoutInfo 18 | { 19 | 20 | }; 21 | 22 | void parse_layout_element( 23 | rapidxml_ns::xml_node const* xml_element, 24 | ice::Allocator& alloc, 25 | ice::RawElement& info 26 | ) noexcept; 27 | 28 | } // namespace ice 29 | -------------------------------------------------------------------------------- /source/code/modules/iceshard_pipelines/private/pipelines_module.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | //#include "mesh_pipeline/mesh_pipeline.hxx" 9 | #include "asset_font.hxx" 10 | #include "asset_image.hxx" 11 | #include "pipeline_ui/ip_ui_asset.hxx" 12 | 13 | namespace ice 14 | { 15 | 16 | struct IceShardPipelinesModule : ice::Module 17 | { 18 | static bool on_load(ice::Allocator& alloc, ice::ModuleNegotiator auto const& negotiator) noexcept 19 | { 20 | ice::LogModule::init(alloc, negotiator); 21 | return true; 22 | } 23 | 24 | IS_WORKAROUND_MODULE_INITIALIZATION(IceShardPipelinesModule); 25 | }; 26 | 27 | } // namespace ice 28 | -------------------------------------------------------------------------------- /source/code/modules/imgui_module/imgui_module.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2021 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'imgui_module' 7 | .Kind = .Kind_SharedLib 8 | .Group = 'Modules' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/modules/imgui_module' 11 | 12 | .Private = 13 | [ 14 | .Modules = { 15 | 'imgui' 16 | 'rapidfuzz_cpp' 17 | } 18 | .Uses = { 19 | 'devui' 20 | 'engine' 21 | 'utils' 22 | } 23 | ] 24 | 25 | .Rule_Monolythic = 26 | [ 27 | .Name = 'Monolythic' 28 | .Requires = { 'Monolythic' } 29 | .Kind = .Kind_ObjectList 30 | ] 31 | .Rule_Win32Editor = 32 | [ 33 | .Name = 'EditorPlugins' 34 | .Requires = { 'Windows' } 35 | .Private = 36 | [ 37 | .Modules = { 38 | 'imguizmo' 39 | } 40 | ] 41 | ] 42 | .Rules = { 43 | .Rule_Monolythic 44 | .Rule_Win32Editor 45 | } 46 | ] 47 | .Projects + .Project 48 | -------------------------------------------------------------------------------- /source/code/modules/imgui_module/private/widgets/imgui_allocator_tree.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | 9 | namespace ice::devui 10 | { 11 | 12 | class ImGui_AllocatorTreeWidget : public ice::DevUIWidget 13 | { 14 | public: 15 | ImGui_AllocatorTreeWidget(ice::AllocatorDebugInfo const& alloc) noexcept; 16 | ~ImGui_AllocatorTreeWidget() noexcept override = default; 17 | 18 | void build_widget(ice::DevUIFrame& frame, ice::DevUIWidgetState& state) noexcept override; 19 | void build_content() noexcept override; 20 | 21 | private: 22 | ice::AllocatorDebugInfo const& _root_tracked_allocator; 23 | 24 | char _filter[32]{}; 25 | bool _expanded; 26 | }; 27 | 28 | auto create_allocator_tree_widget( 29 | ice::Allocator& allocator 30 | ) noexcept -> ice::UniquePtr; 31 | 32 | } // namespace ice::devui 33 | -------------------------------------------------------------------------------- /source/code/modules/imgui_module/private/widgets/imgui_devui_manager.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | 9 | namespace ice::devui 10 | { 11 | 12 | struct ImGuiDevUIWidget : ice::DevUIWidgetState 13 | { 14 | ice::DevUIWidget* widget; 15 | }; 16 | 17 | class ImGuiDevUIManager final : public ice::DevUIWidget 18 | { 19 | public: 20 | ImGuiDevUIManager(ice::Allocator& alloc) noexcept; 21 | ~ImGuiDevUIManager() noexcept; 22 | 23 | void add_widget(ice::DevUIWidget* widget) noexcept; 24 | void remove_widget(ice::DevUIWidget* widget) noexcept; 25 | auto widgets() noexcept -> ice::Span { return _widgets; } 26 | 27 | void build_content() noexcept override; 28 | 29 | private: 30 | ice::Array _widgets; 31 | }; 32 | 33 | } // namespace ice::devui 34 | -------------------------------------------------------------------------------- /source/code/modules/imgui_module/private/widgets/imgui_logger.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | 5 | #pragma once 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | namespace ice::devui 12 | { 13 | 14 | struct ImGuiLogEntry 15 | { 16 | ice::LogSeverity severity; 17 | ice::LogTag tag; 18 | ice::String tagname; 19 | ice::HeapString<> message; 20 | ice::f64 filter_match = 1.0; 21 | }; 22 | 23 | class ImGuiLogger final : public ice::DevUIWidget 24 | { 25 | public: 26 | ImGuiLogger(ice::Allocator& alloc) noexcept; 27 | ~ImGuiLogger() noexcept; 28 | 29 | void add_entry(ice::LogSinkMessage const& message) noexcept; 30 | 31 | void build_content() noexcept override; 32 | 33 | private: 34 | ice::Array _entries; 35 | ice::Array _entries_visible; 36 | }; 37 | 38 | } // namespace ice::devui 39 | -------------------------------------------------------------------------------- /source/code/modules/shader_tools/private/shader_tools_asl_allocator.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace ice 9 | { 10 | 11 | class ASLAllocator : public arctic::SyntaxNodeAllocator 12 | { 13 | public: 14 | inline ASLAllocator(ice::Allocator& alloc) noexcept 15 | : _backing{ alloc } 16 | { } 17 | 18 | inline ASLAllocator(ice::ASLAllocator& alloc) noexcept 19 | : _backing{ alloc._backing } 20 | { } 21 | 22 | inline auto allocate(arctic::usize size, arctic::usize align) noexcept -> void* override 23 | { 24 | return _backing.allocate({ ice::usize{ size }, static_cast(align) }).memory; 25 | } 26 | 27 | inline void deallocate(void* ptr) noexcept override 28 | { 29 | _backing.deallocate(ptr); 30 | } 31 | 32 | public: 33 | ice::Allocator& _backing; 34 | }; 35 | 36 | } // namespace ice 37 | -------------------------------------------------------------------------------- /source/code/modules/shader_tools/private/shader_tools_asl_database.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace ice 9 | { 10 | 11 | struct ASLEntityTracker 12 | { 13 | virtual ~ASLEntityTracker() noexcept = default; 14 | 15 | virtual auto find(arctic::String entity) noexcept -> arctic::SyntaxNode<> 16 | { 17 | return {}; 18 | } 19 | 20 | virtual auto find_struct( 21 | arctic::syntax::Type const& type 22 | ) noexcept -> arctic::SyntaxNode 23 | { 24 | return {}; 25 | } 26 | }; 27 | 28 | } // namespace ice 29 | -------------------------------------------------------------------------------- /source/code/modules/shader_tools/private/shader_tools_asl_patcher.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include "shader_tools_asl.hxx" 6 | #include "shader_tools_asl_importer.hxx" 7 | #include "shader_tools_asl_allocator.hxx" 8 | #include 9 | 10 | namespace ice 11 | { 12 | 13 | class ASLPatcher : public ice::ASLPatcherVisitors 14 | { 15 | public: 16 | ASLPatcher(ASLAllocator& alloc, ASLImportTracker& imports) noexcept; 17 | 18 | public: // implements: ice::ASLPatcherVisitors 19 | void visit(arctic::SyntaxNode<> node) noexcept override; 20 | void visit(arctic::SyntaxNode node) noexcept override; 21 | void visit(arctic::SyntaxNode node) noexcept override; 22 | void visit(arctic::SyntaxNode node) noexcept override; 23 | 24 | protected: 25 | ASLAllocator& _allocator; 26 | ASLImportTracker& _imports; 27 | }; 28 | 29 | } // namespace ice 30 | -------------------------------------------------------------------------------- /source/code/modules/shader_tools/private/shader_tools_asl_utils.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include "shader_tools_asl_utils.hxx" 5 | 6 | namespace ice 7 | { 8 | 9 | } // namespace ice 10 | -------------------------------------------------------------------------------- /source/code/modules/shader_tools/private/shader_tools_glsl_patcher.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include "shader_tools_asl_patcher.hxx" 6 | 7 | namespace ice 8 | { 9 | 10 | class GLSLPatcher : public ASLPatcher 11 | { 12 | public: 13 | using ASLPatcher::ASLPatcher; 14 | 15 | void visit(arctic::SyntaxNode node) noexcept override; 16 | void visit(arctic::SyntaxNode node) noexcept override; 17 | }; 18 | 19 | } // namespace ice 20 | -------------------------------------------------------------------------------- /source/code/modules/shader_tools/private/shader_tools_wgsl_patcher.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include "shader_tools_asl_patcher.hxx" 6 | 7 | namespace ice 8 | { 9 | 10 | class WGSLPatcher : public ASLPatcher 11 | { 12 | public: 13 | using ASLPatcher::ASLPatcher; 14 | 15 | void visit(arctic::SyntaxNode node) noexcept override; 16 | void visit(arctic::SyntaxNode node) noexcept override; 17 | }; 18 | 19 | } // namespace ice 20 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_buffer.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | #include "vk_include.hxx" 6 | 7 | static_assert(sizeof(ice::render::CommandBuffer) == sizeof(VkCommandBuffer)); 8 | static_assert(alignof(ice::render::CommandBuffer) == alignof(VkCommandBuffer)); 9 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_buffer.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2024, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include "vk_include.hxx" 6 | #include "vk_memory_allocator.hxx" 7 | #include 8 | 9 | namespace ice::render::vk 10 | { 11 | 12 | struct VulkanBuffer 13 | { 14 | VkBuffer vk_buffer; 15 | VmaAllocation vma_allocation; 16 | }; 17 | 18 | } // namespace ice::render::vk 19 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_command_buffer.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | #include "vk_include.hxx" 9 | #include "vk_render_profiler.hxx" 10 | 11 | namespace ice::render::vk 12 | { 13 | 14 | struct VulkanCommandBuffer : ice::render::detail::vk::VulkanProfiledCommandBuffer 15 | { 16 | VkCommandBuffer buffer; 17 | 18 | static auto handle(VulkanCommandBuffer* native) noexcept 19 | { 20 | return static_cast(reinterpret_cast(native)); 21 | } 22 | 23 | static auto native(ice::render::CommandBuffer handle) noexcept 24 | { 25 | return reinterpret_cast(static_cast(handle)); 26 | } 27 | }; 28 | 29 | } // namespace ice::render::vk 30 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_fence.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include "vk_include.hxx" 7 | 8 | namespace ice::render::vk 9 | { 10 | 11 | class VulkanFence : public ice::render::RenderFence 12 | { 13 | public: 14 | VulkanFence(VkDevice vk_device, VkFence vk_fence) noexcept; 15 | ~VulkanFence() noexcept; 16 | 17 | auto native() const noexcept -> VkFence; 18 | 19 | bool wait(ice::u64 timeout_ns) noexcept override; 20 | void reset() noexcept override; 21 | 22 | private: 23 | VkDevice _vk_device; 24 | VkFence _vk_fence; 25 | }; 26 | 27 | } // namespace ice::render 28 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_framebuffer.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/code/modules/vulkan_renderer/private/vk_framebuffer.cxx -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_framebuffer.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include "vk_include.hxx" 6 | 7 | namespace ice::render::vk 8 | { 9 | 10 | } // namespace ice::render::vk 11 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_image.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include "vk_image.hxx" 5 | 6 | namespace ice::render::vk 7 | { 8 | 9 | } // namespace ice::render::vk 10 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_image.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2024, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include "vk_include.hxx" 6 | #include "vk_memory_allocator.hxx" 7 | 8 | namespace ice::render::vk 9 | { 10 | 11 | struct VulkanImage 12 | { 13 | VkImage vk_image; 14 | VkImageView vk_image_view; 15 | VmaAllocation vma_allocation; 16 | }; 17 | 18 | } // namespace ice::render::vk 19 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_include.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | constexpr nullptr_t vk_nullptr = VK_NULL_HANDLE; 9 | 10 | // Instance Extension Functions 11 | inline PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT vk_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT = nullptr; 12 | 13 | // Device Extension Functions 14 | inline PFN_vkGetCalibratedTimestampsEXT vk_vkGetCalibratedTimestampsEXT = nullptr; 15 | 16 | template 17 | inline bool vk_get_proc_address(VkFnPtr& out_ptr, VkObj obj, char const* name) noexcept 18 | { 19 | if constexpr(std::is_same_v) 20 | { 21 | out_ptr = reinterpret_cast(vkGetDeviceProcAddr(obj, name)); 22 | } 23 | else if constexpr (std::is_same_v) 24 | { 25 | out_ptr = reinterpret_cast(vkGetInstanceProcAddr(obj, name)); 26 | } 27 | else 28 | { 29 | out_ptr = nullptr; 30 | } 31 | return out_ptr != nullptr; 32 | } 33 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_memory_allocator.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | #include "vk_utility.hxx" 6 | 7 | #define VMA_IMPLEMENTATION 8 | #define VMA_STATIC_VULKAN_FUNCTIONS 0 9 | #define VMA_DYNAMIC_VULKAN_FUNCTIONS 1 10 | 11 | #if ISP_COMPILER_MSVC 12 | #pragma warning(push) 13 | #pragma warning(disable: 4189) //: local variable is initialized but not referenced 14 | #pragma warning(disable: 4324) // {}: structure was padded due to alignment specifier 15 | #elif ISP_COMPILER_CLANG || ISP_COMPILER_GCC 16 | #endif 17 | 18 | #if ICE_DEBUG || ICE_DEVELOP 19 | #define VMA_DEBUG_LOG(format, ...) printf(format "\n" __VA_OPT__(,) __VA_ARGS__) // VK_LOG(ice::LogSeverity::Debug, format, __VA_ARGS__) 20 | #endif 21 | 22 | #include // Vulkan Memory Allocator 23 | #undef assert 24 | 25 | #if ISP_COMPILER_MSVC 26 | #pragma warning(pop) 27 | #elif ISP_COMPILER_CLANG || ISP_COMPILER_GCC 28 | #endif 29 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_memory_allocator.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | #if ISP_COMPILER_MSVC 8 | #pragma warning(push) 9 | #pragma warning(disable: 4189) //: local variable is initialized but not referenced 10 | #pragma warning(disable: 4324) // {}: structure was padded due to alignment specifier 11 | #elif ISP_COMPILER_CLANG || ISP_COMPILER_GCC 12 | #endif 13 | 14 | #include // Vulkan Memory Allocator 15 | #undef assert 16 | 17 | #if ISP_COMPILER_MSVC 18 | #pragma warning(pop) 19 | #elif ISP_COMPILER_CLANG || ISP_COMPILER_GCC 20 | #endif 21 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_pipeline.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/code/modules/vulkan_renderer/private/vk_pipeline.cxx -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_pipeline.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include "vk_include.hxx" 6 | 7 | namespace ice::render::vk 8 | { 9 | 10 | } // namespace ice::render::vk 11 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_pipeline_layout.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/code/modules/vulkan_renderer/private/vk_pipeline_layout.cxx -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_pipeline_layout.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include "vk_include.hxx" 7 | 8 | namespace ice::render::vk 9 | { 10 | 11 | class VulkanPipelineLayout final 12 | { 13 | public: 14 | VulkanPipelineLayout() noexcept; 15 | ~VulkanPipelineLayout() noexcept; 16 | 17 | private: 18 | VkPipelineLayout _vk_piepline_layout; 19 | }; 20 | 21 | } // namespace ice::render::vk 22 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_render_profiler.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include "vk_include.hxx" 6 | #include 7 | 8 | #if IPT_ENABLED 9 | #include 10 | #include 11 | #undef assert 12 | #endif 13 | 14 | namespace ice::render::detail 15 | { 16 | 17 | #if IPT_ENABLED 18 | struct ProfilingZone::Internal : tracy::VkCtxScope 19 | { 20 | using VkCtxScope::VkCtxScope; 21 | 22 | static void on_delete_impl(Internal* obj) noexcept 23 | { 24 | delete obj; 25 | } 26 | }; 27 | 28 | namespace vk 29 | { 30 | struct VulkanProfiledCommandBuffer 31 | { 32 | TracyVkCtx tracy_ctx; 33 | }; 34 | } // namespace vk 35 | 36 | #else 37 | 38 | namespace vk 39 | { 40 | struct VulkanProfiledCommandBuffer { }; 41 | } // namespace vk 42 | 43 | #endif 44 | 45 | 46 | } // namespace ice::render::vk 47 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_render_surface.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include "vk_render_surface.hxx" 5 | 6 | namespace ice::render::vk 7 | { 8 | 9 | VulkanRenderSurface::VulkanRenderSurface( 10 | VkInstance vk_instance, 11 | VkSurfaceKHR vk_surface 12 | ) noexcept 13 | : _vk_instance{ vk_instance } 14 | , _vk_surface{ vk_surface } 15 | { 16 | } 17 | 18 | VulkanRenderSurface::~VulkanRenderSurface() noexcept 19 | { 20 | vkDestroySurfaceKHR(_vk_instance, _vk_surface, nullptr); 21 | } 22 | 23 | auto VulkanRenderSurface::handle() const noexcept -> VkSurfaceKHR 24 | { 25 | return _vk_surface; 26 | } 27 | 28 | } // namespace ice::render::vk 29 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_render_surface.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include "vk_include.hxx" 7 | 8 | namespace ice::render::vk 9 | { 10 | 11 | class VulkanRenderSurface final : public ice::render::RenderSurface 12 | { 13 | public: 14 | VulkanRenderSurface( 15 | VkInstance vk_instance, 16 | VkSurfaceKHR vk_surface 17 | ) noexcept; 18 | ~VulkanRenderSurface() noexcept override; 19 | 20 | auto handle() const noexcept -> VkSurfaceKHR; 21 | 22 | private: 23 | VkInstance _vk_instance; 24 | VkSurfaceKHR _vk_surface; 25 | }; 26 | 27 | } // namespace ice::render::vk 28 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_render_target.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/code/modules/vulkan_renderer/private/vk_render_target.cxx -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_render_target.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include "vk_include.hxx" 6 | 7 | namespace ice::render::vk 8 | { 9 | 10 | } // namespace ice::render::vk 11 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_renderpass.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/code/modules/vulkan_renderer/private/vk_renderpass.cxx -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_renderpass.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | #include "vk_include.hxx" 8 | 9 | namespace ice::render::vk 10 | { 11 | 12 | class VulkanRenderPass final 13 | { 14 | public: 15 | VulkanRenderPass( 16 | VkRenderPass vk_renderpass, 17 | VkDevice vk_device 18 | ) noexcept; 19 | ~VulkanRenderPass() noexcept = default; 20 | 21 | private: 22 | VkRenderPass _vk_renderpass; 23 | VkDevice _vk_device; 24 | }; 25 | 26 | } // namespace ice::render::vk 27 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_resource_allocator.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/code/modules/vulkan_renderer/private/vk_resource_allocator.cxx -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_resource_allocator.hxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/code/modules/vulkan_renderer/private/vk_resource_allocator.hxx -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_resource_set.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/code/modules/vulkan_renderer/private/vk_resource_set.cxx -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_resource_set.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include "vk_include.hxx" 6 | 7 | namespace ice::render::vk 8 | { 9 | 10 | } // namespace ice::render::vk 11 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_resource_set_layout.cxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/code/modules/vulkan_renderer/private/vk_resource_set_layout.cxx -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_resource_set_layout.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include "vk_include.hxx" 6 | 7 | namespace ice::render::vk 8 | { 9 | 10 | } // namespace ice::render::vk 11 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/private/vk_shader_asset.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | namespace ice::render::vk 12 | { 13 | 14 | struct VkShaderAssetModule : ice::Module 15 | { 16 | static void v1_archive_api(ice::detail::asset_system::v1::AssetArchiveAPI& api) noexcept; 17 | 18 | static bool on_load(ice::Allocator& alloc, ice::ModuleNegotiator auto const& negotiator) noexcept 19 | { 20 | return negotiator.register_api(v1_archive_api); 21 | } 22 | 23 | IS_WORKAROUND_MODULE_INITIALIZATION(VkShaderAssetModule); 24 | }; 25 | 26 | } // namespace ice::render::vk 27 | -------------------------------------------------------------------------------- /source/code/modules/vulkan_renderer/vulkan_renderer.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2021 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'vulkan_renderer' 7 | .Kind = .Kind_SharedLib 8 | .Group = 'Modules' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/modules/vulkan_renderer' 11 | .Requires = { 'SDK-Vulkan' } 12 | 13 | .Private = 14 | [ 15 | .Modules = { 16 | 'vulkan_memory_allocator' 17 | } 18 | .Uses = { 19 | 'platform' 20 | 'render_system' 21 | } 22 | ] 23 | 24 | .Win32_Libs = 25 | [ 26 | .Name = 'Win32-Shader-Compiler' 27 | .Requires = { 'SDK-Windows-10' } 28 | .Public = 29 | [ 30 | .Modules = { 31 | 'arctic' 32 | } 33 | .Libs = { 34 | 'shaderc_shared' 35 | } 36 | ] 37 | ] 38 | .Rules = { .Win32_Libs } 39 | ] 40 | .Projects + .Project 41 | -------------------------------------------------------------------------------- /source/code/modules/webgpu_renderer/private/webgpu_buffer.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include "webgpu_utils.hxx" 6 | #include 7 | #include 8 | 9 | namespace ice::render::webgpu 10 | { 11 | 12 | struct WebGPUBuffer 13 | { 14 | WGPUBuffer wgpu_buffer; 15 | ice::u32 size; 16 | 17 | static auto handle(WebGPUBuffer* native) noexcept 18 | { 19 | return static_cast(reinterpret_cast(native)); 20 | } 21 | 22 | static auto native(ice::render::Buffer handle) noexcept 23 | { 24 | return reinterpret_cast(static_cast(handle)); 25 | } 26 | }; 27 | 28 | } // namespace ice::render::webgpu 29 | -------------------------------------------------------------------------------- /source/code/modules/webgpu_renderer/private/webgpu_framebuffer.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include "webgpu_utils.hxx" 8 | #include "webgpu_image.hxx" 9 | 10 | namespace ice::render::webgpu 11 | { 12 | 13 | struct WebGPUFrameBuffer 14 | { 15 | ice::Array _images; 16 | 17 | WebGPUFrameBuffer(ice::Array&& images) noexcept 18 | : _images{ ice::move(images) } 19 | { 20 | 21 | } 22 | 23 | static auto handle(WebGPUFrameBuffer* native) noexcept 24 | { 25 | return static_cast(reinterpret_cast(native)); 26 | } 27 | 28 | static auto native(ice::render::Framebuffer handle) noexcept 29 | { 30 | return reinterpret_cast(static_cast(handle)); 31 | } 32 | }; 33 | 34 | } // namespace ice::render::webgpu 35 | -------------------------------------------------------------------------------- /source/code/modules/webgpu_renderer/private/webgpu_shader_asset.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | namespace ice::render::vk 11 | { 12 | 13 | struct WebGPUShaderAssetModule : ice::Module 14 | { 15 | static ice::ResourceCompiler API_ShaderCompiler; 16 | 17 | static void v1_archive_api(ice::detail::asset_system::v1::AssetArchiveAPI& api) noexcept; 18 | 19 | static bool on_load(ice::Allocator& alloc, ice::ModuleNegotiator auto const& negotiator) noexcept 20 | { 21 | return negotiator.register_api(v1_archive_api); 22 | } 23 | 24 | IS_WORKAROUND_MODULE_INITIALIZATION(WebGPUShaderAssetModule); 25 | }; 26 | 27 | } // namespace ice::render::vk 28 | -------------------------------------------------------------------------------- /source/code/modules/webgpu_renderer/private/webgpu_utils.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | #include 8 | #include 9 | #undef assert 10 | 11 | namespace ice::render::webgpu 12 | { 13 | 14 | constexpr ice::LogTagDefinition LogTag_WebGPU = ice::create_log_tag(ice::LogTag::Module, "WebGPU"); 15 | 16 | #define ICE_LOG_WGPU(severity, message, ...) \ 17 | ICE_LOG(severity, ice::render::webgpu::LogTag_WebGPU, message, __VA_ARGS__) 18 | 19 | } // namespace ice::render::webgpu 20 | -------------------------------------------------------------------------------- /source/code/modules/webgpu_renderer/webgpu_renderer.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2021 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'webgpu_renderer' 7 | .Kind = .Kind_ObjectList 8 | .Group = 'Modules' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/modules/webgpu_renderer' 11 | .Requires = { 'SDK-WebAsm' } 12 | 13 | .Private = 14 | [ 15 | .Uses = { 16 | 'platform' 17 | 'render_system' 18 | } 19 | ] 20 | 21 | .Public = 22 | [ 23 | .Libs = { 24 | 'webgpu' 25 | } 26 | ] 27 | ] 28 | .Projects + .Project 29 | -------------------------------------------------------------------------------- /source/code/platforms/application/application.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2020 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'application' 7 | .Kind = .Kind_StaticLib 8 | .Group = 'Platforms' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/platforms/application' 11 | 12 | ; We don't allow unity builds so we can use 'StaticLib' linking behavior and only link undefined app methods. 13 | .AllowUnityBuilds = false 14 | 15 | .Public = 16 | [ 17 | .Uses = { 18 | 'collections' 19 | 'utils' 20 | } 21 | ] 22 | ] 23 | .Projects + .Project 24 | -------------------------------------------------------------------------------- /source/code/platforms/application/private/app_args.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | 6 | void ice_args( 7 | ice::Allocator& alloc, 8 | ice::Params& params, 9 | ice::app::Config& config 10 | ) noexcept 11 | { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /source/code/platforms/application/private/app_info.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | 6 | namespace ice::app 7 | { 8 | 9 | auto version() noexcept -> ice::app::Version 10 | { 11 | return { .major = 0, .minor = 0, .patch = 0, .build = 0, .commit = { 0, 0, 0, 0, 0 } }; 12 | } 13 | 14 | auto name() noexcept -> ice::String 15 | { 16 | return { "iceshard-application" }; 17 | } 18 | 19 | } // namespace ice::app 20 | -------------------------------------------------------------------------------- /source/code/platforms/application/private/app_init.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | 6 | void ice_init( 7 | ice::Allocator& alloc, 8 | ice::app::Factories& factories 9 | ) noexcept 10 | { 11 | factories.factory_config = [](ice::Allocator&) noexcept -> ice::UniquePtr { return {}; }; 12 | factories.factory_state = [](ice::Allocator&) noexcept -> ice::UniquePtr { return {}; }; 13 | factories.factory_runtime = [](ice::Allocator&) noexcept -> ice::UniquePtr { return {}; }; 14 | } 15 | -------------------------------------------------------------------------------- /source/code/platforms/application/private/app_resume.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | 6 | auto ice_resume( 7 | ice::app::Config const& config, 8 | ice::app::State& state, 9 | ice::app::Runtime& runtime 10 | ) noexcept -> ice::Result 11 | { 12 | return ice::app::S_ApplicationUpdate; 13 | } 14 | -------------------------------------------------------------------------------- /source/code/platforms/application/private/app_setup.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | 6 | auto ice_setup( 7 | ice::Allocator& alloc, 8 | ice::app::Config& config, 9 | ice::app::State& state 10 | ) noexcept -> ice::Result 11 | { 12 | return ice::app::S_ApplicationResume; 13 | } 14 | -------------------------------------------------------------------------------- /source/code/platforms/application/private/app_shutdown.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | 6 | auto ice_shutdown( 7 | ice::Allocator& alloc, 8 | ice::app::Config const& config, 9 | ice::app::State& state 10 | ) noexcept -> ice::Result 11 | { 12 | return ice::S_Success; 13 | } 14 | -------------------------------------------------------------------------------- /source/code/platforms/application/private/app_suspend.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | 6 | auto ice_suspend( 7 | ice::app::Config const& config, 8 | ice::app::State& state, 9 | ice::app::Runtime& runtime 10 | ) noexcept -> ice::Result 11 | { 12 | return ice::app::S_ApplicationExit; 13 | } 14 | -------------------------------------------------------------------------------- /source/code/platforms/application/private/app_update.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | 6 | auto ice_update( 7 | ice::app::Config const& config, 8 | ice::app::State const& state, 9 | ice::app::Runtime& runtime 10 | ) noexcept -> ice::Result 11 | { 12 | return ice::app::S_ApplicationExit; 13 | } 14 | -------------------------------------------------------------------------------- /source/code/platforms/application/public/ice/app_info.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::app 8 | { 9 | 10 | struct Version 11 | { 12 | ice::u16 major; 13 | ice::u16 minor; 14 | ice::u32 patch; 15 | ice::u32 build; 16 | ice::u64 commit[5]; 17 | }; 18 | 19 | auto version() noexcept -> ice::app::Version; 20 | auto name() noexcept -> ice::String; 21 | 22 | auto location() noexcept -> ice::String; 23 | 24 | auto directory() noexcept -> ice::String; 25 | 26 | auto workingdir() noexcept -> ice::String; 27 | 28 | } // namespace ice::app 29 | -------------------------------------------------------------------------------- /source/code/platforms/platform/platform.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'platform' 7 | .Kind = .Kind_HeaderOnly 8 | .BaseDir = '$WorkspaceCodeDir$/platforms/platform' 9 | .Group = 'Platforms' 10 | 11 | .Public = 12 | [ 13 | .Uses = { 14 | 'math' 15 | 'input_system' 16 | 'render_system' 17 | 'modules' 18 | 'utils' 19 | } 20 | ] 21 | ] 22 | .Projects + .Project 23 | -------------------------------------------------------------------------------- /source/code/platforms/platform/public/ice/platform_vitals.hxx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/code/platforms/platform/public/ice/platform_vitals.hxx -------------------------------------------------------------------------------- /source/code/platforms/platform/public/ice/platform_window_surface.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | namespace ice::platform 11 | { 12 | 13 | class WindowSurface 14 | { 15 | public: 16 | virtual ~WindowSurface() noexcept = default; 17 | 18 | virtual bool query_details( 19 | ice::render::SurfaceInfo& surface_info_out 20 | ) const noexcept = 0; 21 | 22 | virtual auto render_driver() const noexcept -> ice::render::RenderDriverAPI = 0; 23 | 24 | virtual auto dimensions() const noexcept -> ice::vec2u = 0; 25 | }; 26 | 27 | auto create_window_surface( 28 | ice::Allocator& alloc, 29 | ice::render::RenderDriverAPI driver_api 30 | ) noexcept -> ice::UniquePtr; 31 | 32 | } // namespace ice::platform 33 | -------------------------------------------------------------------------------- /source/code/platforms/platform_android/platform_android.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'platform_android' 7 | .Kind = .Kind_ObjectList 8 | .BaseDir = '$WorkspaceCodeDir$/platforms/platform_android' 9 | .Group = 'Platforms' 10 | 11 | .Requires = { 'SDK-Android' } 12 | 13 | .Public = 14 | [ 15 | .Uses = { 16 | 'application' 17 | 'platform' 18 | 'utils' 19 | 'tasks' 20 | } 21 | ] 22 | ] 23 | .Projects + .Project 24 | -------------------------------------------------------------------------------- /source/code/platforms/platform_android/private/android_app_info.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | 6 | namespace ice::app 7 | { 8 | 9 | auto location() noexcept -> ice::String 10 | { 11 | // TODO: Deprecate or return a valid value 12 | return {}; 13 | } 14 | 15 | auto directory() noexcept -> ice::String 16 | { 17 | // TODO: Deprecate or return a valid value 18 | return {}; 19 | } 20 | 21 | auto workingdir() noexcept -> ice::String 22 | { 23 | // TODO: Deprecate or return a valid value 24 | return {}; 25 | } 26 | 27 | } // namespace ice::app 28 | -------------------------------------------------------------------------------- /source/code/platforms/platform_android/private/android_input_motion.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | 9 | namespace ice::platform::android 10 | { 11 | 12 | static constexpr ice::ErrorCode S_ButtonActionIgnored{ "S.1100:Android:Motion ButtonAction ignored" }; 13 | static constexpr ice::ErrorCode S_HooverActionIgnored{ "S.1101:Android:Motion HooverAction ignored" }; 14 | 15 | auto handle_android_motion_event( 16 | AInputEvent const* input_event, 17 | ice::input::DeviceEventQueue& out_events 18 | ) noexcept -> ice::Result; 19 | 20 | } // namespace ice::platform::android 21 | -------------------------------------------------------------------------------- /source/code/platforms/platform_android/private/android_render_surface.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2024, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace ice::platform::android 9 | { 10 | 11 | class AndroidRenderSurface final : public ice::platform::RenderSurface 12 | { 13 | public: 14 | AndroidRenderSurface() noexcept; 15 | 16 | bool valid() const noexcept { return _native_window != nullptr; } 17 | 18 | void set_native_window(ANativeWindow* window) noexcept; 19 | 20 | auto create(ice::platform::RenderSurfaceParams surface_params) noexcept -> ice::Result override; 21 | auto get_dimensions() const noexcept -> ice::vec2u override; 22 | bool get_surface(ice::render::SurfaceInfo& out_surface_info) noexcept override; 23 | void destroy() noexcept override; 24 | 25 | private: 26 | ANativeWindow* _native_window; 27 | }; 28 | 29 | } // namespace ice::platform::android 30 | -------------------------------------------------------------------------------- /source/code/platforms/platform_webasm/platform_webasm.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'platform_webasm' 7 | .Kind = .Kind_ObjectList 8 | .BaseDir = '$WorkspaceCodeDir$/platforms/platform_webasm' 9 | .Group = 'Platforms' 10 | 11 | .Requires = { 'SDK-WebAsm' } 12 | 13 | .Public = 14 | [ 15 | .Uses = { 16 | 'application' 17 | 'platform' 18 | 'utils' 19 | 'tasks' 20 | } 21 | ] 22 | ] 23 | .Projects + .Project 24 | -------------------------------------------------------------------------------- /source/code/platforms/platform_webasm/private/webasm_include.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #undef assert 9 | -------------------------------------------------------------------------------- /source/code/platforms/platform_webasm/private/webasm_inputs.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace ice::platform::webasm 9 | { 10 | 11 | using ice::input::KeyboardKey; 12 | using ice::input::KeyboardMod; 13 | 14 | auto webasm_map_keycode(char const* code, char const* key, bool& out_text_event) noexcept -> ice::input::KeyboardKey; 15 | 16 | } // namespace ice::platform::webasm 17 | -------------------------------------------------------------------------------- /source/code/platforms/platform_webasm/private/webasm_main.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include "webasm_app.hxx" 5 | #include 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | struct WebAsmLog : ice::Module 12 | { 13 | IS_WORKAROUND_MODULE_INITIALIZATION(WebAsmLog); 14 | }; 15 | 16 | void wasm_app_main(void* userdata) { 17 | ice::platform::webasm::WebAsmApp* app = reinterpret_cast(userdata); 18 | app->main_update(); 19 | } 20 | 21 | int main() { 22 | static ice::platform::webasm::WebAsmApp app{}; 23 | emscripten_set_main_loop_arg(wasm_app_main, &app, 0, true); 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /source/code/platforms/platform_webasm/private/webasm_render_surface.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | #include "webasm_include.hxx" 9 | 10 | namespace ice::platform::webasm 11 | { 12 | 13 | class WebASM_RenderSurface : public ice::platform::RenderSurface 14 | { 15 | public: 16 | auto create(ice::platform::RenderSurfaceParams surface_params) noexcept -> ice::Result override; 17 | auto get_dimensions() const noexcept -> ice::vec2u override; 18 | bool get_surface(ice::render::SurfaceInfo& out_surface_info) noexcept override; 19 | void destroy() noexcept override; 20 | 21 | private: 22 | bool _initialized = false; 23 | }; 24 | 25 | } // namespace ice::platform::webasm 26 | -------------------------------------------------------------------------------- /source/code/platforms/platform_win32/platform_win32.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'platform_win32' 7 | .Kind = .Kind_ObjectList 8 | .BaseDir = '$WorkspaceCodeDir$/platforms/platform_win32' 9 | .Group = 'Platforms' 10 | 11 | .Requires = { 'SDK-Windows-10' } 12 | 13 | .Private = 14 | [ 15 | .Uses = { 16 | 'application' 17 | 'platform' 18 | 'utils' 19 | 'tasks' 20 | } 21 | ] 22 | 23 | .Public = 24 | [ 25 | .Modules = { 26 | 'sdl2' 27 | } 28 | ] 29 | ] 30 | .Projects + .Project 31 | -------------------------------------------------------------------------------- /source/code/platforms/platform_win32/private/win32_sdl2_platform_render_surface.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | #undef main 9 | 10 | namespace ice::platform::win32::sdl2 11 | { 12 | 13 | class RenderSurface_Win32SDL2 final : public RenderSurface 14 | { 15 | public: 16 | RenderSurface_Win32SDL2() noexcept; 17 | ~RenderSurface_Win32SDL2() noexcept; 18 | 19 | auto create(ice::platform::RenderSurfaceParams surface_params) noexcept -> ice::Result override; 20 | auto get_dimensions() const noexcept -> ice::vec2u override { return {}; } 21 | bool get_surface(ice::render::SurfaceInfo& out_surface_info) noexcept override; 22 | void destroy() noexcept override; 23 | 24 | private: 25 | ice::render::RenderDriverAPI _render_driver; 26 | SDL_Window* _window; 27 | }; 28 | 29 | } // namespace ice::platform::win32::sdl2 30 | -------------------------------------------------------------------------------- /source/code/platforms/platform_win32/private/win32_sdl2_utils.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #undef main 8 | 9 | namespace ice::platform::win32::sdl2 10 | { 11 | 12 | void mouse_input_events( 13 | ice::input::DeviceEventQueue& input_queue, 14 | SDL_Event const& sdl_event 15 | ) noexcept; 16 | 17 | void keyboard_input_events( 18 | ice::input::DeviceEventQueue& input_queue, 19 | SDL_Event const& sdl_event 20 | ) noexcept; 21 | 22 | } // namespace ice::platform::sdl2 23 | -------------------------------------------------------------------------------- /source/code/systems/asset_system/asset_system.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2021 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'asset_system' 7 | .Kind = .Kind_StaticLib 8 | .Group = 'Systems' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/systems/asset_system' 11 | 12 | .Public = 13 | [ 14 | .Uses = { 15 | 'resource_system' 16 | } 17 | ] 18 | 19 | .Private = 20 | [ 21 | .Modules = { 22 | 'rapidjson' 23 | } 24 | .Uses = { 25 | 'utils' 26 | 'modules' 27 | 'devui' 28 | } 29 | // .CompilerFlags = { 30 | // '/wd4996' // RapidJson warnings 31 | // '/wd5054' // RapidJson warnings 32 | // } 33 | ] 34 | ] 35 | .Projects + .Project 36 | -------------------------------------------------------------------------------- /source/code/systems/asset_system/private/asset_module.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace ice 10 | { 11 | 12 | void load_asset_category_definitions( 13 | ice::Allocator& alloc, 14 | ice::ModuleRegister const& registry, 15 | ice::AssetCategoryArchive& asset_category_archive 16 | ) noexcept 17 | { 18 | ice::StackAllocator * 10> static_alloc{}; 19 | ice::Array api_ptrs{ static_alloc }; 20 | registry.query_apis(api_ptrs); 21 | 22 | for (ice::detail::asset_system::v1::AssetArchiveAPI const& api : api_ptrs) 23 | { 24 | api.fn_register_categories(asset_category_archive, registry); 25 | } 26 | } 27 | 28 | } // namespace ice 29 | -------------------------------------------------------------------------------- /source/code/systems/asset_system/private/asset_shelve_devui.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include "asset_shelve.hxx" 6 | 7 | namespace ice 8 | { 9 | 10 | class AssetShelve::DevUI : public ice::DevUIWidget 11 | { 12 | public: 13 | DevUI(ice::AssetShelve& shelve) noexcept; 14 | ~DevUI() noexcept; 15 | 16 | void build_content() noexcept override; 17 | 18 | private: 19 | ice::AssetShelve& _shelve; 20 | }; 21 | 22 | } // namespace ice 23 | -------------------------------------------------------------------------------- /source/code/systems/asset_system/private/asset_storage_devui.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include "asset_storage.hxx" 6 | #include "asset_shelve_devui.hxx" 7 | 8 | namespace ice 9 | { 10 | 11 | class DefaultAssetStorage::DevUI : public ice::DevUIWidget 12 | { 13 | public: 14 | DevUI( 15 | ice::Allocator& alloc, 16 | ice::DefaultAssetStorage& storage, 17 | ice::Array> shelves 18 | ) noexcept; 19 | ~DevUI() noexcept; 20 | 21 | void build_content() noexcept override; 22 | 23 | private: 24 | ice::DefaultAssetStorage& _storage; 25 | ice::Array> _shelves; 26 | }; 27 | 28 | } // namespace ice 29 | -------------------------------------------------------------------------------- /source/code/systems/asset_system/private/asset_types_internal.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2025 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | 9 | namespace ice 10 | { 11 | 12 | class AssetShelve; 13 | class AssetRequestAwaitable; 14 | class DefaultAssetStorage; 15 | 16 | struct AssetRequestResolver; 17 | struct AssetStateTransaction; 18 | 19 | } // namespace ice 20 | -------------------------------------------------------------------------------- /source/code/systems/asset_system/public/ice/asset_module.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace ice 9 | { 10 | 11 | void load_asset_category_definitions( 12 | ice::Allocator& alloc, 13 | ice::ModuleRegister const& registry, 14 | ice::AssetCategoryArchive& category_archive 15 | ) noexcept; 16 | 17 | namespace detail::asset_system::v1 18 | { 19 | 20 | using RegisterTypesFn = void (ice::AssetCategoryArchive&, ice::ModuleQuery const&) noexcept; 21 | 22 | struct AssetArchiveAPI 23 | { 24 | static constexpr ice::StringID Constant_APIName = "ice.asset-category-archive"_sid; 25 | static constexpr ice::u32 Constant_APIVersion = 1; 26 | 27 | RegisterTypesFn* fn_register_categories; 28 | }; 29 | 30 | } // detail::engine::v1 31 | 32 | } // namespace ice 33 | -------------------------------------------------------------------------------- /source/code/systems/asset_system/public/ice/asset_types.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | namespace ice 16 | { 17 | 18 | class AssetRequest; 19 | class AssetShelve; 20 | class AssetStorage; 21 | class AssetCategoryArchive; 22 | 23 | struct AssetHandle; 24 | struct AssetCategoryDefinition; 25 | struct AssetStateTrackers; 26 | struct AssetStateTransaction; 27 | 28 | enum class AssetRequestResult : ice::u8; 29 | enum class AssetState : ice::u8; 30 | 31 | } // namespace ice 32 | -------------------------------------------------------------------------------- /source/code/systems/font_system/font_system.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'font_system' 7 | .Kind = .Kind_StaticLib 8 | .Group = 'Systems' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/systems/font_system' 11 | 12 | .Public = 13 | [ 14 | .Uses = { 15 | 'math' 16 | 'asset_system' 17 | } 18 | ] 19 | ] 20 | .Projects + .Project 21 | -------------------------------------------------------------------------------- /source/code/systems/font_system/private/font.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | 6 | namespace ice 7 | { 8 | 9 | 10 | } // namespace ice::font 11 | -------------------------------------------------------------------------------- /source/code/systems/font_system/public/ice/font_utils.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace ice 9 | { 10 | 11 | struct Font; 12 | 13 | auto font_text_bounds( 14 | ice::Font const& font, 15 | ice::String text, 16 | ice::u32& out_glyph_count 17 | ) noexcept -> ice::vec2f; 18 | 19 | auto font_text_bounds( 20 | ice::Font const& font, 21 | ice::String text 22 | ) noexcept -> ice::vec2f; 23 | 24 | auto text_get_codepoint( 25 | char const* data, 26 | ice::u32& out_bytes 27 | ) noexcept -> ice::u32; 28 | 29 | } // namespace ice 30 | -------------------------------------------------------------------------------- /source/code/systems/input_system/input_system.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2021 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'input_system' 7 | .Kind = .Kind_StaticLib 8 | .Group = 'Systems' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/systems/input_system' 11 | 12 | .Public = 13 | [ 14 | .Uses = { 15 | 'core' 16 | 'memsys' 17 | 'collections' 18 | 'math' 19 | } 20 | ] 21 | ] 22 | .Projects + .Project 23 | -------------------------------------------------------------------------------- /source/code/systems/input_system/private/input_devices.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::input 8 | { 9 | 10 | auto create_mouse_device( 11 | ice::Allocator& alloc, 12 | ice::input::DeviceHandle device 13 | ) noexcept -> ice::input::InputDevice*; 14 | 15 | auto create_keyboard_device( 16 | ice::Allocator& alloc, 17 | ice::input::DeviceHandle device 18 | ) noexcept -> ice::input::InputDevice*; 19 | 20 | auto create_controller_device( 21 | ice::Allocator& alloc, 22 | ice::input::DeviceHandle device 23 | ) noexcept -> ice::input::InputDevice*; 24 | 25 | auto create_touchscreen_device( 26 | ice::Allocator& alloc, 27 | ice::input::DeviceHandle device 28 | ) noexcept -> ice::input::InputDevice*; 29 | 30 | } // namespace ice::input 31 | -------------------------------------------------------------------------------- /source/code/systems/input_system/public/ice/input/input_controller.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::input 8 | { 9 | 10 | enum class ControllerInput : ice::i16 11 | { 12 | Unknown = 0x0, 13 | 14 | ButtonA, 15 | ButtonB, 16 | ButtonX, 17 | ButtonY, 18 | ButtonUp, 19 | ButtonDown, 20 | ButtonLeft, 21 | ButtonRight, 22 | ButtonLeftShoulder, 23 | ButtonRightShoulder, 24 | 25 | LeftTrigger, 26 | RightTrigger, 27 | 28 | LeftAxisX, 29 | LeftAxisY, 30 | RightAxisX, 31 | RightAxisY, 32 | }; 33 | 34 | } // ice::input 35 | -------------------------------------------------------------------------------- /source/code/systems/input_system/public/ice/input/input_mouse.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::input 8 | { 9 | 10 | enum class MouseInput : ice::i16 11 | { 12 | Unknown, 13 | 14 | ButtonLeft, 15 | ButtonRight, 16 | ButtonMiddle, 17 | 18 | ButtonCustom0, 19 | ButtonCustom1, 20 | 21 | PositionX, 22 | PositionY, 23 | PositionXRelative, 24 | PositionYRelative, 25 | Wheel, 26 | }; 27 | 28 | } // ice::input 29 | -------------------------------------------------------------------------------- /source/code/systems/input_system/public/ice/input/input_types.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::input 8 | { 9 | 10 | struct DeviceEventQueue; 11 | struct InputEvent; 12 | 13 | class InputTracker; 14 | 15 | } // namespace ice::input 16 | -------------------------------------------------------------------------------- /source/code/systems/render_system/private/render_module.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2024, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include 5 | #include 6 | 7 | namespace ice::render 8 | { 9 | 10 | auto create_render_driver( 11 | ice::Allocator& alloc, 12 | ice::ModuleRegister& registry 13 | ) noexcept -> ice::UniquePtr 14 | { 15 | ice::render::detail::v1::RenderAPI render_api; 16 | if (registry.query_api(render_api)) 17 | { 18 | ice::render::RenderDriver* driver = render_api.create_driver_fn(alloc); 19 | return ice::make_unique(render_api.destroy_driver_fn, driver); 20 | } 21 | return { }; 22 | } 23 | 24 | } // namespace ice::render 25 | -------------------------------------------------------------------------------- /source/code/systems/render_system/public/ice/render/render_buffer.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::render 8 | { 9 | 10 | enum class Buffer : ice::uptr 11 | { 12 | Invalid = 0x0 13 | }; 14 | 15 | enum class BufferType : ice::u32 16 | { 17 | Uniform, 18 | Vertex, 19 | Index, 20 | Transfer, 21 | }; 22 | 23 | struct BufferUpdateInfo 24 | { 25 | ice::render::Buffer buffer; 26 | ice::Data data; 27 | ice::u32 offset; 28 | }; 29 | 30 | } // namespace ice::render 31 | -------------------------------------------------------------------------------- /source/code/systems/render_system/public/ice/render/render_fence.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::render 8 | { 9 | 10 | class RenderFence 11 | { 12 | protected: 13 | virtual ~RenderFence() noexcept = default; 14 | 15 | public: 16 | virtual bool wait(ice::u64 timeout_ns) noexcept = 0; 17 | virtual void reset() noexcept = 0; 18 | }; 19 | 20 | } // namespace ice::render 21 | -------------------------------------------------------------------------------- /source/code/systems/render_system/public/ice/render/render_framebuffer.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::render 8 | { 9 | 10 | enum class Framebuffer : ice::uptr 11 | { 12 | Invalid = 0x0 13 | }; 14 | 15 | } // namespace ice::render 16 | -------------------------------------------------------------------------------- /source/code/systems/render_system/public/ice/render/render_module.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2024, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace ice::render 9 | { 10 | 11 | class RenderDriver; 12 | 13 | namespace detail::v1 14 | { 15 | 16 | using CreateFn = auto (ice::Allocator&) noexcept -> ice::render::RenderDriver*; 17 | using DestroyFn = void (ice::render::RenderDriver*) noexcept; 18 | 19 | struct RenderAPI 20 | { 21 | static constexpr ice::StringID Constant_APIName = "ice.render-api"_sid; 22 | static constexpr ice::u32 Constant_APIVersion = 1; 23 | 24 | CreateFn* create_driver_fn; 25 | DestroyFn* destroy_driver_fn; 26 | }; 27 | 28 | } // namespace api 29 | 30 | auto create_render_driver( 31 | ice::Allocator& alloc, 32 | ice::ModuleRegister& registry 33 | ) noexcept -> ice::UniquePtr; 34 | 35 | } // namespace ice::render 36 | -------------------------------------------------------------------------------- /source/code/systems/render_system/public/ice/render/render_swapchain.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | namespace ice::render 9 | { 10 | 11 | class RenderSwapchain 12 | { 13 | protected: 14 | virtual ~RenderSwapchain() noexcept = default; 15 | 16 | public: 17 | virtual auto extent() const noexcept -> ice::vec2u = 0; 18 | 19 | virtual auto image_format() const noexcept -> ice::render::ImageFormat = 0; 20 | 21 | virtual auto image_count() const noexcept -> ice::u32 = 0; 22 | 23 | virtual auto image(ice::u32 index) const noexcept -> ice::render::Image = 0; 24 | 25 | virtual auto aquire_image() noexcept -> ice::u32 = 0; 26 | 27 | virtual auto current_image_index() const noexcept -> ice::u32 = 0; 28 | }; 29 | 30 | } // namespace ice::render 31 | -------------------------------------------------------------------------------- /source/code/systems/render_system/render_system.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'render_system' 7 | .Kind = .Kind_StaticLib 8 | .Group = 'Systems' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/systems/render_system' 11 | 12 | .Public = 13 | [ 14 | .Uses = { 15 | 'math' 16 | 'asset_system' 17 | 'modules' 18 | } 19 | ] 20 | ] 21 | .Projects + .Project 22 | -------------------------------------------------------------------------------- /source/code/systems/resource_system/private/resource_provider_filesystem_devui.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include "resource_provider_filesystem.hxx" 6 | 7 | namespace ice 8 | { 9 | 10 | class FileSystemResourceProvider::DevUI : public ice::DevUIWidget 11 | { 12 | public: 13 | DevUI(ice::HashMap const& resources) noexcept; 14 | ~DevUI() noexcept override; 15 | 16 | bool build_mainmenu(ice::DevUIWidgetState& state) noexcept override; 17 | 18 | void build_content() noexcept override; 19 | void build_resources_table(ice::u32 idx_start, ice::u32 idx_end) noexcept; 20 | 21 | private: 22 | ice::HashMap const& _resources; 23 | char _filter[128]; 24 | }; 25 | 26 | } // namespace ice 27 | -------------------------------------------------------------------------------- /source/code/systems/resource_system/private/resource_provider_hailstorm_devui.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include "resource_provider_hailstorm.hxx" 6 | 7 | #include 8 | #include 9 | 10 | namespace ice 11 | { 12 | 13 | class HailStormResourceProvider::DevUI : public ice::DevUIWidget 14 | { 15 | public: 16 | DevUI( 17 | ice::HeapString<> name, 18 | ice::HailStormResourceProvider const& provider 19 | ) noexcept; 20 | ~DevUI() noexcept override; 21 | 22 | bool build_mainmenu(ice::DevUIWidgetState& state) noexcept override; 23 | 24 | void build_content() noexcept override; 25 | void build_chunk_table() noexcept; 26 | void build_resources_table() noexcept; 27 | 28 | private: 29 | ice::HeapString<> const _name; 30 | ice::HailStormResourceProvider const& _provider; 31 | }; 32 | 33 | } // namespace ice 34 | -------------------------------------------------------------------------------- /source/code/systems/resource_system/private/resource_tracker_devui.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include "resource_tracker.hxx" 7 | 8 | namespace ice 9 | { 10 | 11 | class ResourceTrackerImplementation::DevUI : public ice::DevUIWidget 12 | { 13 | public: 14 | DevUI( 15 | ice::Allocator& alloc, 16 | ice::ResourceTrackerImplementation& tracker 17 | ) noexcept; 18 | ~DevUI() noexcept override; 19 | 20 | void build_content() noexcept override; 21 | 22 | protected: 23 | void build_resource_view() noexcept; 24 | 25 | private: 26 | ice::ResourceTrackerImplementation& _tracker; 27 | }; 28 | 29 | } // namespace ice 30 | -------------------------------------------------------------------------------- /source/code/systems/resource_system/public/ice/resource_compiler.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice 8 | { 9 | 10 | using ResourceCompiler = ice::api::resource_compiler::v1::ResourceCompilerAPI; 11 | 12 | } // namespace ice 13 | -------------------------------------------------------------------------------- /source/code/systems/resource_system/public/ice/resource_format.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2024 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice 8 | { 9 | 10 | static constexpr ice::u32 Constant_ResourceFormatMagic = 'ISRF'; 11 | static constexpr ice::u32 Constant_ResourceFormatVersion = 'V001'; 12 | 13 | struct ResourceFormatHeader 14 | { 15 | ice::u32 magic; 16 | ice::u32 version; 17 | 18 | ice::u32 name_size; 19 | ice::u32 meta_offset; 20 | ice::u32 meta_size; 21 | ice::u32 offset; 22 | ice::u32 size; 23 | }; 24 | 25 | } // namespace ice 26 | -------------------------------------------------------------------------------- /source/code/systems/resource_system/public/ice/resource_status.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice 8 | { 9 | 10 | enum class ResourceStatus : ice::u32 11 | { 12 | Invalid = 0x00'00, 13 | Available = 0x00'01, 14 | Loaded = 0x00'02, 15 | Loading = 0x01'00, 16 | Unloading = 0x02'00, 17 | 18 | // Enabled flag operators using the 'FlagType' concept. 19 | None = Invalid, 20 | All = Invalid | Available | Loaded | Loading | Unloading, 21 | }; 22 | 23 | } // namespace ice 24 | -------------------------------------------------------------------------------- /source/code/systems/resource_system/resource_system.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'resource_system' 7 | .Kind = .Kind_StaticLib 8 | .Group = 'Systems' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/systems/resource_system' 11 | 12 | .Public = 13 | [ 14 | .Uses = { 15 | 'collections' 16 | 'tasks' 17 | 'utils' 18 | 'devui' 19 | } 20 | 21 | .Modules = { 22 | 'hailstorm' 23 | } 24 | ] 25 | 26 | .Private = 27 | [ 28 | .Modules = { 29 | 'rapidjson' 30 | } 31 | // .CompilerFlags = { 32 | // '/wd4996' // RapidJson warnings 33 | // '/wd5054' // RapidJson warnings 34 | // } 35 | ] 36 | ] 37 | .Projects + .Project 38 | -------------------------------------------------------------------------------- /source/code/systems/resource_system/resource_system_tests.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'resource_system_tests' 7 | .Kind = .Kind_ConsoleApp 8 | .Group = 'Tests' 9 | .Requires = { 'Windows' } 10 | .Tags = { 'UnitTests' } 11 | 12 | .BaseDir = '$WorkspaceCodeDir$/systems/resource_system' 13 | 14 | .InputPaths = { 15 | 'tests' 16 | } 17 | .VStudioPaths = .InputPaths 18 | 19 | .Private = 20 | [ 21 | .Uses = { 22 | 'resource_system' 23 | } 24 | 25 | .Modules = { 26 | 'catch2' 27 | } 28 | ] 29 | 30 | .UnitTests = 31 | [ 32 | .Enabled = true 33 | ] 34 | ] 35 | .Projects + .Project 36 | -------------------------------------------------------------------------------- /source/code/systems/ui_system/public/ice/ui.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | namespace ice::ui 13 | { 14 | 15 | } // namespace ice::ui 16 | -------------------------------------------------------------------------------- /source/code/systems/ui_system/public/ice/ui_action.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | namespace ice::ui 11 | { 12 | 13 | enum class ActionType : ice::u16 14 | { 15 | None, 16 | Data, 17 | Shard, 18 | UIShow, 19 | }; 20 | 21 | struct ActionInfo 22 | { 23 | ice::ui::ActionType type; 24 | ice::u16 type_i; 25 | 26 | ice::ui::DataRef data; 27 | }; 28 | 29 | static_assert(sizeof(ActionInfo) == 8); 30 | 31 | } // namespace ice::ui 32 | -------------------------------------------------------------------------------- /source/code/systems/ui_system/public/ice/ui_asset.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | 9 | namespace ice::ui 10 | { 11 | 12 | static constexpr ice::AssetCategory AssetCategory_UIPage = ice::make_asset_category("ice/ui_system/page"); 13 | 14 | } // namespace ice::ui 15 | -------------------------------------------------------------------------------- /source/code/systems/ui_system/public/ice/ui_button.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | namespace ice::ui 12 | { 13 | 14 | struct ButtonInfo 15 | { 16 | ice::ui::DataRef text; 17 | ice::ui::DataRef font; 18 | 19 | ice::u16 action_on_click_i; 20 | }; 21 | 22 | auto button_get_font( 23 | ice::ui::PageInfo const& data, 24 | ice::ui::ButtonInfo const& button_info, 25 | ice::Span resources 26 | ) noexcept -> ice::Font const*; 27 | 28 | } // namespace ice::ui 29 | -------------------------------------------------------------------------------- /source/code/systems/ui_system/public/ice/ui_data_ref.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::ui 8 | { 9 | 10 | enum class DataSource : ice::u16 11 | { 12 | None, 13 | ValueConstant, 14 | ValueResource, 15 | ValueProperty, 16 | }; 17 | 18 | struct DataRef 19 | { 20 | ice::ui::DataSource source; 21 | ice::u16 source_i; 22 | }; 23 | 24 | static_assert(sizeof(DataRef) == 4); 25 | 26 | 27 | struct ConstantInfo 28 | { 29 | ice::u32 offset; 30 | ice::u32 size; 31 | }; 32 | 33 | 34 | template 35 | concept ElementWithText = requires(T t) 36 | { 37 | { t.text } -> std::convertible_to; 38 | }; 39 | 40 | template 41 | concept ElementWithFont = requires(T t) 42 | { 43 | { t.font } -> std::convertible_to; 44 | }; 45 | 46 | } // namespace ice::ui 47 | -------------------------------------------------------------------------------- /source/code/systems/ui_system/public/ice/ui_element_draw.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | 9 | namespace ice::ui 10 | { 11 | 12 | struct DrawData 13 | { 14 | ice::Span vertices; 15 | ice::Span colors; 16 | 17 | ice::u32 vertice_count; 18 | }; 19 | 20 | } // namespace ice::ui 21 | -------------------------------------------------------------------------------- /source/code/systems/ui_system/public/ice/ui_font.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::ui 8 | { 9 | 10 | struct FontInfo 11 | { 12 | ice::u32 font_name_offset; 13 | ice::u32 font_name_size; 14 | ice::u16 font_size; 15 | 16 | ice::u16 resource_i; 17 | }; 18 | 19 | } // namespace ice::ui 20 | -------------------------------------------------------------------------------- /source/code/systems/ui_system/public/ice/ui_label.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::ui 8 | { 9 | 10 | struct LabelInfo 11 | { 12 | ice::ui::DataRef text; 13 | ice::ui::DataRef font; 14 | }; 15 | 16 | } // namespace ice::ui 17 | -------------------------------------------------------------------------------- /source/code/systems/ui_system/public/ice/ui_resource.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::ui 8 | { 9 | 10 | enum class ResourceType : ice::u32 11 | { 12 | None, 13 | Font, 14 | String, 15 | Texture, 16 | }; 17 | 18 | struct ResourceInfo 19 | { 20 | ice::BaseStringID id; 21 | ice::ui::ResourceType type; 22 | ice::u32 type_data; 23 | }; 24 | 25 | struct UIResourceData 26 | { 27 | ice::ui::ResourceInfo info; 28 | void* location; 29 | }; 30 | 31 | } // namespace ice::ui 32 | -------------------------------------------------------------------------------- /source/code/systems/ui_system/public/ice/ui_shard.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::ui 8 | { 9 | 10 | struct ShardInfo 11 | { 12 | ice::ShardID shardid; 13 | }; 14 | 15 | } // namespace ice::ui 16 | -------------------------------------------------------------------------------- /source/code/systems/ui_system/ui_system.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'ui_system' 7 | .Kind = .Kind_StaticLib 8 | .Group = 'Systems' 9 | 10 | .BaseDir = '$WorkspaceCodeDir$/systems/ui_system' 11 | 12 | .Public = 13 | [ 14 | .Uses = { 15 | 'render_system' 16 | 'asset_system' 17 | 'input_system' 18 | 'font_system' 19 | 'modules' 20 | } 21 | ] 22 | ] 23 | .Projects + .Project 24 | -------------------------------------------------------------------------------- /source/code/test/test.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'test' 7 | .Kind = .Kind_ConsoleApp 8 | .Group = 'Tests' 9 | .Requires = { 'Windows' } 10 | 11 | .BaseDir = '$WorkspaceCodeDir$/test' 12 | 13 | .CopyModules = true 14 | 15 | .Private = 16 | [ 17 | .Modules = { 18 | 'imgui' 19 | 'assimp' 20 | } 21 | .Uses = { 22 | 'utils' 23 | 'tasks' 24 | 'modules' 25 | 'engine' 26 | 'framework_base' 27 | } 28 | ] 29 | 30 | .ReleaseDeploy = 31 | [ 32 | .Requires = { 'Release' } 33 | 34 | .Deploy = true 35 | .DependsOn = 36 | [ 37 | .Runtime = { 38 | 'shader_tools' 39 | 'vulkan_renderer' 40 | } 41 | ] 42 | ] 43 | .Rules = { .ReleaseDeploy } 44 | ] 45 | .Projects + .Project 46 | -------------------------------------------------------------------------------- /source/code/tools/asset_compiler/asset_compiler.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2020 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'asset_compiler' 7 | .Kind = .Kind_ConsoleApp 8 | .BaseDir = '$WorkspaceCodeDir$/tools/asset_compiler' 9 | .Group = 'Tools' 10 | 11 | .CopyModules = true 12 | 13 | .Requires = { 14 | 'Windows' 15 | } 16 | 17 | .LocalCompiler = 18 | [ 19 | .Name = 'isac' 20 | .LocalCompilerConfig = 'Release' 21 | ] 22 | 23 | .Private = 24 | [ 25 | .DependsOn = 26 | [ 27 | .Runtime = { 28 | 'shader_tools' 29 | } 30 | ] 31 | 32 | .Uses = { 33 | 'tool_base' 34 | 'resource_system' 35 | } 36 | ] 37 | ] 38 | .Projects + .Project 39 | -------------------------------------------------------------------------------- /source/code/tools/hsc_packer/hsc_packer.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'hsc_packer' 7 | .Kind = .Kind_ConsoleApp 8 | .BaseDir = '$WorkspaceCodeDir$/tools/hsc_packer' 9 | .Group = 'Tools' 10 | 11 | .CopyModules = true 12 | 13 | // The 'packer' tool can be used as a 'librarian' tool in data pipelines. 14 | .LocalCompiler = 15 | [ 16 | .Name = 'hscp' 17 | .Type = 'librarian' 18 | .LocalCompilerConfig = 'Release' 19 | ] 20 | 21 | .Requires = { 22 | 'Windows' 23 | } 24 | 25 | .Private = 26 | [ 27 | .Modules = { 28 | 'hailstorm' 29 | } 30 | 31 | .Uses = { 32 | 'resource_system' 33 | 'tool_base' 34 | } 35 | ] 36 | ] 37 | .Projects + .Project 38 | -------------------------------------------------------------------------------- /source/code/tools/hsc_packer/private/hsc_packer_app.cxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #include "hsc_packer_app.hxx" 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | auto hscp_process_directory(ice::Allocator& alloc, ice::String dir) noexcept -> ice::HeapString<> 12 | { 13 | ice::HeapString<> searched_utf8_path{ alloc, dir }; 14 | if (ice::path::is_absolute(dir) == false) 15 | { 16 | ice::string::clear(searched_utf8_path); 17 | ice::wide_to_utf8_append(ice::tool::path_current_directory(), searched_utf8_path); 18 | ice::string::push_back(searched_utf8_path, dir); 19 | } 20 | 21 | ice::path::normalize(searched_utf8_path); 22 | return searched_utf8_path; 23 | } 24 | -------------------------------------------------------------------------------- /source/code/tools/hsc_reader/hsc_reader.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2024, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'hsc_reader' 7 | .Kind = .Kind_ConsoleApp 8 | .BaseDir = '$WorkspaceCodeDir$/tools/hsc_reader' 9 | .Group = 'Tools' 10 | 11 | .CopyModules = true 12 | 13 | .Requires = { 14 | 'Windows' 15 | } 16 | 17 | .Private = 18 | [ 19 | .Modules = { 20 | 'hailstorm' 21 | } 22 | 23 | .Uses = { 24 | 'resource_system' 25 | 'tool_base' 26 | } 27 | ] 28 | ] 29 | .Projects + .Project 30 | -------------------------------------------------------------------------------- /source/code/tools/hsc_reader/private/hsc_reader_funcs.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | #include 7 | 8 | auto hailstorm_validate_header( 9 | hailstorm::HailstormHeaderBase const& header 10 | ) noexcept -> ice::i32; 11 | 12 | void hailstorm_print_headerinfo( 13 | hailstorm::HailstormHeader const& header 14 | ) noexcept; 15 | 16 | void hailstorm_print_chunkinfo( 17 | hailstorm::HailstormData const& header 18 | ) noexcept; 19 | 20 | void hailstorm_print_resourceinfo( 21 | hailstorm::HailstormData const& header 22 | ) noexcept; 23 | -------------------------------------------------------------------------------- /source/code/tools/tool_base/public/ice/tool.hxx: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | #pragma once 5 | #include 6 | 7 | namespace ice::tool 8 | { 9 | 10 | auto global_allocator() noexcept -> ice::Allocator&; 11 | 12 | auto path_current_directory() noexcept -> ice::native_file::HeapFilePath; 13 | 14 | auto path_make_absolute(ice::native_file::FilePath path) noexcept -> ice::native_file::HeapFilePath; 15 | 16 | } // namespace ice 17 | -------------------------------------------------------------------------------- /source/code/tools/tool_base/tool_base.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2023 - 2025, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'tool_base' 7 | .Kind = .Kind_ObjectList 8 | .BaseDir = '$WorkspaceCodeDir$/tools/tool_base' 9 | .Group = 'Tools' 10 | 11 | .CopyModules = true 12 | 13 | .Requires = { 14 | 'Windows' 15 | } 16 | 17 | .Private = 18 | [ 19 | .Uses = { 20 | 'resource_system' 21 | } 22 | ] 23 | ] 24 | .Projects + .Project 25 | -------------------------------------------------------------------------------- /source/configs/.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: LLVM 2 | 3 | AlignAfterOpenBracket: DontAlign 4 | 5 | AccessModifierOffset: -4 6 | AllowShortIfStatementsOnASingleLine: false 7 | BreakBeforeBraces: Allman 8 | ColumnLimit: 0 9 | 10 | Cpp11BracedListStyle: false 11 | BreakConstructorInitializers: BeforeComma 12 | 13 | PointerAlignment: Left 14 | DerivePointerAlignment: true 15 | 16 | SortIncludes: false 17 | SortUsingDeclarations: true 18 | 19 | SpaceAfterTemplateKeyword: false 20 | 21 | NamespaceIndentation: All 22 | FixNamespaceComments: true 23 | 24 | IndentPPDirectives: AfterHash 25 | IndentCaseLabels: false 26 | IndentWidth: 4 27 | TabWidth: 4 28 | 29 | ContinuationIndentWidth: 4 30 | -------------------------------------------------------------------------------- /source/configs/hscp_shaders.json: -------------------------------------------------------------------------------- 1 | { 2 | "filter": { 3 | "extensions": [".spv"] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /source/configs/test-renderdoc.cap: -------------------------------------------------------------------------------- 1 | { 2 | "rdocCaptureSettings": 1, 3 | "settings": { 4 | "autoStart": false, 5 | "commandLine": "", 6 | "environment": [ 7 | ], 8 | "executable": "E:\\projects\\cpp\\iceshard\\engine\\build\\bin\\Windows-x64-Develop-msvc-x64-v142\\test\\test.exe", 9 | "inject": false, 10 | "numQueuedFrames": 10, 11 | "options": { 12 | "allowFullscreen": true, 13 | "allowVSync": true, 14 | "apiValidation": false, 15 | "captureAllCmdLists": false, 16 | "captureCallstacks": false, 17 | "captureCallstacksOnlyDraws": false, 18 | "debugOutputMute": true, 19 | "delayForDebugger": 0, 20 | "hookIntoChildren": false, 21 | "refAllResources": false, 22 | "verifyBufferAccess": false 23 | }, 24 | "queuedFrameCap": 1, 25 | "workingDir": "E:/projects/cpp/iceshard/engine/build" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /source/data/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "render_drivers": 3 | { 4 | "vulkan": { 5 | "name": "Vulkan Driver", 6 | "resource": "vulkan_driver.dll" 7 | }, 8 | "none": { 9 | "name": "No Driver", 10 | "resource": "" 11 | } 12 | }, 13 | "render_driver": "vulkan" 14 | } 15 | -------------------------------------------------------------------------------- /source/data/config.json.isrm: -------------------------------------------------------------------------------- 1 | { 2 | "asset":{ 3 | "type": "Config", 4 | "name": "config" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /source/data/mesh/box/box.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/data/mesh/box/box.blend -------------------------------------------------------------------------------- /source/data/mesh/box/dbox.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/data/mesh/box/dbox.blend -------------------------------------------------------------------------------- /source/data/mesh/test/box.msh.isrm: -------------------------------------------------------------------------------- 1 | { 2 | "resource": { 3 | "meta": { 4 | "type": 0, 5 | "version": 0 6 | } 7 | }, 8 | "mesh": { 9 | "format": "json" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /source/data/shaders/arctic/test.arctic: -------------------------------------------------------------------------------- 1 | context Shader 2 | 3 | def Camera = struct [ 4 | view : mtx4f 5 | projection : mtx4f 6 | ] 7 | 8 | ctx 9 | { 10 | [in=0] 11 | let in_vertex : vec3f 12 | 13 | [in=1] 14 | let in_color : vec4f 15 | 16 | [out=0] 17 | let out_color : vec4f 18 | 19 | [constant] 20 | let camera : Camera 21 | } 22 | 23 | fn VertexMain() : VertexShader 24 | { 25 | out_color = in_color 26 | 27 | let pos : vec4f = camera.projection * camera.view * vec4f(in_vertex, 1) 28 | 29 | VertexMain = vec4f(pos.xy, 0, 1) 30 | } 31 | -------------------------------------------------------------------------------- /source/data/shaders/color/blue-frag.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (location = 0) in vec2 in_uv; 4 | 5 | layout (location = 0) out vec4 out_color; 6 | 7 | void main() 8 | { 9 | out_color = vec4(0.2, in_uv.x, in_uv.y, 1.0); 10 | } 11 | -------------------------------------------------------------------------------- /source/data/shaders/color/blue-frag.wgsl: -------------------------------------------------------------------------------- 1 | struct VertexOutput { 2 | @builtin(position) position: vec4, 3 | }; 4 | 5 | @fragment 6 | fn main(in: VertexOutput) -> @location(0) vec4 { 7 | return vec4(0.2, 0.2, 0.9, 1.0); 8 | } 9 | -------------------------------------------------------------------------------- /source/data/shaders/color/blue-vert.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (location = 0) in vec3 in_pos; 4 | layout (location = 1) in vec3 in_norm; 5 | layout (location = 2) in vec2 in_uv; 6 | layout (location = 3) in mat4 in_model; 7 | 8 | layout (location = 0) out vec2 out_uv; 9 | 10 | layout (std140, set = 0, binding = 0) uniform Camera 11 | { 12 | mat4 view; 13 | mat4 projection; 14 | mat4 clip; 15 | } cam; 16 | 17 | void main() 18 | { 19 | out_uv = in_uv; 20 | gl_Position = cam.clip * cam.projection * cam.view * in_model * vec4(in_pos, 1); 21 | } 22 | -------------------------------------------------------------------------------- /source/data/shaders/color/blue-vert.wgsl: -------------------------------------------------------------------------------- 1 | struct VertexInput { 2 | @location(0) position: vec2, 3 | }; 4 | 5 | struct VertexOutput { 6 | @builtin(position) position: vec4, 7 | }; 8 | 9 | @vertex 10 | fn main(in: VertexInput) -> VertexOutput { 11 | var out: VertexOutput; 12 | out.position = vec4(in.position, 0.0, 1.0); 13 | return out; 14 | } 15 | -------------------------------------------------------------------------------- /source/data/shaders/common.asl: -------------------------------------------------------------------------------- 1 | 2 | #[glsl:type="vec2"] 3 | #[wgsl:type="vec2"] 4 | def Vec1f native 5 | 6 | #[glsl:type="vec2"] 7 | #[wgsl:type="vec2"] 8 | def Vec2f native 9 | 10 | #[glsl:type="vec3"] 11 | #[wgsl:type="vec3"] 12 | def Vec3f native 13 | 14 | #[glsl:type="vec4"] 15 | #[wgsl:type="vec4"] 16 | def Vec4f native 17 | 18 | #[glsl:type="mat4"] 19 | #[wgsl:type="mat4x4"] 20 | def Mat4x4f native 21 | 22 | #[glsl:type="sampler"] 23 | #[wgsl:type="sampler"] 24 | def Sampler native 25 | 26 | #[glsl:type="texture2D"] 27 | #[wgsl:type="texture_2d"] 28 | def Texture2D native 29 | 30 | // Defines a texture sampling function 31 | fn sampleTexture( 32 | sampler : Sampler, 33 | texture : Texture2D, 34 | cords : Vec2f 35 | ) : Vec4f native 36 | -------------------------------------------------------------------------------- /source/data/shaders/debug/debug-frag.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (location = 0) in vec4 in_color; 4 | layout (location = 0) out vec4 out_color; 5 | 6 | void main() 7 | { 8 | out_color = in_color; 9 | } 10 | -------------------------------------------------------------------------------- /source/data/shaders/debug/debug-vert.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (location = 0) in vec3 in_pos; 4 | layout (location = 1) in vec4 in_color; 5 | 6 | layout (location = 0) out vec4 out_color; 7 | 8 | layout (std140, set = 0, binding = 0) uniform Camera 9 | { 10 | mat4 view; 11 | mat4 projection; 12 | } cam; 13 | 14 | void main() 15 | { 16 | out_color = in_color; 17 | 18 | vec4 pos = cam.projection * cam.view * vec4(in_pos, 1); 19 | gl_Position = vec4(pos.xy, 0, 1); 20 | } 21 | -------------------------------------------------------------------------------- /source/data/shaders/debug/font-debug-vert.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (location = 0) in vec2 in_pos; 4 | layout (location = 1) in vec2 in_uv; 5 | // layout (location = 2) in vec4 in_color; 6 | layout(push_constant) uniform push_const { vec2 scale; vec2 translate; } pc; 7 | 8 | layout (location = 0) out vec2 out_uv; 9 | // layout (location = 1) out vec4 out_color; 10 | 11 | void main() 12 | { 13 | out_uv = in_uv; 14 | // out_color = in_color; 15 | gl_Position = vec4(in_pos * pc.scale + pc.translate, 0, 1); 16 | } 17 | -------------------------------------------------------------------------------- /source/data/shaders/debug/font-vert.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (location = 0) in vec2 in_pos; 4 | layout (location = 1) in vec2 in_uv; 5 | // layout (location = 2) in vec4 in_color; 6 | layout(push_constant) uniform push_const { vec2 scale; vec2 translate; } pc; 7 | 8 | layout (location = 0) out vec2 out_uv; 9 | // layout (location = 1) out vec4 out_color; 10 | 11 | void main() 12 | { 13 | out_uv = in_uv; 14 | // out_color = in_color; 15 | gl_Position = vec4(in_pos * pc.scale + pc.translate, 0, 1); 16 | } 17 | -------------------------------------------------------------------------------- /source/data/shaders/debug/imgui-frag.asl: -------------------------------------------------------------------------------- 1 | 2 | import "shaders/debug/imgui" 3 | 4 | ctx 5 | { 6 | #[uniform, group=1, binding=1] 7 | let smp : Sampler native 8 | 9 | #[uniform, group=1, binding=2] 10 | let tex2d : Texture2D native 11 | } 12 | 13 | #[shader_main] 14 | #[shader_stage=fragment] 15 | fn main(in : VertexResult) : FragmentOut 16 | { 17 | main.color = in.color * sampleTexture(smp, tex2d, in.uv) 18 | } 19 | -------------------------------------------------------------------------------- /source/data/shaders/debug/imgui-vert.asl: -------------------------------------------------------------------------------- 1 | 2 | import "shaders/debug/imgui" 3 | 4 | struct Camera 5 | { 6 | vp : Mat4x4f 7 | } 8 | 9 | ctx 10 | { 11 | #[uniform, group = 0, binding = 3] 12 | let cam : Camera native 13 | } 14 | 15 | #[shader_main] 16 | #[shader_stage=vertex] 17 | fn main(in : VertexIn) : VertexResult 18 | { 19 | main.uv = in.uv 20 | main.color = in.color 21 | main.pos = cam.vp * Vec4f(in.pos, 0.0, 1.0) 22 | } 23 | -------------------------------------------------------------------------------- /source/data/shaders/debug/imgui.asl: -------------------------------------------------------------------------------- 1 | 2 | import "shaders/common" 3 | 4 | #[shader_stage=vertex] 5 | struct VertexIn 6 | { 7 | #[location=0] 8 | pos : Vec2f 9 | 10 | #[location=1] 11 | uv : Vec2f 12 | 13 | #[location=2] 14 | color : Vec4f 15 | } 16 | 17 | struct VertexResult 18 | { 19 | #[shader_stage=vertex] 20 | #[builtin=position] 21 | pos : Vec4f 22 | 23 | #[location=0] 24 | uv : Vec2f 25 | 26 | #[location=1] 27 | color : Vec4f 28 | } 29 | 30 | #[shader_stage=fragment] 31 | struct FragmentOut 32 | { 33 | #[location=0] 34 | color : Vec4f 35 | } 36 | -------------------------------------------------------------------------------- /source/data/shaders/debug/pp-frag.glsl.isrm: -------------------------------------------------------------------------------- 1 | { 2 | "resource": { 3 | "meta": { 4 | "type": 0, 5 | "version": 0 6 | } 7 | }, 8 | "shader": { 9 | "target": 1, 10 | "stage": 2 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /source/data/shaders/debug/pp-vert.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (location = 0) in vec2 in_pos; 4 | layout (location = 1) in vec2 in_uv; 5 | 6 | layout (location = 0) out vec2 out_uv; 7 | 8 | void main() 9 | { 10 | out_uv = in_uv; 11 | gl_Position = vec4(in_pos, 0, 1); 12 | } 13 | -------------------------------------------------------------------------------- /source/data/shaders/debug/pp-vert.glsl.isrm: -------------------------------------------------------------------------------- 1 | { 2 | "resource": { 3 | "meta": { 4 | "type": 0, 5 | "version": 0 6 | } 7 | }, 8 | "shader": { 9 | "target": 1, 10 | "stage": 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /source/data/shaders/debug/test-frag.glsl.isrm: -------------------------------------------------------------------------------- 1 | { 2 | "resource": { 3 | "meta": { 4 | "type": 0, 5 | "version": 0 6 | } 7 | }, 8 | "shader": { 9 | "target": 1, 10 | "stage": 2 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /source/data/shaders/debug/test-vert.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (location = 0) in vec3 in_pos; 4 | layout (location = 1) in vec3 in_norm; 5 | layout (location = 6) in mat4 in_model; 6 | layout (location = 10) in vec3 in_color; 7 | 8 | layout (location = 0) out vec4 out_color; 9 | layout (location = 1) out vec3 out_pos; 10 | layout (location = 2) out vec3 out_norm; 11 | 12 | layout (std140, binding = 0) uniform Camera 13 | { 14 | mat4 view; 15 | mat4 projection; 16 | mat4 clip; 17 | } cam; 18 | 19 | void main() 20 | { 21 | out_color = vec4(in_color, 1); 22 | out_pos = vec3(in_model * vec4(in_pos, 1)); 23 | out_norm = mat3(transpose(inverse(in_model))) * in_norm; 24 | gl_Position = cam.clip * cam.projection * cam.view * in_model * vec4(in_pos, 1); 25 | } 26 | -------------------------------------------------------------------------------- /source/data/shaders/debug/test-vert.glsl.isrm: -------------------------------------------------------------------------------- 1 | { 2 | "resource": { 3 | "meta": { 4 | "type": 0, 5 | "version": 0 6 | } 7 | }, 8 | "shader": { 9 | "target": 1, 10 | "stage": 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /source/data/shaders/debug/texture-frag.glsl.isrm: -------------------------------------------------------------------------------- 1 | { 2 | "resource": { 3 | "meta": { 4 | "type": 0, 5 | "version": 0 6 | } 7 | }, 8 | "shader": { 9 | "target": 1, 10 | "stage": 2 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /source/data/shaders/debug/texture-vert.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (location = 0) in vec3 in_pos; 4 | layout (location = 1) in vec3 in_norm; 5 | layout (location = 2) in vec2 in_uv; 6 | layout (location = 6) in mat4 in_model; 7 | 8 | layout (location = 0) out vec2 out_uv; 9 | layout (location = 1) out vec3 out_pos; 10 | layout (location = 2) out vec3 out_norm; 11 | 12 | layout (std140, set = 0, binding = 0) uniform Camera 13 | { 14 | mat4 view; 15 | mat4 projection; 16 | mat4 clip; 17 | } cam; 18 | 19 | void main() 20 | { 21 | out_uv = in_uv; 22 | out_pos = vec3(in_model * vec4(in_pos, 1)); 23 | out_norm = mat3(transpose(inverse(in_model))) * in_norm; 24 | gl_Position = cam.clip * cam.projection * cam.view * in_model * vec4(in_pos, 1); 25 | } 26 | -------------------------------------------------------------------------------- /source/data/shaders/debug/texture-vert.glsl.isrm: -------------------------------------------------------------------------------- 1 | { 2 | "resource": { 3 | "meta": { 4 | "type": 0, 5 | "version": 0 6 | } 7 | }, 8 | "shader": { 9 | "target": 1, 10 | "stage": 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /source/data/shaders/game2d/sprite-pix.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (location = 0) in vec2 in_uv; 4 | 5 | layout (location = 0) out vec4 out_color; 6 | 7 | layout(set = 0, binding = 1) uniform sampler default_sampler; 8 | layout(set = 1, binding = 2) uniform texture2D default_image; 9 | 10 | layout (std140, set = 1, binding = 3) uniform TilemapProps 11 | { 12 | float width_scale; 13 | float height_scale; 14 | } tilemap_props; 15 | 16 | 17 | void main() 18 | { 19 | //out_color = texture(sampler2D(default_image, default_sampler), in_uv.st); 20 | out_color = texture(sampler2D(default_image, default_sampler), in_uv.st * vec2(tilemap_props.width_scale, tilemap_props.height_scale)).rgba; 21 | } 22 | -------------------------------------------------------------------------------- /source/data/shaders/game2d/sprite-vtx.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (location = 0) in vec2 in_pos; 4 | layout (location = 1) in vec2 in_uv; 5 | 6 | layout (location = 2) in vec3 in_offset; 7 | layout (location = 3) in vec2 in_scale; 8 | //layout (location = 3) in float in_angle; 9 | layout (location = 4) in int in_mat_x; 10 | layout (location = 5) in int in_mat_y; 11 | 12 | layout (location = 0) out vec2 out_uv; 13 | // layout (location = 1) out int out_mat_x; 14 | // layout (location = 2) out int out_mat_y; 15 | 16 | layout (std140, set = 0, binding = 0) uniform Camera 17 | { 18 | mat4 view; 19 | mat4 projection; 20 | } cam; 21 | 22 | void main() 23 | { 24 | // out_mat_x = in_mat_x; 25 | // out_mat_y = in_mat_y; 26 | out_uv = in_uv + vec2(in_mat_x, in_mat_y); 27 | 28 | vec3 pos = vec3(in_pos, 0) + in_offset; 29 | gl_Position = cam.projection * cam.view * vec4(pos, 1); 30 | } 31 | -------------------------------------------------------------------------------- /source/data/shaders/game2d/tiled-pix.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (location = 0) in vec2 in_uv; 4 | layout (location = 1) flat in uint in_mat; 5 | 6 | layout (location = 0) out vec4 out_color; 7 | 8 | layout(set = 0, binding = 2) uniform sampler default_sampler; 9 | layout(set = 1, binding = 3) uniform texture2D default_image[4]; 10 | 11 | layout (std140, set = 1, binding = 4) uniform TilemapProps 12 | { 13 | vec2 tile_scale; 14 | vec2 tile_size; 15 | } tilemap_props[4]; 16 | 17 | void main() 18 | { 19 | vec4 tex_color = texture(sampler2D(default_image[in_mat], default_sampler), in_uv.st * tilemap_props[in_mat].tile_scale); 20 | out_color = tex_color.rgba; 21 | } 22 | -------------------------------------------------------------------------------- /source/data/shaders/hlsl/test-frag.cso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/data/shaders/hlsl/test-frag.cso -------------------------------------------------------------------------------- /source/data/shaders/hlsl/test-frag.hlsl: -------------------------------------------------------------------------------- 1 | 2 | float4 PixelShaderFunction() : SV_Target 3 | { 4 | return float4(1, 0, 0, 1); 5 | } 6 | -------------------------------------------------------------------------------- /source/data/shaders/hlsl/test-vert.cso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iceshard-engine/engine/3baf9be27c02384f38433571f49c2d5e20b2d158/source/data/shaders/hlsl/test-vert.cso -------------------------------------------------------------------------------- /source/data/shaders/hlsl/test-vert.hlsl: -------------------------------------------------------------------------------- 1 | 2 | float4x4 WorldViewProjection; 3 | float4 VertexShaderFunction(float4 inputPosition : POSITION) : POSITION 4 | { 5 | return mul(inputPosition, WorldViewProjection); 6 | } 7 | -------------------------------------------------------------------------------- /source/data/shaders/isometric/texture-frag.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (location = 0) in vec2 in_uv; 4 | layout (location = 1) in vec3 in_pos; 5 | layout (location = 2) in vec3 in_norm; 6 | 7 | layout (location = 0) out vec4 out_color; 8 | 9 | layout(set = 2, binding = 0) uniform sampler default_sampler; 10 | 11 | layout(set = 3, binding = 3) uniform texture2D diffuse_image; 12 | 13 | void main() 14 | { 15 | float ambient_strength = 0.8; 16 | vec3 ambient = ambient_strength * vec3(0.8, 0.8, 0.8); 17 | 18 | vec4 color = texture(sampler2D(diffuse_image, default_sampler), in_uv.st); 19 | 20 | out_color = vec4(ambient, 1.0f) * color; 21 | } 22 | -------------------------------------------------------------------------------- /source/data/shaders/isometric/texture-frag.glsl.isrm: -------------------------------------------------------------------------------- 1 | { 2 | "resource": { 3 | "meta": { 4 | "type": 0, 5 | "version": 0 6 | } 7 | }, 8 | "shader": { 9 | "target": 1, 10 | "stage": 2 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /source/data/shaders/isometric/texture-vert.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (location = 0) in vec3 in_pos; 4 | layout (location = 1) in vec3 in_norm; 5 | layout (location = 2) in vec2 in_uv; 6 | 7 | layout (location = 6) in vec2 in_model; 8 | layout (location = 7) in uvec2 in_tile; 9 | 10 | layout (location = 0) out vec2 out_uv; 11 | layout (location = 1) out vec3 out_pos; 12 | layout (location = 2) out vec3 out_norm; 13 | 14 | layout (std140, set = 0, binding = 0) uniform Camera 15 | { 16 | mat4 view; 17 | mat4 projection; 18 | mat4 clip; 19 | } cam; 20 | 21 | vec2 tile_uv = vec2(16.0 / 368.0, 16.0 / 224.0); 22 | 23 | void main() 24 | { 25 | out_uv = (vec2(in_tile) + in_uv) * tile_uv; 26 | out_pos = vec3(in_model, 0) + in_pos; 27 | out_norm = in_norm; 28 | gl_Position = cam.clip * cam.projection * cam.view * vec4(out_pos, 1); 29 | } 30 | -------------------------------------------------------------------------------- /source/data/shaders/isometric/texture-vert.glsl.isrm: -------------------------------------------------------------------------------- 1 | { 2 | "resource": { 3 | "meta": { 4 | "type": 0, 5 | "version": 0 6 | } 7 | }, 8 | "shader": { 9 | "target": 1, 10 | "stage": 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /source/data/shaders/shaders.bff: -------------------------------------------------------------------------------- 1 | /// Copyright 2022 - 2022, Dandielo 2 | /// SPDX-License-Identifier: MIT 3 | 4 | .Project = 5 | [ 6 | .Name = 'data' 7 | .Kind = .Kind_StaticLib 8 | .Group = 'Data/Shaders' 9 | 10 | .BaseDir = '$WorkspaceRoot$/source' // We should just use '/data' 11 | .InputPaths = { 'data' } // And only input 'shaders' 12 | .IncludePaths = { 'data' } 13 | 14 | .Requires = { 'GameAssets' } 15 | .Tags = { 'AssetPipeline' } 16 | 17 | .Public = 18 | [ 19 | .BuildOptions = '-b $BaseDir$/data' 20 | ] 21 | ] 22 | .Projects + .Project 23 | -------------------------------------------------------------------------------- /source/data/shaders/terrain/terrain-frag.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (location = 0) in vec2 in_uv; 4 | layout (location = 1) in vec3 in_pos; 5 | layout (location = 2) in vec3 in_norm; 6 | 7 | layout (location = 0) out vec4 out_color; 8 | 9 | layout(set = 2, binding = 0) uniform sampler default_sampler; 10 | 11 | layout(set = 3, binding = 3) uniform texture2D diffuse_image; 12 | 13 | void main() 14 | { 15 | float ambient_strength = 0.8; 16 | vec3 ambient = ambient_strength * vec3(0.8, 0.8, 0.8); 17 | 18 | vec4 color = texture(sampler2D(diffuse_image, default_sampler), in_uv.st); 19 | 20 | out_color = vec4(ambient, 1.0f) * color; 21 | } 22 | -------------------------------------------------------------------------------- /source/data/shaders/terrain/terrain-hm-frag.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (location = 0) in vec3 in_norm; 4 | layout (location = 1) in float in_height; 5 | layout (location = 0) out vec4 out_color; 6 | 7 | void main() 8 | { 9 | const vec4 green = vec4( 0.2, 0.5, 0.1, 1.0 ); 10 | const vec4 brown = vec4( 0.6, 0.5, 0.3, 1.0 ); 11 | const vec4 white = vec4( 1.0 ); 12 | 13 | vec4 color = mix( green, brown, smoothstep( 0.0, 0.4, in_height ) ); 14 | color = mix( color, white, smoothstep( 0.6, 0.9, in_height ) ); 15 | 16 | float diffuse_light = max( 0.0, dot( in_norm, vec3(0.58) ) ); 17 | out_color = vec4( 0.05, 0.05, 0.0, 0.0 ) + diffuse_light * color; 18 | out_color.w = 1.0; 19 | } 20 | -------------------------------------------------------------------------------- /source/data/shaders/terrain/terrain-hm-geom.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout( triangles ) in; 4 | layout( location = 0 ) in float in_tess_height[]; 5 | 6 | layout (std140, set = 1, binding = 2) uniform Camera 7 | { 8 | mat4 view; 9 | mat4 projection; 10 | mat4 clip; 11 | } cam; 12 | 13 | layout(triangle_strip, max_vertices = 3) out; 14 | layout(location = 0) out vec3 out_geom_norm; 15 | layout(location = 1) out float out_geom_height; 16 | 17 | void main() 18 | { 19 | vec3 v0v1 = gl_in[1].gl_Position.xyz - gl_in[0].gl_Position.xyz; 20 | vec3 v0v2 = gl_in[2].gl_Position.xyz - gl_in[0].gl_Position.xyz; 21 | vec3 norm = normalize(cross(v0v1, v0v2)); 22 | 23 | for( int vertex = 0; vertex < 3; ++vertex ) 24 | { 25 | gl_Position = cam.clip * cam.projection * cam.view * gl_in[vertex].gl_Position; 26 | out_geom_height = in_tess_height[vertex]; 27 | out_geom_norm = norm; 28 | EmitVertex(); 29 | } 30 | 31 | EndPrimitive(); 32 | } 33 | -------------------------------------------------------------------------------- /source/data/shaders/terrain/terrain-hm-vert.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (location = 0) in vec3 in_pos; 4 | layout (location = 1) in vec3 in_norm; 5 | layout (location = 2) in vec2 in_uv; 6 | // layout (location = 3) in mat4 in_model; 7 | 8 | layout (location = 0) out vec2 out_uv; 9 | 10 | // layout (std140, set = 1, binding = 2) uniform Camera 11 | // { 12 | // mat4 view; 13 | // mat4 projection; 14 | // mat4 clip; 15 | // } cam; 16 | 17 | void main() 18 | { 19 | gl_Position = vec4(in_pos, 1); 20 | out_uv = in_uv; 21 | // gl_Position = cam.clip * cam.projection * cam.view * /*in_model **/ vec4(in_pos, 1); 22 | } 23 | -------------------------------------------------------------------------------- /source/data/shaders/terrain/terrain-vert.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (location = 0) in vec3 in_pos; 4 | layout (location = 1) in vec3 in_norm; 5 | layout (location = 2) in vec2 in_uv; 6 | 7 | layout (location = 6) in vec2 in_model; 8 | layout (location = 7) in uvec2 in_tile; 9 | 10 | layout (location = 0) out vec2 out_uv; 11 | layout (location = 1) out vec3 out_pos; 12 | layout (location = 2) out vec3 out_norm; 13 | 14 | layout (std140, set = 0, binding = 0) uniform Camera 15 | { 16 | mat4 view; 17 | mat4 projection; 18 | mat4 clip; 19 | } cam; 20 | 21 | vec2 tile_uv = vec2(16.0 / 368.0, 16.0 / 224.0); 22 | 23 | void main() 24 | { 25 | out_uv = (vec2(in_tile) + in_uv) * tile_uv; 26 | out_pos = vec3(in_model, 0) + in_pos; 27 | out_norm = in_norm; 28 | gl_Position = cam.clip * cam.projection * cam.view * vec4(out_pos, 1); 29 | } 30 | -------------------------------------------------------------------------------- /source/data/shaders/ui/ui-frag.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | // layout (location = 0) in vec2 in_uv; 4 | layout (location = 1) in vec4 in_color; 5 | 6 | layout (location = 0) out vec4 out_color; 7 | 8 | // layout(set = 0, binding = 1) uniform sampler default_sampler; 9 | // layout(set = 0, binding = 2) uniform texture2D default_image; 10 | 11 | void main() 12 | { 13 | out_color = in_color;// * texture(sampler2D(default_image, default_sampler), in_uv.st); 14 | } 15 | -------------------------------------------------------------------------------- /source/data/shaders/ui/ui-frag.glsl.isrm: -------------------------------------------------------------------------------- 1 | { 2 | "resource": { 3 | "meta": { 4 | "type": 0, 5 | "version": 0 6 | } 7 | }, 8 | "shader": { 9 | "target": 1, 10 | "stage": 2 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /source/data/shaders/ui/ui-vert.glsl: -------------------------------------------------------------------------------- 1 | #version 450 2 | 3 | layout (location = 0) in vec2 in_pos; 4 | // layout (location = 1) in vec2 in_uv; 5 | layout (location = 2) in vec4 in_color; 6 | layout(push_constant) uniform push_const { vec2 scale; vec2 translate; } pc; 7 | 8 | // layout (location = 0) out vec2 out_uv; 9 | layout (location = 1) out vec4 out_color; 10 | 11 | layout (std140, set = 0, binding = 0) uniform UI 12 | { 13 | vec2 position; 14 | vec2 scale; 15 | } ui; 16 | 17 | void main() 18 | { 19 | // out_uv = in_uv; 20 | out_color = in_color; 21 | gl_Position = vec4(in_pos * pc.scale + pc.translate, 0, 1); 22 | // gl_Position = vec4(in_pos * pc.scale * ui.scale + pc.translate + ui.position * pc.scale, 0, 1); 23 | } 24 | -------------------------------------------------------------------------------- /source/data/shaders/ui/ui-vert.glsl.isrm: -------------------------------------------------------------------------------- 1 | { 2 | "resource": { 3 | "meta": { 4 | "type": 0, 5 | "version": 0 6 | } 7 | }, 8 | "shader": { 9 | "target": 1, 10 | "stage": 1 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /source/data/ui/test.isui.isrm: -------------------------------------------------------------------------------- 1 | { 2 | "asset":{ 3 | "type": "ui" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /source/data/ui/test2.isui.isrm: -------------------------------------------------------------------------------- 1 | { 2 | "asset":{ 3 | "type": "ui" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /source/data/ui/test3.isui.isrm: -------------------------------------------------------------------------------- 1 | { 2 | "asset":{ 3 | "type": "ui" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /source/data/漢字のテスト.json: -------------------------------------------------------------------------------- 1 | { 2 | "render_drivers": { 3 | "vulkan": { 4 | "name": "Vulkan Driver", 5 | "resource": "vulkan_driver.dll" 6 | }, 7 | "none": { 8 | "name": "No Driver", 9 | "resource": "" 10 | } 11 | }, 12 | "render_driver": "vulkan" 13 | } 14 | -------------------------------------------------------------------------------- /source/data/漢字のテスト.json.isrm: -------------------------------------------------------------------------------- 1 | { 2 | "resource": { 3 | "bools": [ true, false, true, false ], 4 | "integers": [ 2, 4, 8, 42, 42069 ], 5 | "floats": [ 3.14, 33.39, -0.11 ], 6 | "strings": [ "日本語をはなします。", "I can speek english.", "Mówię po polsku.", "Ich spreche Französisch, aber nicht wirklich." ] 7 | }, 8 | "asset": { 9 | "type": "Config", 10 | "name": "config" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /thirdparty/details.json: -------------------------------------------------------------------------------- 1 | { 2 | "rapidxml": { 3 | "upstream": "http://rapidxml.sourceforge.net/", 4 | "license": "MIT (User picked)" 5 | }, 6 | "rapidxml_ns": { 7 | "license": "MIT (User picked)" 8 | }, 9 | "rapidjson": { 10 | "upstream": "https://github.com/Tencent/rapidjson" 11 | }, 12 | "freetype": { 13 | "license_file": "FTL.TXT", 14 | "license": "Freetype", 15 | "description": "FreeType is a freely available software library to render fonts.\n\n> Portions of this software are copyright © 2022 The FreeType Project (www.freetype.org). All rights reserved." 16 | }, 17 | "box2d": { 18 | "license": "MIT" 19 | }, 20 | "imgui": { 21 | "license": "MIT" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tools/conanfile.txt: -------------------------------------------------------------------------------- 1 | [requires] 2 | fastbuild-installer/1.12@iceshard/stable 3 | ice-build-tools/1.11.0@iceshard/stable 4 | 5 | [generators] 6 | VirtualRunEnv 7 | VirtualBuildEnv 8 | -------------------------------------------------------------------------------- /tools/scripts/start.moon: -------------------------------------------------------------------------------- 1 | import Path, Dir, File from require "ice.core.fs" 2 | import Log from require "ice.core.logger" 3 | 4 | config = arg[1] or 'Develop' 5 | arch = arg[2] or 'x64' 6 | app = arg[3] or 'test' 7 | 8 | Dir\enter '../../build', -> 9 | test = Path\join "bin/#{arch}/Windows-#{config}-msvc-#{arch}-v143/#{app}/#{app}.exe" 10 | Log\info "Trying to run app: #{test}" 11 | os.execute test 12 | -------------------------------------------------------------------------------- /tools/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "windows": { 3 | "project": { 4 | "script_file": "ice.bat", 5 | "fbuild": { 6 | "vstudio_solution_file": "IceShard.sln" 7 | } 8 | }, 9 | "doxy": { 10 | "path": "~/bin/doxy/doxygen.exe" 11 | } 12 | }, 13 | "linux": { 14 | "project": { 15 | "script_file": "ice.sh" 16 | } 17 | }, 18 | "project": { 19 | "output_dir": "build", 20 | "source_dir": "source/code", 21 | "fbuild": { 22 | "config_file": "source/fbuild.bff" 23 | } 24 | }, 25 | "license": { 26 | "spdx": "MIT", 27 | "authors": "Dandielo " 28 | }, 29 | "android": { 30 | "gradle": { 31 | "version": "8.14" 32 | }, 33 | "projects": [ "source/code/example/android" ] 34 | }, 35 | "webasm": { 36 | "emscripten": { 37 | "location": "build/webasm", 38 | "version": "3.1.59" 39 | } 40 | }, 41 | "doxy": { 42 | "config": "source/configs/doxyfile" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /workspace.moon: -------------------------------------------------------------------------------- 1 | import Project from require 'ice.workspace.project' 2 | import IceShard from require 'tools.iceshard' 3 | 4 | with Project "IceShard" 5 | \application IceShard 6 | 7 | -- Set explicitly all the additional compilers we have defined 8 | \set 'project.fbuild.user_includes', { 9 | 'source/asset_compiler.bff' 10 | } 11 | 12 | \finish! 13 | --------------------------------------------------------------------------------