├── .gitignore ├── engine ├── src │ ├── core │ │ ├── main.cpp │ │ ├── entry_point.h │ │ ├── input.h │ │ ├── timestep.h │ │ ├── uuid.cpp │ │ └── uuid.h │ ├── renderer │ │ ├── graphics_context.cpp │ │ ├── renderer_api.cpp │ │ ├── graphics_context.h │ │ ├── render_command.cpp │ │ ├── camera.h │ │ ├── opengl │ │ │ ├── opengl_context.h │ │ │ └── opengl_renderer_api.h │ │ ├── vertex_array.cpp │ │ ├── texture.cpp │ │ ├── font.h │ │ ├── vertex_array.h │ │ ├── frame_buffer.cpp │ │ ├── renderer.h │ │ ├── renderer_api.h │ │ └── sub_texture2D.h │ ├── audio │ │ ├── sound.cpp │ │ ├── audio.h │ │ └── sound.h │ ├── layers │ │ ├── layer.cpp │ │ ├── layer.h │ │ ├── layer_stack.h │ │ └── imgui_layer │ │ │ └── imgui_layer.h │ ├── scene │ │ ├── entity.cpp │ │ ├── scriptable_entity.cpp │ │ └── tween.h │ ├── asset │ │ ├── asset_metadata.h │ │ ├── importer │ │ │ ├── asset_importer.h │ │ │ ├── sound_importer.h │ │ │ ├── font_importer.h │ │ │ ├── sound_importer.cpp │ │ │ ├── texture_importer.h │ │ │ └── animation_importer.h │ │ ├── asset.h │ │ └── asset_manager_base.h │ ├── physics │ │ ├── raycast.h │ │ ├── physics_body.h │ │ └── physics_body.cpp │ ├── project │ │ └── project_serializer.h │ ├── script_system │ │ ├── script_registry.h │ │ ├── extern_functions.h │ │ ├── extern_functions.cpp │ │ └── script_registry.cpp │ └── events │ │ └── mouse_codes.h ├── external │ ├── stb_image │ │ └── stb_image.cpp │ ├── stb_truetype │ │ └── stb_truetype.cpp │ └── glad │ │ └── CMakeLists.txt └── include │ └── pch.h ├── project ├── module │ ├── api │ │ └── glm │ │ │ ├── ext │ │ │ ├── scalar_packing.inl │ │ │ ├── vector_packing.inl │ │ │ ├── quaternion_common_simd.inl │ │ │ ├── vector_bool2.hpp │ │ │ ├── vector_bool3.hpp │ │ │ ├── vector_bool4.hpp │ │ │ ├── vector_int2.hpp │ │ │ ├── vector_int3.hpp │ │ │ ├── vector_int4.hpp │ │ │ ├── vector_uint2.hpp │ │ │ ├── vector_uint3.hpp │ │ │ ├── vector_uint4.hpp │ │ │ ├── vector_float2.hpp │ │ │ ├── vector_float3.hpp │ │ │ ├── vector_float4.hpp │ │ │ ├── vector_double2.hpp │ │ │ ├── vector_double3.hpp │ │ │ ├── vector_double4.hpp │ │ │ ├── matrix_float2x3.hpp │ │ │ ├── matrix_float2x4.hpp │ │ │ ├── matrix_float3x2.hpp │ │ │ ├── matrix_float3x4.hpp │ │ │ ├── matrix_float4x2.hpp │ │ │ ├── matrix_float4x3.hpp │ │ │ ├── matrix_double2x3.hpp │ │ │ ├── matrix_double2x4.hpp │ │ │ ├── matrix_double3x2.hpp │ │ │ ├── matrix_double3x4.hpp │ │ │ ├── matrix_double4x2.hpp │ │ │ ├── matrix_double4x3.hpp │ │ │ ├── quaternion_transform.inl │ │ │ ├── vector_bool1.hpp │ │ │ ├── matrix_float2x2.hpp │ │ │ ├── matrix_float4x4.hpp │ │ │ ├── matrix_float3x3.hpp │ │ │ ├── scalar_constants.inl │ │ │ ├── vector_packing.hpp │ │ │ ├── matrix_double2x2.hpp │ │ │ ├── matrix_double3x3.hpp │ │ │ ├── matrix_double4x4.hpp │ │ │ ├── scalar_packing.hpp │ │ │ └── vector_int1.hpp │ │ │ ├── gtc │ │ │ ├── quaternion_simd.inl │ │ │ ├── type_precision.inl │ │ │ ├── matrix_transform.inl │ │ │ └── reciprocal.hpp │ │ │ ├── detail │ │ │ ├── func_trigonometric_simd.inl │ │ │ ├── type_mat4x4_simd.inl │ │ │ ├── func_packing_simd.inl │ │ │ ├── func_vector_relational_simd.inl │ │ │ ├── type_half.hpp │ │ │ ├── _fixes.hpp │ │ │ └── compute_vector_relational.hpp │ │ │ ├── gtx │ │ │ ├── raw_data.inl │ │ │ ├── type_aligned.inl │ │ │ ├── wrap.inl │ │ │ ├── std_based_type.inl │ │ │ ├── number_precision.inl │ │ │ ├── perpendicular.inl │ │ │ ├── projection.inl │ │ │ ├── mixed_product.inl │ │ │ ├── normal.inl │ │ │ ├── float_notmalize.inl │ │ │ ├── texture.inl │ │ │ ├── log_base.inl │ │ │ ├── optimum_pow.inl │ │ │ ├── normalize_dot.inl │ │ │ ├── handed_coordinate_space.inl │ │ │ ├── transform.inl │ │ │ ├── orthonormalize.inl │ │ │ └── exterior_product.inl │ │ │ ├── simd │ │ │ ├── packing.h │ │ │ ├── vector_relational.h │ │ │ ├── trigonometric.h │ │ │ └── exponential.h │ │ │ ├── mat3x3.hpp │ │ │ ├── mat3x4.hpp │ │ │ ├── mat4x3.hpp │ │ │ ├── mat2x2.hpp │ │ │ ├── mat2x3.hpp │ │ │ ├── mat2x4.hpp │ │ │ ├── mat3x2.hpp │ │ │ ├── mat4x2.hpp │ │ │ ├── mat4x4.hpp │ │ │ ├── vec2.hpp │ │ │ ├── vec3.hpp │ │ │ └── vec4.hpp │ ├── module.cpp │ └── CMakeLists.txt ├── assets │ ├── asset.registry │ └── scenes │ │ └── scene.escn ├── project.enik └── build.sh ├── examples ├── snake-game │ ├── module │ │ ├── api │ │ │ └── glm │ │ │ │ ├── ext │ │ │ │ ├── scalar_packing.inl │ │ │ │ ├── vector_packing.inl │ │ │ │ ├── quaternion_common_simd.inl │ │ │ │ ├── vector_bool2.hpp │ │ │ │ ├── vector_bool3.hpp │ │ │ │ ├── vector_bool4.hpp │ │ │ │ ├── vector_int2.hpp │ │ │ │ ├── vector_int3.hpp │ │ │ │ ├── vector_int4.hpp │ │ │ │ ├── vector_uint2.hpp │ │ │ │ ├── vector_uint3.hpp │ │ │ │ ├── vector_uint4.hpp │ │ │ │ ├── vector_float2.hpp │ │ │ │ ├── vector_float3.hpp │ │ │ │ ├── vector_float4.hpp │ │ │ │ ├── vector_double2.hpp │ │ │ │ ├── vector_double3.hpp │ │ │ │ ├── vector_double4.hpp │ │ │ │ ├── matrix_float2x3.hpp │ │ │ │ ├── matrix_float2x4.hpp │ │ │ │ ├── matrix_float3x2.hpp │ │ │ │ ├── matrix_float3x4.hpp │ │ │ │ ├── matrix_float4x2.hpp │ │ │ │ ├── matrix_float4x3.hpp │ │ │ │ ├── matrix_double2x3.hpp │ │ │ │ ├── matrix_double2x4.hpp │ │ │ │ ├── matrix_double3x2.hpp │ │ │ │ ├── matrix_double3x4.hpp │ │ │ │ ├── matrix_double4x2.hpp │ │ │ │ ├── matrix_double4x3.hpp │ │ │ │ ├── quaternion_transform.inl │ │ │ │ ├── vector_bool1.hpp │ │ │ │ ├── matrix_float2x2.hpp │ │ │ │ ├── matrix_float3x3.hpp │ │ │ │ ├── matrix_float4x4.hpp │ │ │ │ ├── vector_packing.hpp │ │ │ │ ├── matrix_double2x2.hpp │ │ │ │ ├── matrix_double3x3.hpp │ │ │ │ ├── matrix_double4x4.hpp │ │ │ │ ├── scalar_constants.inl │ │ │ │ └── scalar_packing.hpp │ │ │ │ ├── gtc │ │ │ │ ├── quaternion_simd.inl │ │ │ │ ├── type_precision.inl │ │ │ │ ├── matrix_transform.inl │ │ │ │ └── reciprocal.hpp │ │ │ │ ├── detail │ │ │ │ ├── func_trigonometric_simd.inl │ │ │ │ ├── type_mat4x4_simd.inl │ │ │ │ ├── func_packing_simd.inl │ │ │ │ ├── func_vector_relational_simd.inl │ │ │ │ ├── type_half.hpp │ │ │ │ ├── _fixes.hpp │ │ │ │ └── compute_vector_relational.hpp │ │ │ │ ├── gtx │ │ │ │ ├── raw_data.inl │ │ │ │ ├── type_aligned.inl │ │ │ │ ├── wrap.inl │ │ │ │ ├── number_precision.inl │ │ │ │ ├── std_based_type.inl │ │ │ │ ├── perpendicular.inl │ │ │ │ ├── projection.inl │ │ │ │ ├── mixed_product.inl │ │ │ │ ├── normal.inl │ │ │ │ ├── float_notmalize.inl │ │ │ │ ├── texture.inl │ │ │ │ ├── log_base.inl │ │ │ │ ├── optimum_pow.inl │ │ │ │ ├── normalize_dot.inl │ │ │ │ ├── handed_coordinate_space.inl │ │ │ │ ├── transform.inl │ │ │ │ ├── orthonormalize.inl │ │ │ │ └── exterior_product.inl │ │ │ │ ├── simd │ │ │ │ ├── packing.h │ │ │ │ ├── vector_relational.h │ │ │ │ ├── trigonometric.h │ │ │ │ └── exponential.h │ │ │ │ ├── mat3x3.hpp │ │ │ │ ├── mat3x4.hpp │ │ │ │ ├── mat4x3.hpp │ │ │ │ ├── mat2x2.hpp │ │ │ │ ├── mat2x3.hpp │ │ │ │ ├── mat2x4.hpp │ │ │ │ ├── mat3x2.hpp │ │ │ │ ├── mat4x2.hpp │ │ │ │ ├── mat4x4.hpp │ │ │ │ ├── vec2.hpp │ │ │ │ ├── vec3.hpp │ │ │ │ └── vec4.hpp │ │ ├── CMakeLists.txt │ │ ├── module.cpp │ │ └── src │ │ │ ├── digit.cpp │ │ │ └── number_display.h │ ├── assets │ │ ├── audio │ │ │ ├── hit.wav │ │ │ ├── hover.wav │ │ │ ├── select.wav │ │ │ ├── positive_0.wav │ │ │ ├── positive_1.wav │ │ │ ├── positive_2.wav │ │ │ └── test_sound.wav │ │ ├── textures │ │ │ ├── circle.png │ │ │ ├── snake.png │ │ │ ├── ui │ │ │ │ ├── back.png │ │ │ │ ├── play.png │ │ │ │ ├── quit.png │ │ │ │ ├── numbers │ │ │ │ │ ├── 0.png │ │ │ │ │ ├── 1.png │ │ │ │ │ ├── 2.png │ │ │ │ │ ├── 3.png │ │ │ │ │ ├── 4.png │ │ │ │ │ ├── 5.png │ │ │ │ │ ├── 6.png │ │ │ │ │ ├── 7.png │ │ │ │ │ ├── 8.png │ │ │ │ │ └── 9.png │ │ │ │ ├── snake-p.png │ │ │ │ ├── hanion_dev.png │ │ │ │ ├── grey_button01.png │ │ │ │ └── grey_button02.png │ │ │ ├── white.png │ │ │ └── checkerboard.png │ │ └── prefabs │ │ │ └── part.prefab │ ├── build.sh │ └── project.enik └── squareup │ ├── module │ ├── api │ │ └── glm │ │ │ ├── ext │ │ │ ├── scalar_packing.inl │ │ │ ├── vector_packing.inl │ │ │ ├── quaternion_common_simd.inl │ │ │ ├── vector_bool2.hpp │ │ │ ├── vector_bool3.hpp │ │ │ ├── vector_bool4.hpp │ │ │ ├── vector_int2.hpp │ │ │ ├── vector_int3.hpp │ │ │ ├── vector_int4.hpp │ │ │ ├── vector_uint2.hpp │ │ │ ├── vector_uint3.hpp │ │ │ ├── vector_uint4.hpp │ │ │ ├── vector_float2.hpp │ │ │ ├── vector_float3.hpp │ │ │ ├── vector_float4.hpp │ │ │ ├── vector_double2.hpp │ │ │ ├── vector_double3.hpp │ │ │ ├── vector_double4.hpp │ │ │ ├── matrix_float2x3.hpp │ │ │ ├── matrix_float2x4.hpp │ │ │ ├── matrix_float3x2.hpp │ │ │ ├── matrix_float3x4.hpp │ │ │ ├── matrix_float4x2.hpp │ │ │ ├── matrix_float4x3.hpp │ │ │ ├── matrix_double2x3.hpp │ │ │ ├── matrix_double2x4.hpp │ │ │ ├── matrix_double3x2.hpp │ │ │ ├── matrix_double3x4.hpp │ │ │ ├── matrix_double4x2.hpp │ │ │ ├── matrix_double4x3.hpp │ │ │ ├── quaternion_transform.inl │ │ │ ├── vector_bool1.hpp │ │ │ ├── matrix_float2x2.hpp │ │ │ ├── matrix_float4x4.hpp │ │ │ ├── matrix_float3x3.hpp │ │ │ ├── scalar_constants.inl │ │ │ ├── vector_packing.hpp │ │ │ ├── matrix_double2x2.hpp │ │ │ ├── matrix_double3x3.hpp │ │ │ ├── matrix_double4x4.hpp │ │ │ └── scalar_packing.hpp │ │ │ ├── gtc │ │ │ ├── quaternion_simd.inl │ │ │ ├── type_precision.inl │ │ │ ├── matrix_transform.inl │ │ │ └── reciprocal.hpp │ │ │ ├── detail │ │ │ ├── func_trigonometric_simd.inl │ │ │ ├── type_mat4x4_simd.inl │ │ │ ├── func_packing_simd.inl │ │ │ ├── func_vector_relational_simd.inl │ │ │ ├── type_half.hpp │ │ │ ├── _fixes.hpp │ │ │ └── compute_vector_relational.hpp │ │ │ ├── gtx │ │ │ ├── raw_data.inl │ │ │ ├── type_aligned.inl │ │ │ ├── wrap.inl │ │ │ ├── std_based_type.inl │ │ │ ├── number_precision.inl │ │ │ ├── perpendicular.inl │ │ │ ├── projection.inl │ │ │ ├── mixed_product.inl │ │ │ ├── normal.inl │ │ │ ├── float_notmalize.inl │ │ │ ├── texture.inl │ │ │ ├── log_base.inl │ │ │ ├── optimum_pow.inl │ │ │ ├── normalize_dot.inl │ │ │ ├── handed_coordinate_space.inl │ │ │ ├── transform.inl │ │ │ ├── orthonormalize.inl │ │ │ └── exterior_product.inl │ │ │ ├── simd │ │ │ ├── packing.h │ │ │ ├── vector_relational.h │ │ │ ├── trigonometric.h │ │ │ └── exponential.h │ │ │ ├── mat3x3.hpp │ │ │ ├── mat3x4.hpp │ │ │ ├── mat4x3.hpp │ │ │ ├── mat2x2.hpp │ │ │ ├── mat2x3.hpp │ │ │ ├── mat2x4.hpp │ │ │ ├── mat3x2.hpp │ │ │ ├── mat4x2.hpp │ │ │ ├── mat4x4.hpp │ │ │ ├── vec2.hpp │ │ │ ├── vec3.hpp │ │ │ └── vec4.hpp │ ├── src │ │ ├── menu.h │ │ ├── common.h │ │ ├── dead_score.cpp │ │ ├── gui.cpp │ │ └── weapon.h │ └── CMakeLists.txt │ ├── assets │ ├── audio │ │ ├── hit.wav │ │ ├── hover.wav │ │ ├── select.wav │ │ └── shoot.wav │ ├── tiled │ │ ├── map.png │ │ ├── 1bit.tsx │ │ └── map.tiled-project │ ├── textures │ │ ├── 1bit.png │ │ └── white.png │ ├── fonts │ │ └── FunnelDisplay-Medium.ttf │ └── shaders │ │ └── line_shader.glsl │ ├── project.enik │ └── build.sh ├── .gitattributes ├── editor ├── assets │ ├── icons │ │ ├── banner.png │ │ ├── tool_move.png │ │ ├── tool_scale.png │ │ ├── pause_button.png │ │ ├── play_button.png │ │ ├── step_button.png │ │ ├── stop_button.png │ │ ├── tool_rotate.png │ │ └── tool_select.png │ ├── fonts │ │ ├── Noto_Sans │ │ │ └── NotoSans-Regular.ttf │ │ └── Noto_Sans_Mono │ │ │ └── NotoSansMono-VariableFont_wdth,wght.ttf │ └── shaders │ │ └── line_shader.glsl └── src │ ├── editor.cpp │ ├── tabs │ ├── text_editor_tab.cpp │ ├── home_tab.h │ └── text_editor_tab.h │ ├── utils │ ├── utils.h │ └── editor_assets.h │ └── panels │ ├── editor_panel.h │ ├── debug_info.h │ └── text_editor.h ├── runtime ├── assets │ └── textures │ │ └── error.png └── src │ ├── runtime_app.cpp │ └── debug_info.h ├── CMakeLists.txt ├── mingw.cmake └── .gitmodules /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | export/ 3 | -------------------------------------------------------------------------------- /engine/src/core/main.cpp: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/scalar_packing.inl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/vector_packing.inl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /project/module/api/glm/gtc/quaternion_simd.inl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /project/assets/asset.registry: -------------------------------------------------------------------------------- 1 | AssetRegistry: 2 | [] -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/scalar_packing.inl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/vector_packing.inl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtc/quaternion_simd.inl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/scalar_packing.inl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/vector_packing.inl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtc/quaternion_simd.inl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /project/module/api/glm/detail/func_trigonometric_simd.inl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/detail/func_trigonometric_simd.inl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /project/assets/scenes/scene.escn: -------------------------------------------------------------------------------- 1 | Scene: scene 2 | Entities: 3 | [] -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/detail/func_trigonometric_simd.inl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /project/module/api/glm/gtx/raw_data.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_raw_data 2 | 3 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtx/raw_data.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_raw_data 2 | 3 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtx/raw_data.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_raw_data 2 | 3 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /project/module/api/glm/gtc/type_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_precision 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /project/module/api/glm/gtx/type_aligned.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_type_aligned 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /project/module/api/glm/gtx/wrap.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_wrap 2 | 3 | namespace glm 4 | { 5 | 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /editor/assets/icons/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/editor/assets/icons/banner.png -------------------------------------------------------------------------------- /project/module/api/glm/gtx/std_based_type.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_std_based_type 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /editor/assets/icons/tool_move.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/editor/assets/icons/tool_move.png -------------------------------------------------------------------------------- /editor/assets/icons/tool_scale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/editor/assets/icons/tool_scale.png -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtc/type_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_precision 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtx/type_aligned.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_type_aligned 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtx/wrap.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_wrap 2 | 3 | namespace glm 4 | { 5 | 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /project/module/api/glm/detail/type_mat4x4_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | 3 | namespace glm 4 | { 5 | 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /project/module/api/glm/gtx/number_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_number_precision 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /runtime/assets/textures/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/runtime/assets/textures/error.png -------------------------------------------------------------------------------- /editor/assets/icons/pause_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/editor/assets/icons/pause_button.png -------------------------------------------------------------------------------- /editor/assets/icons/play_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/editor/assets/icons/play_button.png -------------------------------------------------------------------------------- /editor/assets/icons/step_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/editor/assets/icons/step_button.png -------------------------------------------------------------------------------- /editor/assets/icons/stop_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/editor/assets/icons/stop_button.png -------------------------------------------------------------------------------- /editor/assets/icons/tool_rotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/editor/assets/icons/tool_rotate.png -------------------------------------------------------------------------------- /editor/assets/icons/tool_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/editor/assets/icons/tool_select.png -------------------------------------------------------------------------------- /engine/external/stb_image/stb_image.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define STB_IMAGE_IMPLEMENTATION 4 | #include "stb_image.h" -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtc/type_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_precision 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtx/type_aligned.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_type_aligned 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtx/wrap.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_wrap 2 | 3 | namespace glm 4 | { 5 | 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtx/std_based_type.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_std_based_type 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtx/number_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_number_precision 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtx/std_based_type.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_std_based_type 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /examples/squareup/assets/audio/hit.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/squareup/assets/audio/hit.wav -------------------------------------------------------------------------------- /examples/squareup/assets/tiled/map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/squareup/assets/tiled/map.png -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/detail/type_mat4x4_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | 3 | namespace glm 4 | { 5 | 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtx/number_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_number_precision 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /examples/snake-game/assets/audio/hit.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/audio/hit.wav -------------------------------------------------------------------------------- /examples/snake-game/assets/audio/hover.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/audio/hover.wav -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/detail/type_mat4x4_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | 3 | namespace glm 4 | { 5 | 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /examples/squareup/assets/audio/hover.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/squareup/assets/audio/hover.wav -------------------------------------------------------------------------------- /examples/squareup/assets/audio/select.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/squareup/assets/audio/select.wav -------------------------------------------------------------------------------- /examples/squareup/assets/audio/shoot.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/squareup/assets/audio/shoot.wav -------------------------------------------------------------------------------- /examples/squareup/assets/textures/1bit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/squareup/assets/textures/1bit.png -------------------------------------------------------------------------------- /engine/external/stb_truetype/stb_truetype.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define STB_TRUETYPE_IMPLEMENTATION 4 | #include "stb_truetype.h" 5 | -------------------------------------------------------------------------------- /examples/snake-game/assets/audio/select.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/audio/select.wav -------------------------------------------------------------------------------- /examples/squareup/assets/textures/white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/squareup/assets/textures/white.png -------------------------------------------------------------------------------- /examples/snake-game/assets/audio/positive_0.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/audio/positive_0.wav -------------------------------------------------------------------------------- /examples/snake-game/assets/audio/positive_1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/audio/positive_1.wav -------------------------------------------------------------------------------- /examples/snake-game/assets/audio/positive_2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/audio/positive_2.wav -------------------------------------------------------------------------------- /examples/snake-game/assets/audio/test_sound.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/audio/test_sound.wav -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/circle.png -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/snake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/snake.png -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/ui/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/ui/back.png -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/ui/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/ui/play.png -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/ui/quit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/ui/quit.png -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/white.png -------------------------------------------------------------------------------- /project/module/api/glm/detail/func_packing_simd.inl: -------------------------------------------------------------------------------- 1 | namespace glm{ 2 | namespace detail 3 | { 4 | 5 | }//namespace detail 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /project/module/api/glm/gtc/matrix_transform.inl: -------------------------------------------------------------------------------- 1 | #include "../geometric.hpp" 2 | #include "../trigonometric.hpp" 3 | #include "../matrix.hpp" 4 | -------------------------------------------------------------------------------- /project/project.enik: -------------------------------------------------------------------------------- 1 | Project: project 2 | StartScene: assets/scenes/scene.escn 3 | AssetRegistry: assets/asset.registry 4 | ScriptModule: 5 | 6 | -------------------------------------------------------------------------------- /editor/assets/fonts/Noto_Sans/NotoSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/editor/assets/fonts/Noto_Sans/NotoSans-Regular.ttf -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/checkerboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/checkerboard.png -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/ui/numbers/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/ui/numbers/0.png -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/ui/numbers/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/ui/numbers/1.png -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/ui/numbers/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/ui/numbers/2.png -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/ui/numbers/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/ui/numbers/3.png -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/ui/numbers/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/ui/numbers/4.png -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/ui/numbers/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/ui/numbers/5.png -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/ui/numbers/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/ui/numbers/6.png -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/ui/numbers/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/ui/numbers/7.png -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/ui/numbers/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/ui/numbers/8.png -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/ui/numbers/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/ui/numbers/9.png -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/ui/snake-p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/ui/snake-p.png -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtc/matrix_transform.inl: -------------------------------------------------------------------------------- 1 | #include "../geometric.hpp" 2 | #include "../trigonometric.hpp" 3 | #include "../matrix.hpp" 4 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/detail/func_packing_simd.inl: -------------------------------------------------------------------------------- 1 | namespace glm{ 2 | namespace detail 3 | { 4 | 5 | }//namespace detail 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtc/matrix_transform.inl: -------------------------------------------------------------------------------- 1 | #include "../geometric.hpp" 2 | #include "../trigonometric.hpp" 3 | #include "../matrix.hpp" 4 | -------------------------------------------------------------------------------- /project/module/api/glm/detail/func_vector_relational_simd.inl: -------------------------------------------------------------------------------- 1 | namespace glm{ 2 | namespace detail 3 | { 4 | 5 | }//namespace detail 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/ui/hanion_dev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/ui/hanion_dev.png -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/detail/func_packing_simd.inl: -------------------------------------------------------------------------------- 1 | namespace glm{ 2 | namespace detail 3 | { 4 | 5 | }//namespace detail 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/ui/grey_button01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/ui/grey_button01.png -------------------------------------------------------------------------------- /examples/snake-game/assets/textures/ui/grey_button02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/snake-game/assets/textures/ui/grey_button02.png -------------------------------------------------------------------------------- /examples/squareup/assets/fonts/FunnelDisplay-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/examples/squareup/assets/fonts/FunnelDisplay-Medium.ttf -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/detail/func_vector_relational_simd.inl: -------------------------------------------------------------------------------- 1 | namespace glm{ 2 | namespace detail 3 | { 4 | 5 | }//namespace detail 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/detail/func_vector_relational_simd.inl: -------------------------------------------------------------------------------- 1 | namespace glm{ 2 | namespace detail 3 | { 4 | 5 | }//namespace detail 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /examples/squareup/project.enik: -------------------------------------------------------------------------------- 1 | Project: squareup 2 | StartScene: assets/scenes/menu.escn 3 | AssetRegistry: assets/asset.registry 4 | ScriptModule: module/libmodule.so 5 | 6 | -------------------------------------------------------------------------------- /engine/src/renderer/graphics_context.cpp: -------------------------------------------------------------------------------- 1 | #include "graphics_context.h" 2 | 3 | #include 4 | 5 | namespace Enik { 6 | 7 | GraphicsContext::GraphicsContext() { 8 | } 9 | 10 | } -------------------------------------------------------------------------------- /project/module/api/glm/simd/packing.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/packing.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | -------------------------------------------------------------------------------- /editor/assets/fonts/Noto_Sans_Mono/NotoSansMono-VariableFont_wdth,wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanion/enik-engine/HEAD/editor/assets/fonts/Noto_Sans_Mono/NotoSansMono-VariableFont_wdth,wght.ttf -------------------------------------------------------------------------------- /engine/src/audio/sound.cpp: -------------------------------------------------------------------------------- 1 | #include "sound.h" 2 | #include "audio/audio.h" 3 | 4 | namespace Enik { 5 | 6 | SoundAsset::~SoundAsset() { 7 | Audio::UninitSound(sound); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /engine/src/layers/layer.cpp: -------------------------------------------------------------------------------- 1 | #include "layer.h" 2 | 3 | namespace Enik { 4 | 5 | Layer::Layer(const std::string& name) 6 | : m_DebugName(name) { 7 | } 8 | 9 | Layer::~Layer() { 10 | } 11 | 12 | } -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/simd/packing.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/packing.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/simd/packing.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/packing.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | -------------------------------------------------------------------------------- /project/module/api/glm/simd/vector_relational.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/vector_relational.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | -------------------------------------------------------------------------------- /engine/src/scene/entity.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "entity.h" 3 | 4 | namespace Enik { 5 | 6 | Entity::Entity(entt::entity handle, Scene* scene) 7 | : m_Handle(handle), m_Scene(scene) { 8 | } 9 | 10 | } -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/simd/vector_relational.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/vector_relational.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | -------------------------------------------------------------------------------- /project/module/api/glm/simd/trigonometric.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/trigonometric.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | 10 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/simd/vector_relational.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/vector_relational.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/simd/trigonometric.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/trigonometric.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | 10 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/simd/trigonometric.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/trigonometric.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | 10 | -------------------------------------------------------------------------------- /engine/src/scene/scriptable_entity.cpp: -------------------------------------------------------------------------------- 1 | #include "scriptable_entity.h" 2 | 3 | namespace Enik { 4 | 5 | 6 | RaycastResult ScriptableEntity::CastRay(Raycast ray) { 7 | return m_Entity.m_Scene->m_Physics.CastRay(ray); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /engine/src/asset/asset_metadata.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "asset/asset.h" 3 | 4 | namespace Enik { 5 | 6 | struct AssetMetadata { 7 | AssetType Type = AssetType::None; 8 | std::filesystem::path FilePath; 9 | }; 10 | 11 | } 12 | 13 | -------------------------------------------------------------------------------- /engine/src/asset/importer/asset_importer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "asset/asset_metadata.h" 3 | 4 | namespace Enik { 5 | 6 | class AssetImporter { 7 | public: 8 | static Ref ImportAsset(AssetHandle handle, const AssetMetadata& metadata); 9 | }; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /engine/src/renderer/renderer_api.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "renderer_api.h" 3 | 4 | 5 | namespace Enik { 6 | 7 | RendererAPI::API RendererAPI::s_API = RendererAPI::API::OpenGL; 8 | RendererAPI::API RendererAPI::GetAPI() { return RendererAPI::s_API; } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /project/module/api/glm/mat3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x3.hpp" 6 | #include "./ext/matrix_double3x3_precision.hpp" 7 | #include "./ext/matrix_float3x3.hpp" 8 | #include "./ext/matrix_float3x3_precision.hpp" 9 | -------------------------------------------------------------------------------- /project/module/api/glm/mat3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x4.hpp" 6 | #include "./ext/matrix_double3x4_precision.hpp" 7 | #include "./ext/matrix_float3x4.hpp" 8 | #include "./ext/matrix_float3x4_precision.hpp" 9 | -------------------------------------------------------------------------------- /project/module/api/glm/mat4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x3.hpp" 6 | #include "./ext/matrix_double4x3_precision.hpp" 7 | #include "./ext/matrix_float4x3.hpp" 8 | #include "./ext/matrix_float4x3_precision.hpp" 9 | -------------------------------------------------------------------------------- /engine/src/renderer/graphics_context.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace Enik { 4 | 5 | class GraphicsContext { 6 | public: 7 | GraphicsContext(); 8 | virtual ~GraphicsContext() = default; 9 | 10 | virtual void Init() = 0; 11 | virtual void SwapBuffers() = 0; 12 | }; 13 | 14 | } -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/mat3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x3.hpp" 6 | #include "./ext/matrix_double3x3_precision.hpp" 7 | #include "./ext/matrix_float3x3.hpp" 8 | #include "./ext/matrix_float3x3_precision.hpp" 9 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/mat3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x4.hpp" 6 | #include "./ext/matrix_double3x4_precision.hpp" 7 | #include "./ext/matrix_float3x4.hpp" 8 | #include "./ext/matrix_float3x4_precision.hpp" 9 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/mat4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x3.hpp" 6 | #include "./ext/matrix_double4x3_precision.hpp" 7 | #include "./ext/matrix_float4x3.hpp" 8 | #include "./ext/matrix_float4x3_precision.hpp" 9 | -------------------------------------------------------------------------------- /project/module/api/glm/gtx/perpendicular.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_perpendicular 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType perp(genType const& x, genType const& Normal) 7 | { 8 | return x - proj(x, Normal); 9 | } 10 | }//namespace glm 11 | -------------------------------------------------------------------------------- /engine/include/pch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/mat3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x3.hpp" 6 | #include "./ext/matrix_double3x3_precision.hpp" 7 | #include "./ext/matrix_float3x3.hpp" 8 | #include "./ext/matrix_float3x3_precision.hpp" 9 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/mat3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x4.hpp" 6 | #include "./ext/matrix_double3x4_precision.hpp" 7 | #include "./ext/matrix_float3x4.hpp" 8 | #include "./ext/matrix_float3x4_precision.hpp" 9 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/mat4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x3.hpp" 6 | #include "./ext/matrix_double4x3_precision.hpp" 7 | #include "./ext/matrix_float4x3.hpp" 8 | #include "./ext/matrix_float4x3_precision.hpp" 9 | -------------------------------------------------------------------------------- /examples/squareup/assets/tiled/1bit.tsx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /project/module/api/glm/mat2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x2.hpp" 6 | #include "./ext/matrix_double2x2_precision.hpp" 7 | #include "./ext/matrix_float2x2.hpp" 8 | #include "./ext/matrix_float2x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /project/module/api/glm/mat2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x3.hpp" 6 | #include "./ext/matrix_double2x3_precision.hpp" 7 | #include "./ext/matrix_float2x3.hpp" 8 | #include "./ext/matrix_float2x3_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /project/module/api/glm/mat2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x4.hpp" 6 | #include "./ext/matrix_double2x4_precision.hpp" 7 | #include "./ext/matrix_float2x4.hpp" 8 | #include "./ext/matrix_float2x4_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /project/module/api/glm/mat3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x2.hpp" 6 | #include "./ext/matrix_double3x2_precision.hpp" 7 | #include "./ext/matrix_float3x2.hpp" 8 | #include "./ext/matrix_float3x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /project/module/api/glm/mat4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x2.hpp" 6 | #include "./ext/matrix_double4x2_precision.hpp" 7 | #include "./ext/matrix_float4x2.hpp" 8 | #include "./ext/matrix_float4x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /project/module/api/glm/mat4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x4.hpp" 6 | #include "./ext/matrix_double4x4_precision.hpp" 7 | #include "./ext/matrix_float4x4.hpp" 8 | #include "./ext/matrix_float4x4_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtx/perpendicular.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_perpendicular 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType perp(genType const& x, genType const& Normal) 7 | { 8 | return x - proj(x, Normal); 9 | } 10 | }//namespace glm 11 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtx/perpendicular.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_perpendicular 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType perp(genType const& x, genType const& Normal) 7 | { 8 | return x - proj(x, Normal); 9 | } 10 | }//namespace glm 11 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/mat2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x2.hpp" 6 | #include "./ext/matrix_double2x2_precision.hpp" 7 | #include "./ext/matrix_float2x2.hpp" 8 | #include "./ext/matrix_float2x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/mat2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x3.hpp" 6 | #include "./ext/matrix_double2x3_precision.hpp" 7 | #include "./ext/matrix_float2x3.hpp" 8 | #include "./ext/matrix_float2x3_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/mat2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x4.hpp" 6 | #include "./ext/matrix_double2x4_precision.hpp" 7 | #include "./ext/matrix_float2x4.hpp" 8 | #include "./ext/matrix_float2x4_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/mat3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x2.hpp" 6 | #include "./ext/matrix_double3x2_precision.hpp" 7 | #include "./ext/matrix_float3x2.hpp" 8 | #include "./ext/matrix_float3x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/mat4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x2.hpp" 6 | #include "./ext/matrix_double4x2_precision.hpp" 7 | #include "./ext/matrix_float4x2.hpp" 8 | #include "./ext/matrix_float4x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/mat4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x4.hpp" 6 | #include "./ext/matrix_double4x4_precision.hpp" 7 | #include "./ext/matrix_float4x4.hpp" 8 | #include "./ext/matrix_float4x4_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/mat2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x2.hpp" 6 | #include "./ext/matrix_double2x2_precision.hpp" 7 | #include "./ext/matrix_float2x2.hpp" 8 | #include "./ext/matrix_float2x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/mat2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x3.hpp" 6 | #include "./ext/matrix_double2x3_precision.hpp" 7 | #include "./ext/matrix_float2x3.hpp" 8 | #include "./ext/matrix_float2x3_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/mat2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x4.hpp" 6 | #include "./ext/matrix_double2x4_precision.hpp" 7 | #include "./ext/matrix_float2x4.hpp" 8 | #include "./ext/matrix_float2x4_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/mat3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x2.hpp" 6 | #include "./ext/matrix_double3x2_precision.hpp" 7 | #include "./ext/matrix_float3x2.hpp" 8 | #include "./ext/matrix_float3x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/mat4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x2.hpp" 6 | #include "./ext/matrix_double4x2_precision.hpp" 7 | #include "./ext/matrix_float4x2.hpp" 8 | #include "./ext/matrix_float4x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/mat4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x4.hpp" 6 | #include "./ext/matrix_double4x4_precision.hpp" 7 | #include "./ext/matrix_float4x4.hpp" 8 | #include "./ext/matrix_float4x4_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /examples/squareup/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd module 4 | cmake --no-warn-unused-cli \ 5 | -DCMAKE_BUILD_TYPE:STRING=Debug \ 6 | -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE \ 7 | -S. -B./build -G Ninja 8 | cmake --build ./build --config Debug 9 | 10 | cp ./build/libmodule.so ./ 11 | echo "done" 12 | -------------------------------------------------------------------------------- /examples/squareup/module/src/menu.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../api/enik.h" 3 | #include "button_container.h" 4 | 5 | namespace Enik { 6 | class MainMenu : public ButtonContainer { 7 | protected: 8 | virtual void OnCreate() override; 9 | virtual void OnPressed(Entity button) override; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /engine/src/core/entry_point.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "core/application.h" 4 | 5 | extern Enik::Application* Enik::CreateApplication(); 6 | 7 | int main(int argc, char** argv) { 8 | Enik::Log::Init(); 9 | auto app = Enik::CreateApplication(); 10 | app->Run(); 11 | delete app; 12 | } 13 | -------------------------------------------------------------------------------- /project/module/api/glm/gtx/projection.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_projection 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType proj(genType const& x, genType const& Normal) 7 | { 8 | return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; 9 | } 10 | }//namespace glm 11 | -------------------------------------------------------------------------------- /engine/src/asset/importer/sound_importer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "asset/asset.h" 3 | #include "asset/asset_metadata.h" 4 | #include "audio/sound.h" 5 | 6 | namespace Enik { 7 | namespace SoundImporter { 8 | 9 | Ref ImportSound(AssetHandle handle, const AssetMetadata& metadata); 10 | 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /engine/src/physics/raycast.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "scene/entity.h" 4 | #include 5 | 6 | namespace Enik { 7 | 8 | struct Raycast { 9 | glm::vec3 origin; 10 | glm::vec3 dir; 11 | uint16_t layer; 12 | }; 13 | struct RaycastResult { 14 | Entity entity; 15 | glm::vec3 point; 16 | }; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtx/projection.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_projection 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType proj(genType const& x, genType const& Normal) 7 | { 8 | return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; 9 | } 10 | }//namespace glm 11 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtx/projection.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_projection 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType proj(genType const& x, genType const& Normal) 7 | { 8 | return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; 9 | } 10 | }//namespace glm 11 | -------------------------------------------------------------------------------- /examples/squareup/assets/tiled/map.tiled-project: -------------------------------------------------------------------------------- 1 | { 2 | "automappingRulesFile": "", 3 | "commands": [ 4 | ], 5 | "compatibilityVersion": 1100, 6 | "extensionsPath": "extensions", 7 | "folders": [ 8 | "." 9 | ], 10 | "properties": [ 11 | ], 12 | "propertyTypes": [ 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /project/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/env bash 2 | set -euo pipefail 3 | 4 | cd module 5 | 6 | cmake -S . -B build -G Ninja \ 7 | -DCMAKE_BUILD_TYPE=Debug \ 8 | -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ 9 | --no-warn-unused-cli 10 | 11 | cmake --build build --config Debug --parallel 12 | 13 | cp ./build/libmodule.so ./ 14 | echo "done" 15 | -------------------------------------------------------------------------------- /engine/src/asset/importer/font_importer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "asset/asset.h" 3 | #include "asset/asset_metadata.h" 4 | #include "renderer/font.h" 5 | 6 | namespace Enik { 7 | 8 | class FontImporter { 9 | public: 10 | static Ref ImportFont(AssetHandle handle, const AssetMetadata& metadata); 11 | }; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /examples/snake-game/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/env bash 2 | set -euo pipefail 3 | 4 | cd module 5 | 6 | cmake -S . -B build -G Ninja \ 7 | -DCMAKE_BUILD_TYPE=Debug \ 8 | -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ 9 | --no-warn-unused-cli 10 | 11 | cmake --build build --config Debug --parallel 12 | 13 | cp ./build/libmodule.so ./ 14 | echo "done" 15 | -------------------------------------------------------------------------------- /project/module/module.cpp: -------------------------------------------------------------------------------- 1 | #include "api/enik.h" 2 | 3 | //#include "src/player.h" 4 | 5 | #define REGISTER(name) Enik::ScriptRegistry::RegisterScriptClass(#name, \ 6 | []() -> Enik::ScriptableEntity* { return new Enik::name(); }); 7 | 8 | 9 | 10 | extern "C" void RegisterAllScripts() { 11 | //REGISTER(Player); 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /engine/src/asset/importer/sound_importer.cpp: -------------------------------------------------------------------------------- 1 | #include "sound_importer.h" 2 | #include "audio/audio.h" 3 | 4 | namespace Enik { 5 | namespace SoundImporter { 6 | 7 | Ref ImportSound(AssetHandle handle, const AssetMetadata& metadata) { 8 | return Audio::CreateSound(metadata.FilePath.string().c_str()); 9 | } 10 | 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /engine/src/audio/audio.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "audio/sound.h" 4 | 5 | 6 | namespace Enik { 7 | namespace Audio { 8 | 9 | void Init(); 10 | void Shutdown(); 11 | 12 | Ref CreateSound(const char* filepath); 13 | void UninitSound(void* sound); 14 | 15 | void Play(AssetHandle sound_handle); 16 | 17 | } 18 | } -------------------------------------------------------------------------------- /engine/src/core/input.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Enik { 6 | 7 | class Input { 8 | public: 9 | static bool IsKeyPressed(int keycode); 10 | static bool IsMouseButtonPressed(int button); 11 | static std::pair GetMousePosition(); 12 | 13 | private: 14 | static Scope s_Instance; 15 | }; 16 | 17 | } -------------------------------------------------------------------------------- /engine/src/renderer/render_command.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "render_command.h" 3 | #include "opengl/opengl_renderer_api.h" 4 | 5 | 6 | namespace Enik { 7 | 8 | Scope RenderCommand::s_RendererAPI = CreateScope(); 9 | RendererAPI* RenderCommand::GetAPI() { return RenderCommand::s_RendererAPI.get(); } 10 | 11 | } -------------------------------------------------------------------------------- /project/module/api/glm/gtx/mixed_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_mixed_product 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER T mixedProduct 7 | ( 8 | vec<3, T, Q> const& v1, 9 | vec<3, T, Q> const& v2, 10 | vec<3, T, Q> const& v3 11 | ) 12 | { 13 | return dot(cross(v1, v2), v3); 14 | } 15 | }//namespace glm 16 | -------------------------------------------------------------------------------- /project/module/api/glm/detail/type_half.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "setup.hpp" 4 | 5 | namespace glm{ 6 | namespace detail 7 | { 8 | typedef short hdata; 9 | 10 | GLM_FUNC_DECL float toFloat32(hdata value); 11 | GLM_FUNC_DECL hdata toFloat16(float const& value); 12 | 13 | }//namespace detail 14 | }//namespace glm 15 | 16 | #include "type_half.inl" 17 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtx/mixed_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_mixed_product 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER T mixedProduct 7 | ( 8 | vec<3, T, Q> const& v1, 9 | vec<3, T, Q> const& v2, 10 | vec<3, T, Q> const& v3 11 | ) 12 | { 13 | return dot(cross(v1, v2), v3); 14 | } 15 | }//namespace glm 16 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtx/mixed_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_mixed_product 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER T mixedProduct 7 | ( 8 | vec<3, T, Q> const& v1, 9 | vec<3, T, Q> const& v2, 10 | vec<3, T, Q> const& v3 11 | ) 12 | { 13 | return dot(cross(v1, v2), v3); 14 | } 15 | }//namespace glm 16 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/detail/type_half.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "setup.hpp" 4 | 5 | namespace glm{ 6 | namespace detail 7 | { 8 | typedef short hdata; 9 | 10 | GLM_FUNC_DECL float toFloat32(hdata value); 11 | GLM_FUNC_DECL hdata toFloat16(float const& value); 12 | 13 | }//namespace detail 14 | }//namespace glm 15 | 16 | #include "type_half.inl" 17 | -------------------------------------------------------------------------------- /project/module/api/glm/gtx/normal.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normal 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER vec<3, T, Q> triangleNormal 7 | ( 8 | vec<3, T, Q> const& p1, 9 | vec<3, T, Q> const& p2, 10 | vec<3, T, Q> const& p3 11 | ) 12 | { 13 | return normalize(cross(p1 - p2, p1 - p3)); 14 | } 15 | }//namespace glm 16 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/detail/type_half.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "setup.hpp" 4 | 5 | namespace glm{ 6 | namespace detail 7 | { 8 | typedef short hdata; 9 | 10 | GLM_FUNC_DECL float toFloat32(hdata value); 11 | GLM_FUNC_DECL hdata toFloat16(float const& value); 12 | 13 | }//namespace detail 14 | }//namespace glm 15 | 16 | #include "type_half.inl" 17 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtx/normal.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normal 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER vec<3, T, Q> triangleNormal 7 | ( 8 | vec<3, T, Q> const& p1, 9 | vec<3, T, Q> const& p2, 10 | vec<3, T, Q> const& p3 11 | ) 12 | { 13 | return normalize(cross(p1 - p2, p1 - p3)); 14 | } 15 | }//namespace glm 16 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtx/normal.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normal 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER vec<3, T, Q> triangleNormal 7 | ( 8 | vec<3, T, Q> const& p1, 9 | vec<3, T, Q> const& p2, 10 | vec<3, T, Q> const& p3 11 | ) 12 | { 13 | return normalize(cross(p1 - p2, p1 - p3)); 14 | } 15 | }//namespace glm 16 | -------------------------------------------------------------------------------- /engine/src/physics/physics_body.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Jolt/Jolt.h" 4 | #include "Jolt/Physics/Body/Body.h" 5 | #include "Jolt/Physics/Body/BodyInterface.h" 6 | 7 | 8 | namespace Enik { 9 | 10 | using PhysicsBody = JPH::Body; 11 | 12 | const char* MotionTypeToString(JPH::EMotionType t); 13 | JPH::EMotionType MotionTypeFromString(const std::string& str); 14 | 15 | 16 | } 17 | -------------------------------------------------------------------------------- /engine/src/project/project_serializer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "project/project.h" 4 | 5 | namespace Enik { 6 | 7 | class ProjectSerializer { 8 | public: 9 | ProjectSerializer(Ref& project); 10 | 11 | void Serialize(std::filesystem::path path); 12 | bool Deserialize(std::filesystem::path path); 13 | 14 | private: 15 | Ref m_Project; 16 | 17 | }; 18 | 19 | } -------------------------------------------------------------------------------- /engine/src/script_system/script_registry.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "scene/scriptable_entity.h" 3 | 4 | namespace Enik { 5 | 6 | namespace ScriptRegistry { 7 | extern "C" void RegisterScriptClass(const std::string& class_name, ScriptableEntity* (*create_function)()); 8 | std::unordered_map& GetRegistry(); 9 | void ClearRegistry(); 10 | } 11 | 12 | } -------------------------------------------------------------------------------- /project/module/api/glm/gtx/float_notmalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_float_normalize 2 | 3 | #include 4 | 5 | namespace glm 6 | { 7 | template 8 | GLM_FUNC_QUALIFIER vec floatNormalize(vec const& v) 9 | { 10 | return vec(v) / static_cast(std::numeric_limits::max()); 11 | } 12 | 13 | }//namespace glm 14 | -------------------------------------------------------------------------------- /engine/src/audio/sound.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "asset/asset.h" 3 | 4 | namespace Enik { 5 | 6 | class SoundAsset : public Asset { 7 | public: 8 | virtual ~SoundAsset(); 9 | 10 | static AssetType GetStaticType() { return AssetType::Sound; } 11 | virtual AssetType GetType() const override { return GetStaticType(); } 12 | 13 | public: 14 | void* sound = nullptr; 15 | }; 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtx/float_notmalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_float_normalize 2 | 3 | #include 4 | 5 | namespace glm 6 | { 7 | template 8 | GLM_FUNC_QUALIFIER vec floatNormalize(vec const& v) 9 | { 10 | return vec(v) / static_cast(std::numeric_limits::max()); 11 | } 12 | 13 | }//namespace glm 14 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtx/float_notmalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_float_normalize 2 | 3 | #include 4 | 5 | namespace glm 6 | { 7 | template 8 | GLM_FUNC_QUALIFIER vec floatNormalize(vec const& v) 9 | { 10 | return vec(v) / static_cast(std::numeric_limits::max()); 11 | } 12 | 13 | }//namespace glm 14 | -------------------------------------------------------------------------------- /engine/src/core/timestep.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace Enik { 4 | 5 | class Timestep { 6 | public: 7 | Timestep(float time = 0.0f) 8 | : m_Time(time) { 9 | } 10 | 11 | operator float() const { return m_Time; } 12 | 13 | inline float GetSeconds() const { return m_Time; } 14 | inline float GetMilliseconds() const { return m_Time * 1000.0f; } 15 | 16 | private: 17 | float m_Time; 18 | }; 19 | 20 | } -------------------------------------------------------------------------------- /project/module/api/glm/gtx/texture.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_texture 2 | 3 | namespace glm 4 | { 5 | template 6 | inline T levels(vec const& Extent) 7 | { 8 | return glm::log2(compMax(Extent)) + static_cast(1); 9 | } 10 | 11 | template 12 | inline T levels(T Extent) 13 | { 14 | return vec<1, T, defaultp>(Extent).x; 15 | } 16 | }//namespace glm 17 | 18 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtx/texture.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_texture 2 | 3 | namespace glm 4 | { 5 | template 6 | inline T levels(vec const& Extent) 7 | { 8 | return glm::log2(compMax(Extent)) + static_cast(1); 9 | } 10 | 11 | template 12 | inline T levels(T Extent) 13 | { 14 | return vec<1, T, defaultp>(Extent).x; 15 | } 16 | }//namespace glm 17 | 18 | -------------------------------------------------------------------------------- /engine/src/core/uuid.cpp: -------------------------------------------------------------------------------- 1 | #include "uuid.h" 2 | 3 | #include 4 | 5 | namespace Enik { 6 | 7 | static std::random_device s_RandomDevice; 8 | static std::mt19937_64 s_Engine(s_RandomDevice()); 9 | static std::uniform_int_distribution s_UniformDistribution; 10 | 11 | UUID::UUID() 12 | : m_UUID(s_UniformDistribution(s_Engine)) { 13 | } 14 | 15 | UUID::UUID(uint64_t uuid) 16 | : m_UUID(uuid) { 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtx/texture.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_texture 2 | 3 | namespace glm 4 | { 5 | template 6 | inline T levels(vec const& Extent) 7 | { 8 | return glm::log2(compMax(Extent)) + static_cast(1); 9 | } 10 | 11 | template 12 | inline T levels(T Extent) 13 | { 14 | return vec<1, T, defaultp>(Extent).x; 15 | } 16 | }//namespace glm 17 | 18 | -------------------------------------------------------------------------------- /engine/src/renderer/camera.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Enik { 6 | 7 | class Camera { 8 | public: 9 | Camera() = default; 10 | Camera(const glm::mat4& projection) 11 | : m_Projection(projection) {} 12 | 13 | virtual ~Camera() = default; 14 | 15 | const glm::mat4& GetProjection() const { return m_Projection; } 16 | 17 | protected: 18 | glm::mat4 m_Projection = glm::mat4(1.0f); 19 | }; 20 | 21 | } -------------------------------------------------------------------------------- /engine/src/asset/importer/texture_importer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "asset/asset.h" 3 | #include "asset/asset_metadata.h" 4 | #include "asset_importer.h" 5 | #include "renderer/texture.h" 6 | 7 | namespace Enik { 8 | class TextureImporter { 9 | public: 10 | static Ref ImportTexture2D(AssetHandle handle, const AssetMetadata& metadata); 11 | static Ref LoadTexture2D(const std::filesystem::path& path); 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /engine/src/script_system/extern_functions.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "scene/entity.h" 3 | #include "scene/components.h" 4 | 5 | namespace Enik { 6 | 7 | extern "C" const float GetFixedUpdateRate(); 8 | 9 | extern "C" Entity FindEntityByUUID(UUID uuid); 10 | 11 | extern "C" Entity FindEntityByName(const std::string& name); 12 | 13 | template 14 | T* GetScriptInstance(Entity entity) { 15 | return (T*)entity.GetScriptInstance(); 16 | } 17 | 18 | } -------------------------------------------------------------------------------- /engine/src/renderer/opengl/opengl_context.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "renderer/graphics_context.h" 3 | 4 | #include 5 | #include 6 | 7 | namespace Enik { 8 | class OpenGLContext : public GraphicsContext { 9 | public: 10 | OpenGLContext(GLFWwindow* window_handle); 11 | ~OpenGLContext(); 12 | 13 | virtual void Init() override; 14 | virtual void SwapBuffers() override; 15 | 16 | private: 17 | GLFWwindow* m_WindowHandle; 18 | }; 19 | 20 | } -------------------------------------------------------------------------------- /examples/snake-game/assets/prefabs/part.prefab: -------------------------------------------------------------------------------- 1 | Prefab: part 2 | Root: 18296753096676540133 3 | Entities: 4 | - Entity: 18296753096676540133 5 | Component::Tag: 6 | Text: part 7 | Component::Transform: 8 | Position: [-11, 10, 0] 9 | Rotation: [0, 0, 0, 1] 10 | Scale: [1, 1, 1] 11 | Component::SpriteRenderer: 12 | Color: [0.0799937099, 0.61181438, 0.0516299121, 1] 13 | TileScale: 1 14 | TextureHandle: 11505637482745298867 -------------------------------------------------------------------------------- /editor/src/editor.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "core/entry_point.h" 4 | #include "editor_layer.h" 5 | 6 | namespace Enik { 7 | 8 | class Editor : public Application { 9 | public: 10 | Editor() : Application("enik-engine") { 11 | EN_TRACE("Editor Created"); 12 | PushLayer(new EditorLayer()); 13 | } 14 | 15 | ~Editor() { 16 | EN_TRACE("Editor Deleted"); 17 | } 18 | }; 19 | 20 | Application* CreateApplication() { 21 | return new Editor(); 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /examples/squareup/module/src/common.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../api/enik.h" 3 | 4 | namespace Enik { 5 | 6 | 7 | enum class Primary { 8 | NONE = 0, 9 | PISTOL, RIFLE, SNIPER 10 | }; 11 | 12 | enum class Secondary { 13 | NONE = 0, 14 | BOMB, STUN_BOMB 15 | }; 16 | 17 | #define PLAYER_HEALTH 60 18 | #define ARENA_SCENE "assets/scenes/arena.escn" 19 | #define MENU_SCENE "assets/scenes/menu.escn" 20 | #define DEAD_SCENE "assets/scenes/dead.escn" 21 | 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /editor/src/tabs/text_editor_tab.cpp: -------------------------------------------------------------------------------- 1 | #include "text_editor_tab.h" 2 | 3 | namespace Enik { 4 | 5 | TextEditorTab::TextEditorTab(const std::filesystem::path& name) : EditorTab(name) { 6 | m_NoTabBar = true; 7 | SetWindowName(name.filename().string()); 8 | 9 | OpenTextFile(name); 10 | } 11 | 12 | void TextEditorTab::RenderContent() { 13 | m_Panel.OnImGuiRender(); 14 | } 15 | 16 | void TextEditorTab::InitializeDockspace() { 17 | m_Panel.DockTo(m_DockspaceID); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /project/module/api/glm/gtx/log_base.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_log_base 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType log(genType const& x, genType const& base) 7 | { 8 | return glm::log(x) / glm::log(base); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER vec log(vec const& x, vec const& base) 13 | { 14 | return glm::log(x) / glm::log(base); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /engine/external/glad/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.26.4) 2 | 3 | project(glad) 4 | 5 | 6 | file(GLOB include_files "${PROJECT_SOURCE_DIR}/include/glad/*.h") 7 | file(GLOB additional_include_files "$${PROJECT_SOURCE_DIR}/include/KHR/*.h") 8 | list(APPEND include_files ${additional_include_files}) 9 | 10 | add_library(glad src/glad.c ${include_files}) 11 | set_target_properties(glad PROPERTIES POSITION_INDEPENDENT_CODE ON) 12 | target_include_directories(glad PUBLIC include/) -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtx/log_base.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_log_base 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType log(genType const& x, genType const& base) 7 | { 8 | return glm::log(x) / glm::log(base); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER vec log(vec const& x, vec const& base) 13 | { 14 | return glm::log(x) / glm::log(base); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtx/log_base.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_log_base 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType log(genType const& x, genType const& base) 7 | { 8 | return glm::log(x) / glm::log(base); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER vec log(vec const& x, vec const& base) 13 | { 14 | return glm::log(x) / glm::log(base); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/quaternion_common_simd.inl: -------------------------------------------------------------------------------- 1 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 2 | 3 | namespace glm{ 4 | namespace detail 5 | { 6 | template 7 | struct compute_dot, float, true> 8 | { 9 | static GLM_FUNC_QUALIFIER float call(qua const& x, qua const& y) 10 | { 11 | return _mm_cvtss_f32(glm_vec1_dot(x.data, y.data)); 12 | } 13 | }; 14 | }//namespace detail 15 | }//namespace glm 16 | 17 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 18 | 19 | -------------------------------------------------------------------------------- /project/module/api/glm/simd/exponential.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/experimental.h 3 | 4 | #pragma once 5 | 6 | #include "platform.h" 7 | 8 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | 10 | GLM_FUNC_QUALIFIER glm_f32vec4 glm_vec1_sqrt_lowp(glm_f32vec4 x) 11 | { 12 | return _mm_mul_ss(_mm_rsqrt_ss(x), x); 13 | } 14 | 15 | GLM_FUNC_QUALIFIER glm_f32vec4 glm_vec4_sqrt_lowp(glm_f32vec4 x) 16 | { 17 | return _mm_mul_ps(_mm_rsqrt_ps(x), x); 18 | } 19 | 20 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 21 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/quaternion_common_simd.inl: -------------------------------------------------------------------------------- 1 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 2 | 3 | namespace glm{ 4 | namespace detail 5 | { 6 | template 7 | struct compute_dot, float, true> 8 | { 9 | static GLM_FUNC_QUALIFIER float call(qua const& x, qua const& y) 10 | { 11 | return _mm_cvtss_f32(glm_vec1_dot(x.data, y.data)); 12 | } 13 | }; 14 | }//namespace detail 15 | }//namespace glm 16 | 17 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 18 | 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/quaternion_common_simd.inl: -------------------------------------------------------------------------------- 1 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 2 | 3 | namespace glm{ 4 | namespace detail 5 | { 6 | template 7 | struct compute_dot, float, true> 8 | { 9 | static GLM_FUNC_QUALIFIER float call(qua const& x, qua const& y) 10 | { 11 | return _mm_cvtss_f32(glm_vec1_dot(x.data, y.data)); 12 | } 13 | }; 14 | }//namespace detail 15 | }//namespace glm 16 | 17 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 18 | 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/vector_bool2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, bool, defaultp> bvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/vector_bool3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, bool, defaultp> bvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/vector_bool4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, bool, defaultp> bvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /runtime/src/runtime_app.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "core/entry_point.h" 3 | 4 | #include "runtime.h" 5 | 6 | using namespace Enik; 7 | 8 | class RuntimeApp : public Application { 9 | public: 10 | RuntimeApp() : Application(PROJECT_TITLE) { 11 | EN_TRACE("Runtime Created"); 12 | PushLayer(new RuntimeLayer()); 13 | } 14 | 15 | ~RuntimeApp(){ 16 | EN_TRACE("Runtime Deleted"); 17 | } 18 | }; 19 | 20 | 21 | Enik::Application* Enik::CreateApplication(){ 22 | return new RuntimeApp(); 23 | } 24 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/simd/exponential.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/experimental.h 3 | 4 | #pragma once 5 | 6 | #include "platform.h" 7 | 8 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | 10 | GLM_FUNC_QUALIFIER glm_f32vec4 glm_vec1_sqrt_lowp(glm_f32vec4 x) 11 | { 12 | return _mm_mul_ss(_mm_rsqrt_ss(x), x); 13 | } 14 | 15 | GLM_FUNC_QUALIFIER glm_f32vec4 glm_vec4_sqrt_lowp(glm_f32vec4 x) 16 | { 17 | return _mm_mul_ps(_mm_rsqrt_ps(x), x); 18 | } 19 | 20 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 21 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/simd/exponential.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/experimental.h 3 | 4 | #pragma once 5 | 6 | #include "platform.h" 7 | 8 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | 10 | GLM_FUNC_QUALIFIER glm_f32vec4 glm_vec1_sqrt_lowp(glm_f32vec4 x) 11 | { 12 | return _mm_mul_ss(_mm_rsqrt_ss(x), x); 13 | } 14 | 15 | GLM_FUNC_QUALIFIER glm_f32vec4 glm_vec4_sqrt_lowp(glm_f32vec4 x) 16 | { 17 | return _mm_mul_ps(_mm_rsqrt_ps(x), x); 18 | } 19 | 20 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 21 | -------------------------------------------------------------------------------- /project/module/api/glm/gtx/optimum_pow.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_optimum_pow 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType pow2(genType const& x) 7 | { 8 | return x * x; 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER genType pow3(genType const& x) 13 | { 14 | return x * x * x; 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER genType pow4(genType const& x) 19 | { 20 | return (x * x) * (x * x); 21 | } 22 | }//namespace glm 23 | -------------------------------------------------------------------------------- /runtime/src/debug_info.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include "core/timestep.h" 5 | #include "events/key_event.h" 6 | 7 | 8 | namespace Enik { 9 | 10 | class DebugInfoPanel { 11 | public: 12 | void ShowDebugInfoPanel(Timestep timestep); 13 | 14 | bool OnKeyReleased(KeyReleasedEvent& event); 15 | 16 | private: 17 | int m_ShowDebugInfoPanel = 0; 18 | 19 | std::chrono::high_resolution_clock::time_point m_StartTime = std::chrono::high_resolution_clock::now(); 20 | }; 21 | 22 | } -------------------------------------------------------------------------------- /editor/assets/shaders/line_shader.glsl: -------------------------------------------------------------------------------- 1 | #type vertex 2 | #version 450 3 | 4 | layout(location = 0) in vec3 a_Position; 5 | layout(location = 1) in vec4 a_Color; 6 | 7 | uniform mat4 u_ViewProjection; 8 | 9 | out vec4 v_Color; 10 | 11 | void main() { 12 | v_Color = a_Color; 13 | gl_Position = u_ViewProjection * vec4(a_Position, 1.0); 14 | } 15 | 16 | 17 | #type fragment 18 | #version 450 19 | 20 | layout(location = 0) out vec4 color; 21 | 22 | in vec4 v_Color; 23 | 24 | void main() { 25 | color = v_Color; 26 | } -------------------------------------------------------------------------------- /engine/src/core/uuid.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #include 5 | 6 | namespace Enik { 7 | 8 | class UUID { 9 | public: 10 | UUID(); 11 | UUID(uint64_t uuid); 12 | UUID(const UUID&) = default; 13 | 14 | operator uint64_t() const { return m_UUID; } 15 | 16 | private: 17 | uint64_t m_UUID; 18 | }; 19 | 20 | } 21 | 22 | namespace std { 23 | template <> 24 | struct hash { 25 | size_t operator()(const Enik::UUID& uuid) const { 26 | return (uint64_t)uuid; 27 | } 28 | }; 29 | } -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/vector_bool2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, bool, defaultp> bvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/vector_bool3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, bool, defaultp> bvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/vector_bool4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, bool, defaultp> bvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/vector_bool2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, bool, defaultp> bvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/vector_bool3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, bool, defaultp> bvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/vector_bool4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, bool, defaultp> bvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/vector_int2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, int, defaultp> ivec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/vector_int3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, int, defaultp> ivec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/vector_int4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, int, defaultp> ivec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /editor/src/utils/utils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | 5 | namespace Enik { 6 | namespace Utils { 7 | 8 | void SortDirectoryEntries(std::vector& entries); 9 | 10 | bool FolderContainsFilesWithExtensions(const std::filesystem::path& directory, const std::vector& extensions, int depth = 10); 11 | 12 | void FilterFiles(std::vector& entries, const std::vector& filters, const bool remove_folders = true); 13 | 14 | } 15 | } -------------------------------------------------------------------------------- /examples/snake-game/project.enik: -------------------------------------------------------------------------------- 1 | Project: snake-game 2 | StartScene: assets/scenes/main.escn 3 | AssetRegistry: assets/asset.registry 4 | ScriptModule: module/libmodule.so 5 | 6 | # this was the first ever project built with enik-engine 7 | # there was no 8 | # text rendering 9 | # scene management 10 | # position inheritance 11 | # asset registry 12 | # physics system 13 | # animation system 14 | # 15 | # i have updated it so that it works fine 16 | # but this project should not be looked at as a good example 17 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtx/optimum_pow.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_optimum_pow 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType pow2(genType const& x) 7 | { 8 | return x * x; 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER genType pow3(genType const& x) 13 | { 14 | return x * x * x; 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER genType pow4(genType const& x) 19 | { 20 | return (x * x) * (x * x); 21 | } 22 | }//namespace glm 23 | -------------------------------------------------------------------------------- /project/module/api/glm/vec2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec2.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool2.hpp" 6 | #include "./ext/vector_bool2_precision.hpp" 7 | #include "./ext/vector_float2.hpp" 8 | #include "./ext/vector_float2_precision.hpp" 9 | #include "./ext/vector_double2.hpp" 10 | #include "./ext/vector_double2_precision.hpp" 11 | #include "./ext/vector_int2.hpp" 12 | #include "./ext/vector_int2_sized.hpp" 13 | #include "./ext/vector_uint2.hpp" 14 | #include "./ext/vector_uint2_sized.hpp" 15 | -------------------------------------------------------------------------------- /project/module/api/glm/vec3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec3.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool3.hpp" 6 | #include "./ext/vector_bool3_precision.hpp" 7 | #include "./ext/vector_float3.hpp" 8 | #include "./ext/vector_float3_precision.hpp" 9 | #include "./ext/vector_double3.hpp" 10 | #include "./ext/vector_double3_precision.hpp" 11 | #include "./ext/vector_int3.hpp" 12 | #include "./ext/vector_int3_sized.hpp" 13 | #include "./ext/vector_uint3.hpp" 14 | #include "./ext/vector_uint3_sized.hpp" 15 | -------------------------------------------------------------------------------- /engine/src/scene/tween.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "base.h" 3 | #include "core/timestep.h" 4 | 5 | 6 | namespace Enik { 7 | 8 | class Tween { 9 | public: 10 | static void Create(float* value, float end_value, float duration); 11 | static void Create(float* value, float start_value, float end_value, float duration); 12 | static void Create(float* value, float end_value, float duration, const std::function* call_on_end); 13 | 14 | static void StepAll(Timestep ts); 15 | 16 | static void ResetData(); 17 | }; 18 | 19 | } -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtx/optimum_pow.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_optimum_pow 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType pow2(genType const& x) 7 | { 8 | return x * x; 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER genType pow3(genType const& x) 13 | { 14 | return x * x * x; 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER genType pow4(genType const& x) 19 | { 20 | return (x * x) * (x * x); 21 | } 22 | }//namespace glm 23 | -------------------------------------------------------------------------------- /examples/squareup/assets/shaders/line_shader.glsl: -------------------------------------------------------------------------------- 1 | #type vertex 2 | #version 450 3 | 4 | layout(location = 0) in vec3 a_Position; 5 | layout(location = 1) in vec4 a_Color; 6 | 7 | uniform mat4 u_ViewProjection; 8 | 9 | out vec4 v_Color; 10 | 11 | void main() { 12 | v_Color = a_Color; 13 | gl_Position = u_ViewProjection * vec4(a_Position, 1.0); 14 | } 15 | 16 | 17 | #type fragment 18 | #version 450 19 | 20 | layout(location = 0) out vec4 color; 21 | 22 | in vec4 v_Color; 23 | 24 | void main() { 25 | color = v_Color; 26 | } -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/vector_int2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, int, defaultp> ivec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/vector_int3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, int, defaultp> ivec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/vector_int4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, int, defaultp> ivec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/vec4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec4.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool4.hpp" 6 | #include "./ext/vector_bool4_precision.hpp" 7 | #include "./ext/vector_float4.hpp" 8 | #include "./ext/vector_float4_precision.hpp" 9 | #include "./ext/vector_double4.hpp" 10 | #include "./ext/vector_double4_precision.hpp" 11 | #include "./ext/vector_int4.hpp" 12 | #include "./ext/vector_int4_sized.hpp" 13 | #include "./ext/vector_uint4.hpp" 14 | #include "./ext/vector_uint4_sized.hpp" 15 | 16 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/vector_int2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, int, defaultp> ivec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/vector_int3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, int, defaultp> ivec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/vector_int4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, int, defaultp> ivec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/vec2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec2.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool2.hpp" 6 | #include "./ext/vector_bool2_precision.hpp" 7 | #include "./ext/vector_float2.hpp" 8 | #include "./ext/vector_float2_precision.hpp" 9 | #include "./ext/vector_double2.hpp" 10 | #include "./ext/vector_double2_precision.hpp" 11 | #include "./ext/vector_int2.hpp" 12 | #include "./ext/vector_int2_sized.hpp" 13 | #include "./ext/vector_uint2.hpp" 14 | #include "./ext/vector_uint2_sized.hpp" 15 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/vec3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec3.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool3.hpp" 6 | #include "./ext/vector_bool3_precision.hpp" 7 | #include "./ext/vector_float3.hpp" 8 | #include "./ext/vector_float3_precision.hpp" 9 | #include "./ext/vector_double3.hpp" 10 | #include "./ext/vector_double3_precision.hpp" 11 | #include "./ext/vector_int3.hpp" 12 | #include "./ext/vector_int3_sized.hpp" 13 | #include "./ext/vector_uint3.hpp" 14 | #include "./ext/vector_uint3_sized.hpp" 15 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/vec2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec2.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool2.hpp" 6 | #include "./ext/vector_bool2_precision.hpp" 7 | #include "./ext/vector_float2.hpp" 8 | #include "./ext/vector_float2_precision.hpp" 9 | #include "./ext/vector_double2.hpp" 10 | #include "./ext/vector_double2_precision.hpp" 11 | #include "./ext/vector_int2.hpp" 12 | #include "./ext/vector_int2_sized.hpp" 13 | #include "./ext/vector_uint2.hpp" 14 | #include "./ext/vector_uint2_sized.hpp" 15 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/vec3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec3.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool3.hpp" 6 | #include "./ext/vector_bool3_precision.hpp" 7 | #include "./ext/vector_float3.hpp" 8 | #include "./ext/vector_float3_precision.hpp" 9 | #include "./ext/vector_double3.hpp" 10 | #include "./ext/vector_double3_precision.hpp" 11 | #include "./ext/vector_int3.hpp" 12 | #include "./ext/vector_int3_sized.hpp" 13 | #include "./ext/vector_uint3.hpp" 14 | #include "./ext/vector_uint3_sized.hpp" 15 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/vector_uint2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, unsigned int, defaultp> uvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/vector_uint3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, unsigned int, defaultp> uvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/vector_uint4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, unsigned int, defaultp> uvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /engine/src/asset/importer/animation_importer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "asset/asset.h" 3 | #include "asset/asset_metadata.h" 4 | #include "scene/animation.h" 5 | 6 | namespace Enik { 7 | class AnimationImporter { 8 | public: 9 | static Ref ImportAnimation(AssetHandle handle, const AssetMetadata& metadata); 10 | static Ref DeserializeAnimation(const std::filesystem::path& path); 11 | static void SerializeAnimation(const Ref& animation, const std::filesystem::path& path); 12 | }; 13 | 14 | 15 | } 16 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/vec4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec4.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool4.hpp" 6 | #include "./ext/vector_bool4_precision.hpp" 7 | #include "./ext/vector_float4.hpp" 8 | #include "./ext/vector_float4_precision.hpp" 9 | #include "./ext/vector_double4.hpp" 10 | #include "./ext/vector_double4_precision.hpp" 11 | #include "./ext/vector_int4.hpp" 12 | #include "./ext/vector_int4_sized.hpp" 13 | #include "./ext/vector_uint4.hpp" 14 | #include "./ext/vector_uint4_sized.hpp" 15 | 16 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/vec4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec4.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool4.hpp" 6 | #include "./ext/vector_bool4_precision.hpp" 7 | #include "./ext/vector_float4.hpp" 8 | #include "./ext/vector_float4_precision.hpp" 9 | #include "./ext/vector_double4.hpp" 10 | #include "./ext/vector_double4_precision.hpp" 11 | #include "./ext/vector_int4.hpp" 12 | #include "./ext/vector_int4_sized.hpp" 13 | #include "./ext/vector_uint4.hpp" 14 | #include "./ext/vector_uint4_sized.hpp" 15 | 16 | -------------------------------------------------------------------------------- /project/module/api/glm/detail/_fixes.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | //! Workaround for compatibility with other libraries 4 | #ifdef max 5 | #undef max 6 | #endif 7 | 8 | //! Workaround for compatibility with other libraries 9 | #ifdef min 10 | #undef min 11 | #endif 12 | 13 | //! Workaround for Android 14 | #ifdef isnan 15 | #undef isnan 16 | #endif 17 | 18 | //! Workaround for Android 19 | #ifdef isinf 20 | #undef isinf 21 | #endif 22 | 23 | //! Workaround for Chrone Native Client 24 | #ifdef log2 25 | #undef log2 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.26.4) 2 | 3 | project(engine_env) 4 | 5 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") 6 | 7 | set(CMAKE_CXX_STANDARD 17) 8 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 9 | set(CMAKE_CXX_EXTENSIONS OFF) 10 | 11 | if (MSVC) 12 | set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") 13 | endif() 14 | 15 | if(DEFINED CMAKE_TOOLCHAIN_FILE) 16 | include(${CMAKE_TOOLCHAIN_FILE}) 17 | endif() 18 | 19 | add_subdirectory(editor) 20 | add_subdirectory(runtime) 21 | add_subdirectory(engine) -------------------------------------------------------------------------------- /engine/src/script_system/extern_functions.cpp: -------------------------------------------------------------------------------- 1 | #include "extern_functions.h" 2 | 3 | #include "script_system/script_system.h" 4 | #include "physics/physics.h" 5 | 6 | namespace Enik { 7 | const float GetFixedUpdateRate() { 8 | return PHYSICS_UPDATE_RATE; 9 | } 10 | 11 | Entity FindEntityByUUID(UUID uuid) { 12 | return ScriptSystem::GetSceneContext()->FindEntityByUUID(uuid); 13 | } 14 | 15 | Entity FindEntityByName(const std::string& name) { 16 | return ScriptSystem::GetSceneContext()->FindEntityByName(name); 17 | } 18 | 19 | 20 | } -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/vector_uint2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, unsigned int, defaultp> uvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/vector_uint3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, unsigned int, defaultp> uvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/vector_uint4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, unsigned int, defaultp> uvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/vector_uint2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, unsigned int, defaultp> uvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/vector_uint3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, unsigned int, defaultp> uvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/vector_uint4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, unsigned int, defaultp> uvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/vector_float2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, float, defaultp> vec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/vector_float3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, float, defaultp> vec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/vector_float4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, float, defaultp> vec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/detail/_fixes.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | //! Workaround for compatibility with other libraries 4 | #ifdef max 5 | #undef max 6 | #endif 7 | 8 | //! Workaround for compatibility with other libraries 9 | #ifdef min 10 | #undef min 11 | #endif 12 | 13 | //! Workaround for Android 14 | #ifdef isnan 15 | #undef isnan 16 | #endif 17 | 18 | //! Workaround for Android 19 | #ifdef isinf 20 | #undef isinf 21 | #endif 22 | 23 | //! Workaround for Chrone Native Client 24 | #ifdef log2 25 | #undef log2 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/detail/_fixes.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | //! Workaround for compatibility with other libraries 4 | #ifdef max 5 | #undef max 6 | #endif 7 | 8 | //! Workaround for compatibility with other libraries 9 | #ifdef min 10 | #undef min 11 | #endif 12 | 13 | //! Workaround for Android 14 | #ifdef isnan 15 | #undef isnan 16 | #endif 17 | 18 | //! Workaround for Android 19 | #ifdef isinf 20 | #undef isinf 21 | #endif 22 | 23 | //! Workaround for Chrone Native Client 24 | #ifdef log2 25 | #undef log2 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/vector_double2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, double, defaultp> dvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/vector_double3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, double, defaultp> dvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/vector_double4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, double, defaultp> dvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/vector_float2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, float, defaultp> vec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/vector_float3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, float, defaultp> vec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/vector_float4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, float, defaultp> vec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/vector_float2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, float, defaultp> vec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/vector_float3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, float, defaultp> vec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/vector_float4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, float, defaultp> vec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/vector_double2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, double, defaultp> dvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/vector_double3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, double, defaultp> dvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/vector_double4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, double, defaultp> dvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/vector_double2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, double, defaultp> dvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/vector_double3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, double, defaultp> dvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/vector_double4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, double, defaultp> dvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /editor/src/tabs/home_tab.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "editor_layer.h" 4 | #include "editor_tab.h" 5 | #include "renderer/texture.h" 6 | 7 | 8 | namespace Enik { 9 | 10 | 11 | class HomeTab : public EditorTab { 12 | public: 13 | HomeTab(); 14 | 15 | private: 16 | virtual void RenderContent() override final; 17 | virtual void InitializeDockspace() override final; 18 | 19 | void ShowNewProject(); 20 | 21 | bool m_StartShowingNewProject = false; 22 | NewProjectType m_NewProjType = NewProjectType::EXAMPLE_SQUAREUP; 23 | 24 | }; 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/matrix_float2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 3, float, defaultp> mat2x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/matrix_float2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 4, float, defaultp> mat2x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/matrix_float3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 2, float, defaultp> mat3x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/matrix_float3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 4, float, defaultp> mat3x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/matrix_float4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 2, float, defaultp> mat4x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/matrix_float4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 3, float, defaultp> mat4x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/matrix_double2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 3, double, defaultp> dmat2x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/matrix_double2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 4, double, defaultp> dmat2x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/matrix_double3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 2, double, defaultp> dmat3x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/matrix_double3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 4, double, defaultp> dmat3x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/matrix_double4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 2, double, defaultp> dmat4x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/matrix_double4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 3, double, defaultp> dmat4x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/matrix_float2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 3, float, defaultp> mat2x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/matrix_float2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 4, float, defaultp> mat2x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/matrix_float3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 2, float, defaultp> mat3x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/matrix_float3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 4, float, defaultp> mat3x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/matrix_float4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 2, float, defaultp> mat4x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/matrix_float4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 3, float, defaultp> mat4x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/matrix_float2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 3, float, defaultp> mat2x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/matrix_float2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 4, float, defaultp> mat2x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/matrix_float3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 2, float, defaultp> mat3x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/matrix_float3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 4, float, defaultp> mat3x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/matrix_float4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 2, float, defaultp> mat4x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/matrix_float4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 3, float, defaultp> mat4x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/matrix_double2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 3, double, defaultp> dmat2x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/matrix_double2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 4, double, defaultp> dmat2x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/matrix_double3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 2, double, defaultp> dmat3x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/matrix_double3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 4, double, defaultp> dmat3x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/matrix_double4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 2, double, defaultp> dmat4x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/matrix_double4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 3, double, defaultp> dmat4x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/matrix_double2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 3, double, defaultp> dmat2x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/matrix_double2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 4, double, defaultp> dmat2x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/matrix_double3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 2, double, defaultp> dmat3x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/matrix_double3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 4, double, defaultp> dmat3x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/matrix_double4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 2, double, defaultp> dmat4x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/matrix_double4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 3, double, defaultp> dmat4x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /examples/squareup/module/src/dead_score.cpp: -------------------------------------------------------------------------------- 1 | #include "../api/enik.h" 2 | #include "globals.h" 3 | 4 | namespace Enik { 5 | 6 | class DeadScore : public ScriptableEntity { 7 | public: 8 | virtual void OnCreate() override { 9 | if (Globals* g = GetGlobals()) { 10 | int sc = g->score; 11 | if (sc > 0) { 12 | Get().Data = std::to_string(sc); 13 | } else { 14 | Get().Data = " 0"; 15 | } 16 | if (Entity ge = Enik::FindEntityByName("GLOBALS")) { 17 | DestroyEntity(ge); 18 | } 19 | } 20 | } 21 | }; 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /project/module/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.26) 2 | 3 | project(module LANGUAGES CXX) 4 | 5 | set(CMAKE_CXX_STANDARD 17) 6 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 7 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") 8 | 9 | file(GLOB_RECURSE source_files "${PROJECT_SOURCE_DIR}/module.cpp" "${PROJECT_SOURCE_DIR}/src/*.cpp") 10 | 11 | add_library(${PROJECT_NAME} SHARED ${source_files}) 12 | 13 | target_include_directories(${PROJECT_NAME} 14 | PRIVATE 15 | ${PROJECT_SOURCE_DIR} 16 | ${PROJECT_SOURCE_DIR}/api 17 | ${PROJECT_SOURCE_DIR}/engine 18 | ) 19 | 20 | -------------------------------------------------------------------------------- /examples/snake-game/module/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.26) 2 | 3 | project(module LANGUAGES CXX) 4 | 5 | set(CMAKE_CXX_STANDARD 17) 6 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 7 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") 8 | 9 | file(GLOB_RECURSE source_files "${PROJECT_SOURCE_DIR}/module.cpp" "${PROJECT_SOURCE_DIR}/src/*.cpp") 10 | 11 | add_library(${PROJECT_NAME} SHARED ${source_files}) 12 | 13 | target_include_directories(${PROJECT_NAME} 14 | PRIVATE 15 | ${PROJECT_SOURCE_DIR} 16 | ${PROJECT_SOURCE_DIR}/api 17 | ${PROJECT_SOURCE_DIR}/engine 18 | ) 19 | 20 | -------------------------------------------------------------------------------- /examples/squareup/module/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.26) 2 | 3 | project(module LANGUAGES CXX) 4 | 5 | set(CMAKE_CXX_STANDARD 17) 6 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 7 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") 8 | 9 | file(GLOB_RECURSE source_files "${PROJECT_SOURCE_DIR}/module.cpp" "${PROJECT_SOURCE_DIR}/src/*.cpp") 10 | 11 | add_library(${PROJECT_NAME} SHARED ${source_files}) 12 | 13 | target_include_directories(${PROJECT_NAME} 14 | PRIVATE 15 | ${PROJECT_SOURCE_DIR} 16 | ${PROJECT_SOURCE_DIR}/api 17 | ${PROJECT_SOURCE_DIR}/engine 18 | ) 19 | 20 | -------------------------------------------------------------------------------- /engine/src/asset/asset.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "base.h" 4 | #include "core/uuid.h" 5 | 6 | namespace Enik { 7 | 8 | using AssetHandle = UUID; 9 | 10 | enum class AssetType : uint16_t { 11 | None = 0, 12 | Scene, Prefab, 13 | Texture2D, 14 | Font, 15 | Sound, 16 | Animation, 17 | }; 18 | 19 | const char* AssetTypeToString(AssetType type); 20 | AssetType AssetTypeFromString(std::string type); 21 | 22 | class Asset { 23 | public: 24 | virtual ~Asset() = default; 25 | 26 | virtual AssetType GetType() const = 0; 27 | 28 | public: 29 | AssetHandle Handle; 30 | }; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /engine/src/script_system/script_registry.cpp: -------------------------------------------------------------------------------- 1 | #include "script_registry.h" 2 | 3 | namespace Enik { 4 | 5 | static std::unordered_map s_ScriptRegistry; 6 | 7 | void ScriptRegistry::RegisterScriptClass(const std::string& class_name, ScriptableEntity* (*create_function)()) { 8 | s_ScriptRegistry[class_name] = create_function; 9 | } 10 | 11 | std::unordered_map& ScriptRegistry::GetRegistry() { 12 | return s_ScriptRegistry; 13 | } 14 | 15 | void ScriptRegistry::ClearRegistry() { 16 | s_ScriptRegistry.clear(); 17 | } 18 | } -------------------------------------------------------------------------------- /project/module/api/glm/gtx/normalize_dot.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normalize_dot 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER T normalizeDot(vec const& x, vec const& y) 7 | { 8 | return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y)); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER T fastNormalizeDot(vec const& x, vec const& y) 13 | { 14 | return glm::dot(x, y) * glm::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y)); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtx/normalize_dot.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normalize_dot 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER T normalizeDot(vec const& x, vec const& y) 7 | { 8 | return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y)); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER T fastNormalizeDot(vec const& x, vec const& y) 13 | { 14 | return glm::dot(x, y) * glm::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y)); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /editor/src/tabs/text_editor_tab.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "editor_tab.h" 4 | #include "panels/text_editor.h" 5 | 6 | 7 | namespace Enik { 8 | 9 | class TextEditorTab : public EditorTab { 10 | public: 11 | TextEditorTab(const std::filesystem::path& name); 12 | 13 | bool OpenTextFile(const std::filesystem::path& path) { 14 | return m_Panel.OpenTextFile(path); 15 | } 16 | 17 | 18 | private: 19 | virtual void RenderContent() override final; 20 | virtual void InitializeDockspace() override final; 21 | 22 | 23 | private: 24 | TextEditorPanel m_Panel; 25 | 26 | 27 | }; 28 | 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtx/normalize_dot.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normalize_dot 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER T normalizeDot(vec const& x, vec const& y) 7 | { 8 | return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y)); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER T fastNormalizeDot(vec const& x, vec const& y) 13 | { 14 | return glm::dot(x, y) * glm::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y)); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /engine/src/renderer/vertex_array.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "vertex_array.h" 3 | #include "renderer.h" 4 | #include "opengl/opengl_vertex_array.h" 5 | 6 | namespace Enik { 7 | 8 | Ref VertexArray::Create() { 9 | switch (Renderer::GetAPI()) { 10 | case RendererAPI::API::OpenGL: 11 | return CreateRef(); 12 | 13 | case RendererAPI::API::None: 14 | EN_CORE_ASSERT(false, "RendererAPI::None is currently not supported"); 15 | return nullptr; 16 | 17 | default: 18 | EN_CORE_ASSERT(false, "Unknown RendererAPI"); 19 | return nullptr; 20 | } 21 | } 22 | 23 | 24 | } -------------------------------------------------------------------------------- /engine/src/asset/asset_manager_base.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "base.h" 4 | #include "asset.h" 5 | #include 6 | 7 | namespace Enik { 8 | 9 | using AssetMap = std::map>; 10 | 11 | class AssetManagerBase { 12 | public: 13 | virtual bool IsAssetHandleValid(AssetHandle handle) const = 0; 14 | virtual bool IsAssetLoaded(AssetHandle handle) const = 0; 15 | virtual Ref GetAsset(AssetHandle handle) = 0; 16 | virtual AssetType GetAssetType(AssetHandle handle) const = 0; 17 | virtual const std::filesystem::path& GetAssetPath(AssetHandle handle) const = 0; 18 | 19 | }; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /engine/src/layers/layer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include "events/event.h" 5 | #include "core/timestep.h" 6 | 7 | namespace Enik { 8 | 9 | class Layer { 10 | public: 11 | Layer(const std::string& name = "Layer"); 12 | virtual ~Layer(); 13 | 14 | virtual void OnAttach() {} 15 | virtual void OnDetach() {} 16 | virtual void OnUpdate(Timestep ts) {} 17 | virtual void OnFixedUpdate() {} 18 | virtual void OnImGuiRender() {} 19 | virtual void OnEvent(Event& event) {} 20 | 21 | inline const std::string& GetName() const { return m_DebugName; } 22 | 23 | protected: 24 | std::string m_DebugName; 25 | 26 | }; 27 | 28 | } -------------------------------------------------------------------------------- /engine/src/layers/layer_stack.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include "layer.h" 5 | 6 | #include 7 | 8 | namespace Enik { 9 | 10 | class LayerStack { 11 | public: 12 | LayerStack(); 13 | ~LayerStack(); 14 | 15 | void PushLayer(Layer* layer); 16 | void PushOverlay(Layer* overlay); 17 | void PopLayer(Layer* layer); 18 | void PopOverlay(Layer* overlay); 19 | 20 | std::vector::iterator begin() { return m_Layers.begin(); } 21 | std::vector::iterator end() { return m_Layers.end(); } 22 | 23 | private: 24 | std::vector m_Layers; 25 | unsigned int m_LayerInsertIndex = 0; 26 | }; 27 | 28 | } -------------------------------------------------------------------------------- /engine/src/renderer/texture.cpp: -------------------------------------------------------------------------------- 1 | #include "texture.h" 2 | #include "renderer.h" 3 | #include "opengl/opengl_texture.h" 4 | 5 | 6 | namespace Enik { 7 | Ref Texture2D::Create(const TextureSpecification& specification, Buffer data) { 8 | switch (Renderer::GetAPI()) { 9 | case RendererAPI::API::OpenGL: 10 | return CreateRef(specification, data); 11 | 12 | case RendererAPI::API::None: 13 | EN_CORE_ASSERT(false, "RendererAPI::None is currently not supported"); 14 | return nullptr; 15 | 16 | default: 17 | EN_CORE_ASSERT(false, "Unknown RendererAPI"); 18 | return nullptr; 19 | } 20 | } 21 | 22 | 23 | } -------------------------------------------------------------------------------- /examples/snake-game/module/module.cpp: -------------------------------------------------------------------------------- 1 | #include "api/enik.h" 2 | 3 | #include "src/game_manager.h" 4 | #include "src/snake.h" 5 | #include "src/button_container.h" 6 | #include "src/main_menu.h" 7 | #include "src/digit.h" 8 | #include "src/number_display.h" 9 | 10 | #define REGISTER(name) Enik::ScriptRegistry::RegisterScriptClass(#name, \ 11 | []() -> Enik::ScriptableEntity* { return new Enik::name(); }); 12 | 13 | 14 | 15 | extern "C" void RegisterAllScripts() { 16 | REGISTER(GameManager); 17 | REGISTER(Snake); 18 | REGISTER(ButtonContainer); 19 | REGISTER(MainMenu); 20 | REGISTER(Digit); 21 | REGISTER(NumberDisplay); 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /engine/src/renderer/font.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "asset/asset.h" 3 | #include "glm.hpp" 4 | #include "renderer/texture.h" 5 | 6 | namespace Enik { 7 | 8 | struct Glyph { 9 | glm::vec2 tex_coords[4]; 10 | glm::vec2 positions[4]; 11 | glm::vec2 Size; 12 | uint32_t Advance; 13 | }; 14 | 15 | class FontAsset : public Asset { 16 | public: 17 | virtual ~FontAsset() = default; 18 | 19 | static AssetType GetStaticType() { return AssetType::Font; } 20 | virtual AssetType GetType() const override { return GetStaticType(); } 21 | 22 | public: 23 | Ref AtlasTexture; 24 | std::vector Glyphs; 25 | uint32_t TextHeight; 26 | }; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /examples/snake-game/module/src/digit.cpp: -------------------------------------------------------------------------------- 1 | #include "digit.h" 2 | 3 | 4 | namespace Enik { 5 | 6 | 7 | void Digit::SetDigit(int value) { 8 | if (value < 0 or value > 9) { 9 | CONSOLE_DEBUGS_ERROR("Digit::SetDigit Invalid value {}", std::to_string(value)); 10 | return; 11 | } 12 | m_value = value; 13 | UpdateDigit(); 14 | } 15 | 16 | void Digit::UpdateDigit() { 17 | for (int i = 0; i < 10; i++) { 18 | if (Entity ent = FindEntityByUUID(m_entities[i])) { 19 | ent.Get().Color.a = 0.0f; 20 | if (i == m_value) { 21 | ent.Get().Color.a = 1.0f; 22 | } 23 | } 24 | } 25 | } 26 | 27 | 28 | } -------------------------------------------------------------------------------- /engine/src/renderer/vertex_array.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include "buffer.h" 4 | 5 | namespace Enik { 6 | 7 | 8 | class VertexArray { 9 | public: 10 | virtual ~VertexArray() {} 11 | 12 | virtual void Bind() const = 0; 13 | virtual void Unbind() const = 0; 14 | 15 | virtual void AddVertexBuffer(const Ref& vertex_buffer) = 0; 16 | virtual void SetIndexBuffer (const Ref& index_buffer ) = 0; 17 | 18 | virtual const std::vector>& GetVertexBuffers() const = 0; 19 | virtual const Ref& GetIndexBuffer() const = 0; 20 | 21 | static Ref Create(); 22 | 23 | }; 24 | 25 | 26 | } -------------------------------------------------------------------------------- /engine/src/renderer/frame_buffer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "frame_buffer.h" 3 | #include "renderer/renderer.h" 4 | #include "renderer/opengl/opengl_frame_buffer.h" 5 | 6 | namespace Enik { 7 | 8 | 9 | Ref FrameBuffer::Create(const FrameBufferSpecification& spec) { 10 | switch (Renderer::GetAPI()) { 11 | case RendererAPI::API::OpenGL: 12 | return CreateRef(spec); 13 | 14 | case RendererAPI::API::None: 15 | EN_CORE_ASSERT(false, "RendererAPI::None is currently not supported"); 16 | return nullptr; 17 | 18 | default: 19 | EN_CORE_ASSERT(false, "Unknown RendererAPI"); 20 | return nullptr; 21 | } 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /engine/src/renderer/opengl/opengl_renderer_api.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "renderer/renderer_api.h" 3 | 4 | namespace Enik { 5 | 6 | class OpenGLRendererAPI : public RendererAPI { 7 | public: 8 | virtual void Init() override final; 9 | virtual void SetViewport(uint32_t x, uint32_t y, uint32_t width, uint32_t height) override final; 10 | 11 | virtual void SetClearColor(const glm::vec4& color) override final; 12 | virtual void Clear() override final; 13 | 14 | virtual void DrawIndexed(const Ref& vertex_array, uint32_t index_count) override final; 15 | virtual void DrawLine(const Ref& vertex_array, uint32_t vertex_count) override final; 16 | }; 17 | 18 | 19 | } -------------------------------------------------------------------------------- /editor/src/utils/editor_assets.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "renderer/texture.h" 3 | 4 | namespace Enik { 5 | 6 | enum class NewProjectType { 7 | EXAMPLE_SQUAREUP, 8 | EXAMPLE_SNAKE, 9 | EMPTY 10 | }; 11 | 12 | 13 | class EditorAssets { 14 | public: 15 | static void LoadEditorAssets(const std::filesystem::path& engine_source_path); 16 | 17 | public: 18 | static Ref Play, Stop, Pause, Step; 19 | static Ref Select, Move, Scale, Rotate; 20 | static Ref Banner; 21 | 22 | static std::filesystem::path ProjectTemplate; 23 | static std::filesystem::path ExampleSnakeGame; 24 | static std::filesystem::path ExampleSquareUp; 25 | 26 | }; 27 | 28 | } 29 | 30 | -------------------------------------------------------------------------------- /project/module/api/glm/gtx/handed_coordinate_space.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_handed_coordinate_space 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER bool rightHanded 7 | ( 8 | vec<3, T, Q> const& tangent, 9 | vec<3, T, Q> const& binormal, 10 | vec<3, T, Q> const& normal 11 | ) 12 | { 13 | return dot(cross(normal, tangent), binormal) > T(0); 14 | } 15 | 16 | template 17 | GLM_FUNC_QUALIFIER bool leftHanded 18 | ( 19 | vec<3, T, Q> const& tangent, 20 | vec<3, T, Q> const& binormal, 21 | vec<3, T, Q> const& normal 22 | ) 23 | { 24 | return dot(cross(normal, tangent), binormal) < T(0); 25 | } 26 | }//namespace glm 27 | -------------------------------------------------------------------------------- /engine/src/events/mouse_codes.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Enik 6 | { 7 | using MouseCode = uint16_t; 8 | 9 | namespace Mouse 10 | { 11 | enum : MouseCode 12 | { 13 | // From glfw3.h 14 | Button0 = 0, 15 | Button1 = 1, 16 | Button2 = 2, 17 | Button3 = 3, 18 | Button4 = 4, 19 | Button5 = 5, 20 | Button6 = 6, 21 | Button7 = 7, 22 | 23 | ButtonLast = Button7, 24 | ButtonLeft = Button0, 25 | ButtonRight = Button1, 26 | ButtonMiddle = Button2 27 | }; 28 | } 29 | } -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtx/handed_coordinate_space.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_handed_coordinate_space 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER bool rightHanded 7 | ( 8 | vec<3, T, Q> const& tangent, 9 | vec<3, T, Q> const& binormal, 10 | vec<3, T, Q> const& normal 11 | ) 12 | { 13 | return dot(cross(normal, tangent), binormal) > T(0); 14 | } 15 | 16 | template 17 | GLM_FUNC_QUALIFIER bool leftHanded 18 | ( 19 | vec<3, T, Q> const& tangent, 20 | vec<3, T, Q> const& binormal, 21 | vec<3, T, Q> const& normal 22 | ) 23 | { 24 | return dot(cross(normal, tangent), binormal) < T(0); 25 | } 26 | }//namespace glm 27 | -------------------------------------------------------------------------------- /project/module/api/glm/gtx/transform.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_transform 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> translate(vec<3, T, Q> const& v) 7 | { 8 | return translate(mat<4, 4, T, Q>(static_cast(1)), v); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> rotate(T angle, vec<3, T, Q> const& v) 13 | { 14 | return rotate(mat<4, 4, T, Q>(static_cast(1)), angle, v); 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> scale(vec<3, T, Q> const& v) 19 | { 20 | return scale(mat<4, 4, T, Q>(static_cast(1)), v); 21 | } 22 | 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtx/handed_coordinate_space.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_handed_coordinate_space 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER bool rightHanded 7 | ( 8 | vec<3, T, Q> const& tangent, 9 | vec<3, T, Q> const& binormal, 10 | vec<3, T, Q> const& normal 11 | ) 12 | { 13 | return dot(cross(normal, tangent), binormal) > T(0); 14 | } 15 | 16 | template 17 | GLM_FUNC_QUALIFIER bool leftHanded 18 | ( 19 | vec<3, T, Q> const& tangent, 20 | vec<3, T, Q> const& binormal, 21 | vec<3, T, Q> const& normal 22 | ) 23 | { 24 | return dot(cross(normal, tangent), binormal) < T(0); 25 | } 26 | }//namespace glm 27 | -------------------------------------------------------------------------------- /project/module/api/glm/gtc/reciprocal.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_reciprocal 2 | /// @file glm/gtc/reciprocal.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtc_reciprocal GLM_GTC_reciprocal 7 | /// @ingroup gtc 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Define secant, cosecant and cotangent functions. 12 | 13 | #pragma once 14 | 15 | // Dependencies 16 | #include "../detail/setup.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_GTC_reciprocal extension included") 20 | #endif 21 | 22 | #include "../ext/scalar_reciprocal.hpp" 23 | #include "../ext/vector_reciprocal.hpp" 24 | 25 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtx/transform.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_transform 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> translate(vec<3, T, Q> const& v) 7 | { 8 | return translate(mat<4, 4, T, Q>(static_cast(1)), v); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> rotate(T angle, vec<3, T, Q> const& v) 13 | { 14 | return rotate(mat<4, 4, T, Q>(static_cast(1)), angle, v); 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> scale(vec<3, T, Q> const& v) 19 | { 20 | return scale(mat<4, 4, T, Q>(static_cast(1)), v); 21 | } 22 | 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtx/transform.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_transform 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> translate(vec<3, T, Q> const& v) 7 | { 8 | return translate(mat<4, 4, T, Q>(static_cast(1)), v); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> rotate(T angle, vec<3, T, Q> const& v) 13 | { 14 | return rotate(mat<4, 4, T, Q>(static_cast(1)), angle, v); 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> scale(vec<3, T, Q> const& v) 19 | { 20 | return scale(mat<4, 4, T, Q>(static_cast(1)), v); 21 | } 22 | 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtc/reciprocal.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_reciprocal 2 | /// @file glm/gtc/reciprocal.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtc_reciprocal GLM_GTC_reciprocal 7 | /// @ingroup gtc 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Define secant, cosecant and cotangent functions. 12 | 13 | #pragma once 14 | 15 | // Dependencies 16 | #include "../detail/setup.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_GTC_reciprocal extension included") 20 | #endif 21 | 22 | #include "../ext/scalar_reciprocal.hpp" 23 | #include "../ext/vector_reciprocal.hpp" 24 | 25 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtc/reciprocal.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_reciprocal 2 | /// @file glm/gtc/reciprocal.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtc_reciprocal GLM_GTC_reciprocal 7 | /// @ingroup gtc 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Define secant, cosecant and cotangent functions. 12 | 13 | #pragma once 14 | 15 | // Dependencies 16 | #include "../detail/setup.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_GTC_reciprocal extension included") 20 | #endif 21 | 22 | #include "../ext/scalar_reciprocal.hpp" 23 | #include "../ext/vector_reciprocal.hpp" 24 | 25 | -------------------------------------------------------------------------------- /engine/src/layers/imgui_layer/imgui_layer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "events/application_event.h" 6 | #include "events/event.h" 7 | #include "events/key_event.h" 8 | #include "events/mouse_event.h" 9 | #include "layers/layer.h" 10 | 11 | namespace Enik { 12 | 13 | class ImGuiLayer : public Layer { 14 | public: 15 | ImGuiLayer(); 16 | ~ImGuiLayer(); 17 | 18 | void OnAttach() override; 19 | void OnDetach() override; 20 | virtual void OnEvent(Event& e) override final; 21 | 22 | void Begin(); 23 | void End(); 24 | void ShowTestingWindow(); 25 | 26 | void BlockEvents(bool block) { m_BlockEvents = block; } 27 | 28 | uint32_t GetActiveWidgetID(); 29 | 30 | private: 31 | bool m_BlockEvents = true; 32 | }; 33 | 34 | } -------------------------------------------------------------------------------- /engine/src/physics/physics_body.cpp: -------------------------------------------------------------------------------- 1 | #include "physics_body.h" 2 | #include "Jolt/Physics/Body/MotionType.h" 3 | 4 | namespace Enik { 5 | 6 | const char* MotionTypeToString(JPH::EMotionType t) { 7 | switch (t) { 8 | case JPH::EMotionType::Static: return "Static"; 9 | case JPH::EMotionType::Dynamic: return "Dynamic"; 10 | case JPH::EMotionType::Kinematic: return "Kinematic"; 11 | } 12 | return ""; 13 | } 14 | 15 | JPH::EMotionType MotionTypeFromString(const std::string& str) { 16 | if (str == "Static") { return JPH::EMotionType::Static; } 17 | if (str == "Dynamic") { return JPH::EMotionType::Dynamic; } 18 | if (str == "Kinematic") { return JPH::EMotionType::Kinematic; } 19 | return JPH::EMotionType::Static; 20 | } 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /editor/src/panels/editor_panel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | #include "base.h" 5 | #include 6 | #include 7 | 8 | namespace Enik { 9 | 10 | class EditorPanel { 11 | public: 12 | explicit EditorPanel(const std::string& name) : m_PanelID(s_PanelIDCounter++), m_Name(name), m_WindowName(m_Name + "##pan" + std::to_string(m_PanelID)) {} 13 | virtual ~EditorPanel() = default; 14 | 15 | void OnImGuiRender(); 16 | 17 | void DockTo(ImGuiID dockspace_id); 18 | 19 | protected: 20 | int m_PanelID; 21 | const std::string m_Name; 22 | const std::string m_WindowName; 23 | 24 | bool BeginPanel(); 25 | virtual void RenderContent() = 0; 26 | 27 | 28 | private: 29 | static int s_PanelIDCounter; 30 | 31 | }; 32 | 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /examples/squareup/module/src/gui.cpp: -------------------------------------------------------------------------------- 1 | #include "gui.h" 2 | 3 | namespace Enik { 4 | 5 | void GUI::OnCreate() { 6 | } 7 | 8 | void GUI::OnUpdate(Timestep t) { 9 | } 10 | 11 | void GUI::SetHealth(float hp) { 12 | int visible_hearts = static_cast(std::ceil(hp / 10.0f)); 13 | 14 | for (int i = 0; i < 3; ++i) { 15 | auto& heart = FindEntityByUUID(m_Hearts[i]).Get(); 16 | heart.Color.a = (i < visible_hearts) ? 1.0f : 0.0f; 17 | } 18 | } 19 | 20 | void GUI::SetScore(int sc) { 21 | Entity score = FindEntityByUUID(m_Score); 22 | if (score) { 23 | if (sc > 0) { 24 | score.Get().Data = std::to_string(sc); 25 | } else { 26 | score.Get().Data.clear(); 27 | } 28 | } 29 | } 30 | 31 | } 32 | 33 | -------------------------------------------------------------------------------- /project/module/api/glm/gtx/orthonormalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_orthonormalize 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER mat<3, 3, T, Q> orthonormalize(mat<3, 3, T, Q> const& m) 7 | { 8 | mat<3, 3, T, Q> r = m; 9 | 10 | r[0] = normalize(r[0]); 11 | 12 | T d0 = dot(r[0], r[1]); 13 | r[1] -= r[0] * d0; 14 | r[1] = normalize(r[1]); 15 | 16 | T d1 = dot(r[1], r[2]); 17 | d0 = dot(r[0], r[2]); 18 | r[2] -= r[0] * d0 + r[1] * d1; 19 | r[2] = normalize(r[2]); 20 | 21 | return r; 22 | } 23 | 24 | template 25 | GLM_FUNC_QUALIFIER vec<3, T, Q> orthonormalize(vec<3, T, Q> const& x, vec<3, T, Q> const& y) 26 | { 27 | return normalize(x - y * dot(y, x)); 28 | } 29 | }//namespace glm 30 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtx/orthonormalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_orthonormalize 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER mat<3, 3, T, Q> orthonormalize(mat<3, 3, T, Q> const& m) 7 | { 8 | mat<3, 3, T, Q> r = m; 9 | 10 | r[0] = normalize(r[0]); 11 | 12 | T d0 = dot(r[0], r[1]); 13 | r[1] -= r[0] * d0; 14 | r[1] = normalize(r[1]); 15 | 16 | T d1 = dot(r[1], r[2]); 17 | d0 = dot(r[0], r[2]); 18 | r[2] -= r[0] * d0 + r[1] * d1; 19 | r[2] = normalize(r[2]); 20 | 21 | return r; 22 | } 23 | 24 | template 25 | GLM_FUNC_QUALIFIER vec<3, T, Q> orthonormalize(vec<3, T, Q> const& x, vec<3, T, Q> const& y) 26 | { 27 | return normalize(x - y * dot(y, x)); 28 | } 29 | }//namespace glm 30 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtx/orthonormalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_orthonormalize 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER mat<3, 3, T, Q> orthonormalize(mat<3, 3, T, Q> const& m) 7 | { 8 | mat<3, 3, T, Q> r = m; 9 | 10 | r[0] = normalize(r[0]); 11 | 12 | T d0 = dot(r[0], r[1]); 13 | r[1] -= r[0] * d0; 14 | r[1] = normalize(r[1]); 15 | 16 | T d1 = dot(r[1], r[2]); 17 | d0 = dot(r[0], r[2]); 18 | r[2] -= r[0] * d0 + r[1] * d1; 19 | r[2] = normalize(r[2]); 20 | 21 | return r; 22 | } 23 | 24 | template 25 | GLM_FUNC_QUALIFIER vec<3, T, Q> orthonormalize(vec<3, T, Q> const& x, vec<3, T, Q> const& y) 26 | { 27 | return normalize(x - y * dot(y, x)); 28 | } 29 | }//namespace glm 30 | -------------------------------------------------------------------------------- /mingw.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_SYSTEM_NAME Windows) 2 | 3 | set(CMAKE_CXX_STANDARD 17) 4 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 5 | set(CMAKE_CXX_EXTENSIONS OFF) 6 | 7 | set(CMAKE_C_COMPILER /usr/bin/x86_64-w64-mingw32-gcc) 8 | set(CMAKE_CXX_COMPILER /usr/bin/x86_64-w64-mingw32-g++) 9 | set(CMAKE_RC_COMPILER /usr/bin/x86_64-w64-mingw32-windres) 10 | 11 | set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32) 12 | 13 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 14 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 15 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 16 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) 17 | 18 | add_compile_definitions(_GLIBCXX_USE_C99_STD_AT_QUICK_EXIT=0) 19 | add_compile_definitions(_GLIBCXX_USE_C99_STD_QUICK_EXIT=0) 20 | add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=0) 21 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/quaternion_transform.inl: -------------------------------------------------------------------------------- 1 | namespace glm 2 | { 3 | template 4 | GLM_FUNC_QUALIFIER qua rotate(qua const& q, T const& angle, vec<3, T, Q> const& v) 5 | { 6 | vec<3, T, Q> Tmp = v; 7 | 8 | // Axis of rotation must be normalised 9 | T len = glm::length(Tmp); 10 | if(abs(len - static_cast(1)) > static_cast(0.001)) 11 | { 12 | T oneOverLen = static_cast(1) / len; 13 | Tmp.x *= oneOverLen; 14 | Tmp.y *= oneOverLen; 15 | Tmp.z *= oneOverLen; 16 | } 17 | 18 | T const AngleRad(angle); 19 | T const Sin = sin(AngleRad * static_cast(0.5)); 20 | 21 | return q * qua::wxyz(cos(AngleRad * static_cast(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin); 22 | } 23 | }//namespace glm 24 | 25 | -------------------------------------------------------------------------------- /editor/src/panels/debug_info.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include "events/key_event.h" 5 | #include "core/timestep.h" 6 | 7 | 8 | namespace Enik { 9 | 10 | class DebugInfoPanel { 11 | public: 12 | void BeginMenu(); 13 | 14 | void ShowDebugInfoPanel(Timestep timestep, glm::vec2 viewport_size); 15 | 16 | bool OnKeyReleased(KeyReleasedEvent& event); 17 | 18 | private: 19 | bool m_ShowPerformance = false; 20 | bool m_ShowRendererStats = false; 21 | bool m_ShowRenderer = false; 22 | bool m_ShowProject = false; 23 | bool m_ShowViewport = false; 24 | bool m_ShowProgram = false; 25 | 26 | std::chrono::high_resolution_clock::time_point m_StartTime = std::chrono::high_resolution_clock::now(); 27 | 28 | }; 29 | 30 | } -------------------------------------------------------------------------------- /project/module/api/glm/detail/compute_vector_relational.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //#include "compute_common.hpp" 4 | #include "setup.hpp" 5 | #include 6 | 7 | namespace glm{ 8 | namespace detail 9 | { 10 | template 11 | struct compute_equal 12 | { 13 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(T a, T b) 14 | { 15 | return a == b; 16 | } 17 | }; 18 | /* 19 | template 20 | struct compute_equal 21 | { 22 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(T a, T b) 23 | { 24 | return detail::compute_abs::is_signed>::call(b - a) <= static_cast(0); 25 | //return std::memcmp(&a, &b, sizeof(T)) == 0; 26 | } 27 | }; 28 | */ 29 | }//namespace detail 30 | }//namespace glm 31 | -------------------------------------------------------------------------------- /project/module/api/glm/gtx/exterior_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_exterior_product 2 | 3 | #include 4 | 5 | namespace glm { 6 | namespace detail 7 | { 8 | template 9 | struct compute_cross_vec2 10 | { 11 | GLM_FUNC_QUALIFIER static T call(vec<2, T, Q> const& v, vec<2, T, Q> const& u) 12 | { 13 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cross' accepts only floating-point inputs"); 14 | 15 | return v.x * u.y - u.x * v.y; 16 | } 17 | }; 18 | }//namespace detail 19 | 20 | template 21 | GLM_FUNC_QUALIFIER T cross(vec<2, T, Q> const& x, vec<2, T, Q> const& y) 22 | { 23 | return detail::compute_cross_vec2::value>::call(x, y); 24 | } 25 | }//namespace glm 26 | 27 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/quaternion_transform.inl: -------------------------------------------------------------------------------- 1 | namespace glm 2 | { 3 | template 4 | GLM_FUNC_QUALIFIER qua rotate(qua const& q, T const& angle, vec<3, T, Q> const& v) 5 | { 6 | vec<3, T, Q> Tmp = v; 7 | 8 | // Axis of rotation must be normalised 9 | T len = glm::length(Tmp); 10 | if(abs(len - static_cast(1)) > static_cast(0.001)) 11 | { 12 | T oneOverLen = static_cast(1) / len; 13 | Tmp.x *= oneOverLen; 14 | Tmp.y *= oneOverLen; 15 | Tmp.z *= oneOverLen; 16 | } 17 | 18 | T const AngleRad(angle); 19 | T const Sin = sin(AngleRad * static_cast(0.5)); 20 | 21 | return q * qua::wxyz(cos(AngleRad * static_cast(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin); 22 | } 23 | }//namespace glm 24 | 25 | -------------------------------------------------------------------------------- /engine/src/renderer/renderer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "orthographic_camera.h" 3 | #include "render_command.h" 4 | #include "shader.h" 5 | 6 | namespace Enik { 7 | 8 | class Renderer { 9 | public: 10 | static void Init(); 11 | static void Shutdown(); 12 | 13 | static void OnWindowResize(uint32_t width, uint32_t height); 14 | 15 | static void BeginScene(OrthographicCamera& camera); 16 | static void EndScene(); 17 | 18 | static void Submit(const Ref& shader, const Ref& vertex_array, const glm::mat4& transform = glm::mat4(1.0f)); 19 | 20 | inline static RendererAPI::API GetAPI() { return RendererAPI::GetAPI(); } 21 | 22 | private: 23 | struct SceneData { 24 | glm::mat4 ViewProjectionMatrix; 25 | }; 26 | 27 | static Scope m_SceneData; 28 | }; 29 | 30 | } -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/detail/compute_vector_relational.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //#include "compute_common.hpp" 4 | #include "setup.hpp" 5 | #include 6 | 7 | namespace glm{ 8 | namespace detail 9 | { 10 | template 11 | struct compute_equal 12 | { 13 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(T a, T b) 14 | { 15 | return a == b; 16 | } 17 | }; 18 | /* 19 | template 20 | struct compute_equal 21 | { 22 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(T a, T b) 23 | { 24 | return detail::compute_abs::is_signed>::call(b - a) <= static_cast(0); 25 | //return std::memcmp(&a, &b, sizeof(T)) == 0; 26 | } 27 | }; 28 | */ 29 | }//namespace detail 30 | }//namespace glm 31 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/quaternion_transform.inl: -------------------------------------------------------------------------------- 1 | namespace glm 2 | { 3 | template 4 | GLM_FUNC_QUALIFIER qua rotate(qua const& q, T const& angle, vec<3, T, Q> const& v) 5 | { 6 | vec<3, T, Q> Tmp = v; 7 | 8 | // Axis of rotation must be normalised 9 | T len = glm::length(Tmp); 10 | if(abs(len - static_cast(1)) > static_cast(0.001)) 11 | { 12 | T oneOverLen = static_cast(1) / len; 13 | Tmp.x *= oneOverLen; 14 | Tmp.y *= oneOverLen; 15 | Tmp.z *= oneOverLen; 16 | } 17 | 18 | T const AngleRad(angle); 19 | T const Sin = sin(AngleRad * static_cast(0.5)); 20 | 21 | return q * qua::wxyz(cos(AngleRad * static_cast(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin); 22 | } 23 | }//namespace glm 24 | 25 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/gtx/exterior_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_exterior_product 2 | 3 | #include 4 | 5 | namespace glm { 6 | namespace detail 7 | { 8 | template 9 | struct compute_cross_vec2 10 | { 11 | GLM_FUNC_QUALIFIER static T call(vec<2, T, Q> const& v, vec<2, T, Q> const& u) 12 | { 13 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cross' accepts only floating-point inputs"); 14 | 15 | return v.x * u.y - u.x * v.y; 16 | } 17 | }; 18 | }//namespace detail 19 | 20 | template 21 | GLM_FUNC_QUALIFIER T cross(vec<2, T, Q> const& x, vec<2, T, Q> const& y) 22 | { 23 | return detail::compute_cross_vec2::value>::call(x, y); 24 | } 25 | }//namespace glm 26 | 27 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/detail/compute_vector_relational.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //#include "compute_common.hpp" 4 | #include "setup.hpp" 5 | #include 6 | 7 | namespace glm{ 8 | namespace detail 9 | { 10 | template 11 | struct compute_equal 12 | { 13 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(T a, T b) 14 | { 15 | return a == b; 16 | } 17 | }; 18 | /* 19 | template 20 | struct compute_equal 21 | { 22 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR static bool call(T a, T b) 23 | { 24 | return detail::compute_abs::is_signed>::call(b - a) <= static_cast(0); 25 | //return std::memcmp(&a, &b, sizeof(T)) == 0; 26 | } 27 | }; 28 | */ 29 | }//namespace detail 30 | }//namespace glm 31 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/gtx/exterior_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_exterior_product 2 | 3 | #include 4 | 5 | namespace glm { 6 | namespace detail 7 | { 8 | template 9 | struct compute_cross_vec2 10 | { 11 | GLM_FUNC_QUALIFIER static T call(vec<2, T, Q> const& v, vec<2, T, Q> const& u) 12 | { 13 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cross' accepts only floating-point inputs"); 14 | 15 | return v.x * u.y - u.x * v.y; 16 | } 17 | }; 18 | }//namespace detail 19 | 20 | template 21 | GLM_FUNC_QUALIFIER T cross(vec<2, T, Q> const& x, vec<2, T, Q> const& y) 22 | { 23 | return detail::compute_cross_vec2::value>::call(x, y); 24 | } 25 | }//namespace glm 26 | 27 | -------------------------------------------------------------------------------- /editor/src/panels/text_editor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "editor_panel.h" 4 | 5 | #include 6 | #include 7 | #include 8 | #include "scene/scene.h" 9 | 10 | namespace Enik { 11 | 12 | class TextEditorPanel : public EditorPanel { 13 | public: 14 | TextEditorPanel() : EditorPanel("Text Editor") {} 15 | 16 | void RenderContent(); 17 | 18 | bool OpenTextFile(const std::filesystem::path& path); 19 | bool SaveCurrentTextFile(); 20 | 21 | const bool IsEditing() const { return not m_CurrentFile.empty(); } 22 | std::string CurrentFilePath() const { return m_CurrentFile.string(); } 23 | 24 | void AskToSaveFile(); 25 | 26 | private: 27 | std::filesystem::path m_CurrentFile; 28 | std::vector m_Buffer = {0}; 29 | 30 | bool m_WindowFocused = false; 31 | }; 32 | 33 | } -------------------------------------------------------------------------------- /engine/src/renderer/renderer_api.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | #include "vertex_array.h" 5 | 6 | namespace Enik { 7 | 8 | class RendererAPI { 9 | public: 10 | enum class API { 11 | None = 0, 12 | OpenGL = 1 13 | }; 14 | 15 | public: 16 | virtual ~RendererAPI() = default; 17 | 18 | virtual void Init() = 0; 19 | virtual void SetViewport(uint32_t x, uint32_t y, uint32_t width, uint32_t height) = 0; 20 | 21 | virtual void SetClearColor(const glm::vec4& color) = 0; 22 | virtual void Clear() = 0; 23 | 24 | virtual void DrawIndexed(const Ref& vertex_array, uint32_t index_count) = 0; 25 | virtual void DrawLine(const Ref& vertex_array, uint32_t vertex_count) = 0; 26 | 27 | static API GetAPI(); 28 | 29 | private: 30 | static API s_API; 31 | }; 32 | 33 | } -------------------------------------------------------------------------------- /engine/src/renderer/sub_texture2D.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include "renderer/texture.h" 5 | 6 | namespace Enik { 7 | 8 | class SubTexture2D { 9 | public: 10 | SubTexture2D(const AssetHandle& texture, const glm::vec2& tile_size, const glm::vec2& tile_index, const glm::vec2& tile_sep = glm::vec2(0)); 11 | static Ref CreateFromTileIndex(const AssetHandle& texture, const glm::vec2& tile_size, const glm::vec2& tile_index, const glm::vec2& tile_sep = glm::vec2(0)); 12 | 13 | void UpdateSubTexture2D(const Ref& texture); 14 | const glm::vec2* GetTextureCoords() const { return m_TextureCoords; } 15 | 16 | public: 17 | glm::vec2 TileSize; 18 | glm::vec2 TileIndex; 19 | glm::vec2 TileSeparation; 20 | 21 | private: 22 | glm::vec2 m_TextureCoords[4]; 23 | }; 24 | 25 | } -------------------------------------------------------------------------------- /project/module/api/glm/ext/vector_bool1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_bool1 2 | /// @file glm/ext/vector_bool1.hpp 3 | /// 4 | /// @defgroup ext_vector_bool1 GLM_EXT_vector_bool1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes bvec1 vector type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_bool1_precision extension. 12 | 13 | #pragma once 14 | 15 | #include "../detail/type_vec1.hpp" 16 | 17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 18 | # pragma message("GLM: GLM_EXT_vector_bool1 extension included") 19 | #endif 20 | 21 | namespace glm 22 | { 23 | /// @addtogroup ext_vector_bool1 24 | /// @{ 25 | 26 | /// 1 components vector of boolean. 27 | typedef vec<1, bool, defaultp> bvec1; 28 | 29 | /// @} 30 | }//namespace glm 31 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/vector_bool1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_bool1 2 | /// @file glm/ext/vector_bool1.hpp 3 | /// 4 | /// @defgroup ext_vector_bool1 GLM_EXT_vector_bool1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes bvec1 vector type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_bool1_precision extension. 12 | 13 | #pragma once 14 | 15 | #include "../detail/type_vec1.hpp" 16 | 17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 18 | # pragma message("GLM: GLM_EXT_vector_bool1 extension included") 19 | #endif 20 | 21 | namespace glm 22 | { 23 | /// @addtogroup ext_vector_bool1 24 | /// @{ 25 | 26 | /// 1 components vector of boolean. 27 | typedef vec<1, bool, defaultp> bvec1; 28 | 29 | /// @} 30 | }//namespace glm 31 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/vector_bool1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_bool1 2 | /// @file glm/ext/vector_bool1.hpp 3 | /// 4 | /// @defgroup ext_vector_bool1 GLM_EXT_vector_bool1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes bvec1 vector type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_bool1_precision extension. 12 | 13 | #pragma once 14 | 15 | #include "../detail/type_vec1.hpp" 16 | 17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 18 | # pragma message("GLM: GLM_EXT_vector_bool1 extension included") 19 | #endif 20 | 21 | namespace glm 22 | { 23 | /// @addtogroup ext_vector_bool1 24 | /// @{ 25 | 26 | /// 1 components vector of boolean. 27 | typedef vec<1, bool, defaultp> bvec1; 28 | 29 | /// @} 30 | }//namespace glm 31 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/matrix_float2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 2, float, defaultp> mat2x2; 16 | 17 | /// 2 columns of 2 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<2, 2, float, defaultp> mat2; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/matrix_float4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @ingroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 4, float, defaultp> mat4x4; 16 | 17 | /// 4 columns of 4 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<4, 4, float, defaultp> mat4; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /examples/snake-game/module/src/number_display.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../api/enik.h" 3 | #include "digit.h" 4 | 5 | namespace Enik { 6 | 7 | class NumberDisplay : public ScriptableEntity { 8 | public: 9 | void SetNumber(int value); 10 | 11 | virtual void OnCreate() override final; 12 | 13 | private: 14 | void UpdateNumber(); 15 | 16 | void CreateNewDigit(); 17 | 18 | virtual std::vector OnEditorGetFields() override final { 19 | return std::vector{ 20 | { "value", FieldType::INT, &m_value }, 21 | { "offset", FieldType::FLOAT, &m_Offset }, 22 | { "digit", FieldType::PREFAB, &m_DigitPrefab } 23 | }; 24 | } 25 | 26 | private: 27 | int m_value = -1; 28 | 29 | float m_Offset = 1.0f; 30 | 31 | std::string m_DigitPrefab; 32 | 33 | std::vector m_Digits; 34 | 35 | }; 36 | 37 | } -------------------------------------------------------------------------------- /project/module/api/glm/ext/matrix_float3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 3, float, defaultp> mat3x3; 16 | 17 | /// 3 columns of 3 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<3, 3, float, defaultp> mat3; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/scalar_constants.inl: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType epsilon() 7 | { 8 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'epsilon' only accepts floating-point inputs"); 9 | return std::numeric_limits::epsilon(); 10 | } 11 | 12 | template 13 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType pi() 14 | { 15 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'pi' only accepts floating-point inputs"); 16 | return static_cast(3.14159265358979323846264338327950288); 17 | } 18 | 19 | template 20 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType cos_one_over_two() 21 | { 22 | return genType(0.877582561890372716130286068203503191); 23 | } 24 | } //namespace glm 25 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/vector_packing.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_packing 2 | /// @file glm/ext/vector_packing.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_vector_packing GLM_EXT_vector_packing 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// This extension provides a set of function to convert vectors to packed 12 | /// formats. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../detail/qualifier.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_vector_packing extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_vector_packing 26 | /// @{ 27 | 28 | 29 | /// @} 30 | }// namespace glm 31 | 32 | #include "vector_packing.inl" 33 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/matrix_float2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 2, float, defaultp> mat2x2; 16 | 17 | /// 2 columns of 2 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<2, 2, float, defaultp> mat2; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/matrix_float4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @ingroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 4, float, defaultp> mat4x4; 16 | 17 | /// 4 columns of 4 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<4, 4, float, defaultp> mat4; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /examples/squareup/module/src/weapon.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "../api/enik.h" 3 | 4 | 5 | 6 | namespace Enik { 7 | 8 | 9 | class Weapon : public ScriptableEntity { 10 | public: 11 | void SetupWeapon(UUID owner) { m_Owner = owner; } 12 | virtual void UseWeapon(); 13 | 14 | virtual std::vector OnEditorGetFields() override final { 15 | return std::vector{ 16 | { "Bullet Prefab", FieldType::PREFAB, &m_BulletPrefabPath }, 17 | { "Hit Damage", FieldType::FLOAT, &HitDamage }, 18 | { "owner", FieldType::ENTITY, &m_Owner }, 19 | }; 20 | } 21 | 22 | protected: 23 | Entity InstantiateBullet(); 24 | 25 | public: 26 | std::string m_BulletPrefabPath = ""; 27 | UUID m_Owner = 0; 28 | 29 | float HitDamage = 10.0f; 30 | float BulletSpeed = 20.0f; 31 | 32 | size_t AmmoLeft = 30; 33 | 34 | }; 35 | 36 | } -------------------------------------------------------------------------------- /project/module/api/glm/ext/matrix_double2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 2, double, defaultp> dmat2x2; 16 | 17 | /// 2 columns of 2 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<2, 2, double, defaultp> dmat2; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/matrix_double3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 3, double, defaultp> dmat3x3; 16 | 17 | /// 3 columns of 3 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<3, 3, double, defaultp> dmat3; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/matrix_double4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 4, double, defaultp> dmat4x4; 16 | 17 | /// 4 columns of 4 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<4, 4, double, defaultp> dmat4; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/scalar_packing.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_scalar_packing 2 | /// @file glm/ext/scalar_packing.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_scalar_packing GLM_EXT_scalar_packing 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// This extension provides a set of function to convert scalar values to packed 12 | /// formats. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../detail/qualifier.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_scalar_packing extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_scalar_packing 26 | /// @{ 27 | 28 | 29 | /// @} 30 | }// namespace glm 31 | 32 | #include "scalar_packing.inl" 33 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/matrix_float2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 2, float, defaultp> mat2x2; 16 | 17 | /// 2 columns of 2 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<2, 2, float, defaultp> mat2; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/matrix_float3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 3, float, defaultp> mat3x3; 16 | 17 | /// 3 columns of 3 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<3, 3, float, defaultp> mat3; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/matrix_float4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @ingroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 4, float, defaultp> mat4x4; 16 | 17 | /// 4 columns of 4 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<4, 4, float, defaultp> mat4; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/vector_packing.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_packing 2 | /// @file glm/ext/vector_packing.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_vector_packing GLM_EXT_vector_packing 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// This extension provides a set of function to convert vectors to packed 12 | /// formats. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../detail/qualifier.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_vector_packing extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_vector_packing 26 | /// @{ 27 | 28 | 29 | /// @} 30 | }// namespace glm 31 | 32 | #include "vector_packing.inl" 33 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/matrix_float3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 3, float, defaultp> mat3x3; 16 | 17 | /// 3 columns of 3 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<3, 3, float, defaultp> mat3; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/scalar_constants.inl: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType epsilon() 7 | { 8 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'epsilon' only accepts floating-point inputs"); 9 | return std::numeric_limits::epsilon(); 10 | } 11 | 12 | template 13 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType pi() 14 | { 15 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'pi' only accepts floating-point inputs"); 16 | return static_cast(3.14159265358979323846264338327950288); 17 | } 18 | 19 | template 20 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType cos_one_over_two() 21 | { 22 | return genType(0.877582561890372716130286068203503191); 23 | } 24 | } //namespace glm 25 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/vector_packing.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_packing 2 | /// @file glm/ext/vector_packing.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_vector_packing GLM_EXT_vector_packing 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// This extension provides a set of function to convert vectors to packed 12 | /// formats. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../detail/qualifier.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_vector_packing extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_vector_packing 26 | /// @{ 27 | 28 | 29 | /// @} 30 | }// namespace glm 31 | 32 | #include "vector_packing.inl" 33 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/matrix_double2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 2, double, defaultp> dmat2x2; 16 | 17 | /// 2 columns of 2 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<2, 2, double, defaultp> dmat2; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/matrix_double3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 3, double, defaultp> dmat3x3; 16 | 17 | /// 3 columns of 3 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<3, 3, double, defaultp> dmat3; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/matrix_double4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 4, double, defaultp> dmat4x4; 16 | 17 | /// 4 columns of 4 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<4, 4, double, defaultp> dmat4; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/scalar_constants.inl: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType epsilon() 7 | { 8 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'epsilon' only accepts floating-point inputs"); 9 | return std::numeric_limits::epsilon(); 10 | } 11 | 12 | template 13 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType pi() 14 | { 15 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'pi' only accepts floating-point inputs"); 16 | return static_cast(3.14159265358979323846264338327950288); 17 | } 18 | 19 | template 20 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType cos_one_over_two() 21 | { 22 | return genType(0.877582561890372716130286068203503191); 23 | } 24 | } //namespace glm 25 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/matrix_double2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 2, double, defaultp> dmat2x2; 16 | 17 | /// 2 columns of 2 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<2, 2, double, defaultp> dmat2; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/matrix_double3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 3, double, defaultp> dmat3x3; 16 | 17 | /// 3 columns of 3 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<3, 3, double, defaultp> dmat3; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/matrix_double4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 4, double, defaultp> dmat4x4; 16 | 17 | /// 4 columns of 4 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<4, 4, double, defaultp> dmat4; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /examples/squareup/module/api/glm/ext/scalar_packing.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_scalar_packing 2 | /// @file glm/ext/scalar_packing.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_scalar_packing GLM_EXT_scalar_packing 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// This extension provides a set of function to convert scalar values to packed 12 | /// formats. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../detail/qualifier.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_scalar_packing extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_scalar_packing 26 | /// @{ 27 | 28 | 29 | /// @} 30 | }// namespace glm 31 | 32 | #include "scalar_packing.inl" 33 | -------------------------------------------------------------------------------- /examples/snake-game/module/api/glm/ext/scalar_packing.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_scalar_packing 2 | /// @file glm/ext/scalar_packing.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_scalar_packing GLM_EXT_scalar_packing 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// This extension provides a set of function to convert scalar values to packed 12 | /// formats. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../detail/qualifier.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_scalar_packing extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_scalar_packing 26 | /// @{ 27 | 28 | 29 | /// @} 30 | }// namespace glm 31 | 32 | #include "scalar_packing.inl" 33 | -------------------------------------------------------------------------------- /project/module/api/glm/ext/vector_int1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_int1 2 | /// @file glm/ext/vector_int1.hpp 3 | /// 4 | /// @defgroup ext_vector_int1 GLM_EXT_vector_int1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes ivec1 vector type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_uint1 extension. 12 | /// @see ext_vector_int1_precision extension. 13 | 14 | #pragma once 15 | 16 | #include "../detail/type_vec1.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_vector_int1 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_vector_int1 25 | /// @{ 26 | 27 | /// 1 component vector of signed integer numbers. 28 | typedef vec<1, int, defaultp> ivec1; 29 | 30 | /// @} 31 | }//namespace glm 32 | 33 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "engine/external/spdlog"] 2 | path = engine/external/spdlog 3 | url = https://github.com/hanion/spdlog.git 4 | [submodule "engine/external/glfw"] 5 | path = engine/external/glfw 6 | url = https://github.com/hanion/glfw.git 7 | [submodule "engine/external/glm"] 8 | path = engine/external/glm 9 | url = https://github.com/g-truc/glm 10 | [submodule "engine/external/imgui"] 11 | path = engine/external/imgui 12 | url = https://github.com/hanion/imgui.git 13 | branch = docking 14 | [submodule "engine/external/tracy"] 15 | path = engine/external/tracy 16 | url = https://github.com/wolfpld/tracy 17 | [submodule "engine/external/yaml-cpp"] 18 | path = engine/external/yaml-cpp 19 | url = https://github.com/jbeder/yaml-cpp.git 20 | [submodule "engine/external/jolt"] 21 | path = engine/external/jolt 22 | url = https://github.com/jrouwe/JoltPhysics.git 23 | --------------------------------------------------------------------------------