From 60cbbdec07ab7a5636eac5b3c024ae44e937f4d4 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 13 Dec 2021 00:07:19 +0800 Subject: +init --- .gitignore | 0 Client/.gitignore | 8 + Client/Art/Avatar/test.pdn | Bin 0 -> 134769 bytes .../Ragdolls/MeshBuilder/MeshBuilder.vcxproj | 130 + .../MeshBuilder/MeshBuilder.vcxproj.filters | 17 + .../Ragdolls/MeshBuilder/MeshBuilder.vcxproj.user | 4 + Client/Project/VisualStudio/Ragdolls/Ragdolls.sln | 48 + .../Ragdolls/Ragdolls/Ragdolls.vcxproj | 256 + .../Ragdolls/Ragdolls/Ragdolls.vcxproj.filters | 382 + .../Ragdolls/Ragdolls/Ragdolls.vcxproj.user | 4 + .../VisualStudio/Ragdolls/Ragdolls/imgui.ini | 34 + Client/Source/Common/DataBuffer.cpp | 0 Client/Source/Common/DataBuffer.h | 29 + Client/Source/Debug/Log.cpp | 164 + Client/Source/Debug/Log.h | 14 + Client/Source/GUI/Font.cpp | 302 + Client/Source/GUI/Font.h | 149 + Client/Source/GUI/TextMeshGenerator.cpp | 89 + Client/Source/GUI/TextMeshGenerator.h | 31 + Client/Source/GUI/UI9Slicing.cpp | 112 + Client/Source/GUI/UI9Slicing.h | 25 + Client/Source/GUI/UILine.cpp | 48 + Client/Source/GUI/UILine.h | 21 + Client/Source/GUI/UIMesh.cpp | 15 + Client/Source/GUI/UIMesh.h | 42 + Client/Source/GUI/UIQuad.cpp | 64 + Client/Source/GUI/UIQuad.h | 21 + Client/Source/GUI/UISquare.cpp | 53 + Client/Source/GUI/UISquare.h | 22 + Client/Source/GUI/UITextMesh.cpp | 278 + Client/Source/GUI/UITextMesh.h | 69 + Client/Source/GUI/freetype.h | 4 + Client/Source/GUI/utf8.cpp | 415 + Client/Source/GUI/utf8.h | 113 + Client/Source/Graphics/Color.cpp | 4 + Client/Source/Graphics/Color.h | 48 + Client/Source/Graphics/CustomVertexLayout.cpp | 23 + Client/Source/Graphics/CustomVertexLayout.h | 33 + Client/Source/Graphics/DefaultVertexLayout.cpp | 119 + Client/Source/Graphics/DefaultVertexLayout.h | 55 + Client/Source/Graphics/DeviceDefine.h | 69 + Client/Source/Graphics/DynamicMesh.h | 13 + Client/Source/Graphics/DynamicVertexBuffer.cpp | 260 + Client/Source/Graphics/DynamicVertexBuffer.h | 54 + Client/Source/Graphics/FrameBuffer.cpp | 12 + Client/Source/Graphics/FrameBuffer.h | 35 + Client/Source/Graphics/GPUDataBuffer.cpp | 207 + Client/Source/Graphics/GPUDataBuffer.h | 75 + Client/Source/Graphics/GfxDevice.cpp | 169 + Client/Source/Graphics/GfxDevice.h | 109 + Client/Source/Graphics/GlyphAtlas.cpp | 0 Client/Source/Graphics/GlyphAtlas.h | 6 + Client/Source/Graphics/ImageData.cpp | 2 + Client/Source/Graphics/ImageData.h | 39 + Client/Source/Graphics/OpenGL.cpp | 7 + Client/Source/Graphics/OpenGL.h | 41 + Client/Source/Graphics/Point.cpp | 0 Client/Source/Graphics/Point.h | 0 Client/Source/Graphics/PolyLine.cpp | 9 + Client/Source/Graphics/PolyLine.h | 18 + Client/Source/Graphics/Primitive.h | 8 + Client/Source/Graphics/Quad.cpp | 62 + Client/Source/Graphics/Quad.h | 26 + Client/Source/Graphics/RenderCommands.cpp | 9 + Client/Source/Graphics/RenderCommands.h | 164 + Client/Source/Graphics/RenderTexture.cpp | 0 Client/Source/Graphics/RenderTexture.h | 16 + Client/Source/Graphics/Shader.cpp | 154 + Client/Source/Graphics/Shader.h | 47 + Client/Source/Graphics/ShaderCompiler.cpp | 347 + Client/Source/Graphics/ShaderCompiler.h | 55 + Client/Source/Graphics/Texture.cpp | 230 + Client/Source/Graphics/Texture.h | 94 + Client/Source/Graphics/VertexAttribute.cpp | 20 + Client/Source/Graphics/VertexAttribute.h | 52 + Client/Source/Graphics/VertexBuffer.cpp | 109 + Client/Source/Graphics/VertexBuffer.h | 52 + Client/Source/Math/Functions.cpp | 0 Client/Source/Math/Functions.h | 30 + Client/Source/Math/Math.h | 6 + Client/Source/Math/Matrix22.h | 10 + Client/Source/Math/Matrix44.h | 8 + Client/Source/Math/Rect.h | 13 + Client/Source/Math/Vector2.hpp | 67 + Client/Source/Math/Vector3.hpp | 32 + Client/Source/Math/Vector4.hpp | 33 + Client/Source/RagdollMain.cpp | 89 + Client/Source/Threading/Job.cpp | 13 + Client/Source/Threading/Job.h | 17 + Client/Source/Threading/JobSystem.cpp | 56 + Client/Source/Threading/JobSystem.h | 25 + Client/Source/Threading/Mutex.cpp | 27 + Client/Source/Threading/Mutex.h | 39 + Client/Source/Threading/Semaphore.cpp | 0 Client/Source/Threading/Semaphore.h | 0 Client/Source/Threading/Thread.cpp | 70 + Client/Source/Threading/Thread.h | 71 + Client/Source/Threading/WorkThread.cpp | 50 + Client/Source/Utilities/Assert.h | 11 + Client/Source/Utilities/AutoInvoke.h | 27 + Client/Source/Utilities/Exception.h | 12 + Client/Source/Utilities/Singleton.h | 43 + Client/Source/Utilities/StaticInitiator.h | 30 + Client/Source/Utilities/Type.h | 25 + Client/Source/Utilities/UIDGenerator.h | 20 + Client/Source/Utilities/UtilMacros.h | 19 + Client/ThirdParty/Box2D/.gitignore | 7 + Client/ThirdParty/Box2D/.travis.yml | 32 + Client/ThirdParty/Box2D/CHANGELOG.md | 60 + Client/ThirdParty/Box2D/CMakeLists.txt | 65 + Client/ThirdParty/Box2D/LICENSE | 21 + Client/ThirdParty/Box2D/README.md | 115 + Client/ThirdParty/Box2D/build.bat | 7 + Client/ThirdParty/Box2D/build.sh | 8 + Client/ThirdParty/Box2D/build_docs.sh | 8 + Client/ThirdParty/Box2D/deploy_docs.sh | 4 + Client/ThirdParty/Box2D/docs/CMakeLists.txt | 32 + Client/ThirdParty/Box2D/docs/Doxyfile.in | 2578 ++ Client/ThirdParty/Box2D/docs/FAQ.md | 146 + Client/ThirdParty/Box2D/docs/collision.md | 433 + Client/ThirdParty/Box2D/docs/common.md | 66 + Client/ThirdParty/Box2D/docs/copycss.sh | 2 + Client/ThirdParty/Box2D/docs/dynamics.md | 1674 ++ Client/ThirdParty/Box2D/docs/extra.css | 605 + Client/ThirdParty/Box2D/docs/hello.md | 246 + .../ThirdParty/Box2D/docs/images/body_origin.gif | Bin 0 -> 912 bytes .../ThirdParty/Box2D/docs/images/captured_toi.svg | 124 + .../Box2D/docs/images/chain_loop_inwards.svg | 310 + .../Box2D/docs/images/chain_loop_outwards.svg | 310 + .../ThirdParty/Box2D/docs/images/chain_shape.svg | 198 + .../Box2D/docs/images/convex_concave.gif | Bin 0 -> 2303 bytes Client/ThirdParty/Box2D/docs/images/debug_draw.png | Bin 0 -> 48950 bytes Client/ThirdParty/Box2D/docs/images/distance.svg | 178 + .../Box2D/docs/images/distance_joint.gif | Bin 0 -> 2358 bytes Client/ThirdParty/Box2D/docs/images/gear_joint.gif | Bin 0 -> 2119 bytes .../Box2D/docs/images/ghost_collision.svg | 237 + .../Box2D/docs/images/ghost_vertices.svg | 265 + Client/ThirdParty/Box2D/docs/images/logo.svg | 126 + Client/ThirdParty/Box2D/docs/images/manifolds.svg | 256 + Client/ThirdParty/Box2D/docs/images/missed_toi.svg | 153 + Client/ThirdParty/Box2D/docs/images/modules.svg | 222 + .../ThirdParty/Box2D/docs/images/overlap_test.svg | 148 + .../Box2D/docs/images/prismatic_joint.gif | Bin 0 -> 2298 bytes .../ThirdParty/Box2D/docs/images/pulley_joint.gif | Bin 0 -> 3526 bytes Client/ThirdParty/Box2D/docs/images/raycast.svg | 151 + .../Box2D/docs/images/revolute_joint.gif | Bin 0 -> 1920 bytes .../Box2D/docs/images/self_intersect.svg | 149 + .../Box2D/docs/images/skin_collision.svg | 140 + .../Box2D/docs/images/skinned_polygon.svg | 181 + Client/ThirdParty/Box2D/docs/images/testbed.png | Bin 0 -> 42221 bytes Client/ThirdParty/Box2D/docs/images/tunneling1.svg | 162 + Client/ThirdParty/Box2D/docs/images/tunneling2.svg | 140 + .../ThirdParty/Box2D/docs/images/wheel_joint.svg | 193 + Client/ThirdParty/Box2D/docs/images/winding.svg | 241 + Client/ThirdParty/Box2D/docs/loose_ends.md | 214 + Client/ThirdParty/Box2D/docs/overview.md | 216 + Client/ThirdParty/Box2D/docs/references.md | 4 + Client/ThirdParty/Box2D/docs/testbed.md | 21 + Client/ThirdParty/Box2D/extern/glad/CMakeLists.txt | 11 + .../Box2D/extern/glad/include/KHR/khrplatform.h | 290 + .../ThirdParty/Box2D/extern/glad/include/glad/gl.h | 2114 ++ Client/ThirdParty/Box2D/extern/glad/src/gl.c | 949 + Client/ThirdParty/Box2D/extern/glfw/CMakeLists.txt | 92 + .../Box2D/extern/glfw/include/GLFW/glfw3.h | 5556 ++++ .../Box2D/extern/glfw/include/GLFW/glfw3native.h | 525 + .../ThirdParty/Box2D/extern/glfw/src/cocoa_init.m | 403 + .../Box2D/extern/glfw/src/cocoa_joystick.h | 50 + .../Box2D/extern/glfw/src/cocoa_joystick.m | 462 + .../Box2D/extern/glfw/src/cocoa_monitor.m | 527 + .../Box2D/extern/glfw/src/cocoa_platform.h | 169 + .../ThirdParty/Box2D/extern/glfw/src/cocoa_time.c | 60 + .../Box2D/extern/glfw/src/cocoa_window.m | 1855 ++ Client/ThirdParty/Box2D/extern/glfw/src/context.c | 758 + .../ThirdParty/Box2D/extern/glfw/src/egl_context.c | 786 + .../ThirdParty/Box2D/extern/glfw/src/egl_context.h | 215 + .../ThirdParty/Box2D/extern/glfw/src/glfw_config.h | 45 + .../ThirdParty/Box2D/extern/glfw/src/glx_context.c | 698 + .../ThirdParty/Box2D/extern/glfw/src/glx_context.h | 181 + Client/ThirdParty/Box2D/extern/glfw/src/init.c | 338 + Client/ThirdParty/Box2D/extern/glfw/src/input.c | 1307 + Client/ThirdParty/Box2D/extern/glfw/src/internal.h | 772 + .../Box2D/extern/glfw/src/linux_joystick.c | 434 + .../Box2D/extern/glfw/src/linux_joystick.h | 62 + Client/ThirdParty/Box2D/extern/glfw/src/mappings.h | 478 + .../ThirdParty/Box2D/extern/glfw/src/mappings.h.in | 73 + Client/ThirdParty/Box2D/extern/glfw/src/monitor.c | 517 + .../Box2D/extern/glfw/src/nsgl_context.h | 56 + .../Box2D/extern/glfw/src/nsgl_context.m | 340 + .../ThirdParty/Box2D/extern/glfw/src/null_init.c | 50 + .../Box2D/extern/glfw/src/null_joystick.c | 42 + .../Box2D/extern/glfw/src/null_joystick.h | 31 + .../Box2D/extern/glfw/src/null_monitor.c | 69 + .../Box2D/extern/glfw/src/null_platform.h | 62 + .../ThirdParty/Box2D/extern/glfw/src/null_window.c | 321 + .../Box2D/extern/glfw/src/osmesa_context.c | 370 + .../Box2D/extern/glfw/src/osmesa_context.h | 94 + .../Box2D/extern/glfw/src/posix_thread.c | 103 + .../Box2D/extern/glfw/src/posix_thread.h | 51 + .../ThirdParty/Box2D/extern/glfw/src/posix_time.c | 85 + .../ThirdParty/Box2D/extern/glfw/src/posix_time.h | 44 + Client/ThirdParty/Box2D/extern/glfw/src/vulkan.c | 326 + .../ThirdParty/Box2D/extern/glfw/src/wgl_context.c | 732 + .../ThirdParty/Box2D/extern/glfw/src/wgl_context.h | 159 + .../ThirdParty/Box2D/extern/glfw/src/win32_init.c | 627 + .../Box2D/extern/glfw/src/win32_joystick.c | 753 + .../Box2D/extern/glfw/src/win32_joystick.h | 56 + .../Box2D/extern/glfw/src/win32_monitor.c | 515 + .../Box2D/extern/glfw/src/win32_platform.h | 449 + .../Box2D/extern/glfw/src/win32_thread.c | 97 + .../ThirdParty/Box2D/extern/glfw/src/win32_time.c | 74 + .../Box2D/extern/glfw/src/win32_window.c | 2205 ++ Client/ThirdParty/Box2D/extern/glfw/src/window.c | 1113 + Client/ThirdParty/Box2D/extern/glfw/src/wl_init.c | 1318 + .../ThirdParty/Box2D/extern/glfw/src/wl_monitor.c | 208 + .../ThirdParty/Box2D/extern/glfw/src/wl_platform.h | 359 + .../ThirdParty/Box2D/extern/glfw/src/wl_window.c | 1857 ++ Client/ThirdParty/Box2D/extern/glfw/src/x11_init.c | 1096 + .../ThirdParty/Box2D/extern/glfw/src/x11_monitor.c | 517 + .../Box2D/extern/glfw/src/x11_platform.h | 444 + .../ThirdParty/Box2D/extern/glfw/src/x11_window.c | 3066 +++ .../ThirdParty/Box2D/extern/glfw/src/xkb_unicode.c | 940 + .../ThirdParty/Box2D/extern/glfw/src/xkb_unicode.h | 28 + .../ThirdParty/Box2D/extern/imgui/CMakeLists.txt | 19 + Client/ThirdParty/Box2D/extern/imgui/imconfig.h | 73 + Client/ThirdParty/Box2D/extern/imgui/imgui.cpp | 9349 +++++++ Client/ThirdParty/Box2D/extern/imgui/imgui.h | 2130 ++ .../ThirdParty/Box2D/extern/imgui/imgui_demo.cpp | 4211 +++ .../ThirdParty/Box2D/extern/imgui/imgui_draw.cpp | 3199 +++ .../ThirdParty/Box2D/extern/imgui/imgui_internal.h | 1466 + .../Box2D/extern/imgui/imgui_widgets.cpp | 6557 +++++ .../ThirdParty/Box2D/extern/imgui/imstb_rectpack.h | 623 + .../ThirdParty/Box2D/extern/imgui/imstb_textedit.h | 1409 + .../ThirdParty/Box2D/extern/imgui/imstb_truetype.h | 4854 ++++ .../ThirdParty/Box2D/extern/sajson/CMakeLists.txt | 10 + Client/ThirdParty/Box2D/extern/sajson/sajson.cpp | 2 + Client/ThirdParty/Box2D/extern/sajson/sajson.h | 2493 ++ Client/ThirdParty/Box2D/include/box2d/b2_api.h | 52 + .../Box2D/include/box2d/b2_block_allocator.h | 60 + Client/ThirdParty/Box2D/include/box2d/b2_body.h | 878 + .../Box2D/include/box2d/b2_broad_phase.h | 238 + .../Box2D/include/box2d/b2_chain_shape.h | 101 + .../Box2D/include/box2d/b2_circle_shape.h | 67 + .../ThirdParty/Box2D/include/box2d/b2_collision.h | 283 + Client/ThirdParty/Box2D/include/box2d/b2_common.h | 138 + Client/ThirdParty/Box2D/include/box2d/b2_contact.h | 386 + .../Box2D/include/box2d/b2_contact_manager.h | 57 + .../ThirdParty/Box2D/include/box2d/b2_distance.h | 171 + .../Box2D/include/box2d/b2_distance_joint.h | 176 + Client/ThirdParty/Box2D/include/box2d/b2_draw.h | 102 + .../Box2D/include/box2d/b2_dynamic_tree.h | 308 + .../ThirdParty/Box2D/include/box2d/b2_edge_shape.h | 86 + Client/ThirdParty/Box2D/include/box2d/b2_fixture.h | 365 + .../Box2D/include/box2d/b2_friction_joint.h | 124 + .../ThirdParty/Box2D/include/box2d/b2_gear_joint.h | 130 + .../Box2D/include/box2d/b2_growable_stack.h | 91 + Client/ThirdParty/Box2D/include/box2d/b2_joint.h | 228 + Client/ThirdParty/Box2D/include/box2d/b2_math.h | 715 + .../Box2D/include/box2d/b2_motor_joint.h | 138 + .../Box2D/include/box2d/b2_mouse_joint.h | 134 + .../Box2D/include/box2d/b2_polygon_shape.h | 95 + .../Box2D/include/box2d/b2_prismatic_joint.h | 205 + .../Box2D/include/box2d/b2_pulley_joint.h | 157 + .../Box2D/include/box2d/b2_revolute_joint.h | 211 + Client/ThirdParty/Box2D/include/box2d/b2_rope.h | 153 + .../ThirdParty/Box2D/include/box2d/b2_settings.h | 127 + Client/ThirdParty/Box2D/include/box2d/b2_shape.h | 110 + .../Box2D/include/box2d/b2_stack_allocator.h | 65 + .../Box2D/include/box2d/b2_time_of_impact.h | 63 + .../ThirdParty/Box2D/include/box2d/b2_time_step.h | 74 + Client/ThirdParty/Box2D/include/box2d/b2_timer.h | 55 + Client/ThirdParty/Box2D/include/box2d/b2_types.h | 33 + .../ThirdParty/Box2D/include/box2d/b2_weld_joint.h | 133 + .../Box2D/include/box2d/b2_wheel_joint.h | 240 + Client/ThirdParty/Box2D/include/box2d/b2_world.h | 345 + .../Box2D/include/box2d/b2_world_callbacks.h | 161 + Client/ThirdParty/Box2D/include/box2d/box2d.h | 58 + Client/ThirdParty/Box2D/proj/ALL_BUILD.vcxproj | 201 + .../Box2D/proj/ALL_BUILD.vcxproj.filters | 8 + Client/ThirdParty/Box2D/proj/CMakeCache.txt | 441 + .../INSTALL_force.rule | 1 + .../INSTALL_force.rule | 1 + .../CMakeFiles/3.22.0-rc2/CMakeCCompiler.cmake | 72 + .../CMakeFiles/3.22.0-rc2/CMakeCXXCompiler.cmake | 83 + .../3.22.0-rc2/CMakeDetermineCompilerABI_C.bin | Bin 0 -> 35840 bytes .../3.22.0-rc2/CMakeDetermineCompilerABI_CXX.bin | Bin 0 -> 35840 bytes .../CMakeFiles/3.22.0-rc2/CMakeRCCompiler.cmake | 6 + .../proj/CMakeFiles/3.22.0-rc2/CMakeSystem.cmake | 15 + .../3.22.0-rc2/CompilerIdC/CMakeCCompilerId.c | 803 + .../3.22.0-rc2/CompilerIdC/CompilerIdC.exe | Bin 0 -> 11264 bytes .../3.22.0-rc2/CompilerIdC/CompilerIdC.vcxproj | 71 + .../CompilerIdC/Debug/CMakeCCompilerId.obj | Bin 0 -> 1949 bytes .../Debug/CompilerIdC.tlog/CL.command.1.tlog | Bin 0 -> 906 bytes .../Debug/CompilerIdC.tlog/CL.read.1.tlog | Bin 0 -> 668 bytes .../Debug/CompilerIdC.tlog/CL.write.1.tlog | Bin 0 -> 544 bytes .../CompilerIdC.tlog/CompilerIdC.lastbuildstate | 2 + .../Debug/CompilerIdC.tlog/link.command.1.tlog | Bin 0 -> 1122 bytes .../Debug/CompilerIdC.tlog/link.read.1.tlog | Bin 0 -> 3730 bytes .../Debug/CompilerIdC.tlog/link.write.1.tlog | Bin 0 -> 538 bytes .../CompilerIdCXX/CMakeCXXCompilerId.cpp | 791 + .../3.22.0-rc2/CompilerIdCXX/CompilerIdCXX.exe | Bin 0 -> 11264 bytes .../3.22.0-rc2/CompilerIdCXX/CompilerIdCXX.vcxproj | 71 + .../CompilerIdCXX/Debug/CMakeCXXCompilerId.obj | Bin 0 -> 1967 bytes .../Debug/CompilerIdCXX.tlog/CL.command.1.tlog | Bin 0 -> 930 bytes .../Debug/CompilerIdCXX.tlog/CL.read.1.tlog | Bin 0 -> 680 bytes .../Debug/CompilerIdCXX.tlog/CL.write.1.tlog | Bin 0 -> 564 bytes .../CompilerIdCXX.lastbuildstate | 2 + .../Debug/CompilerIdCXX.tlog/link.command.1.tlog | Bin 0 -> 1146 bytes .../Debug/CompilerIdCXX.tlog/link.read.1.tlog | Bin 0 -> 3746 bytes .../Debug/CompilerIdCXX.tlog/link.write.1.tlog | Bin 0 -> 554 bytes .../VCTargetsPath.lastbuildstate | 2 + .../proj/CMakeFiles/3.22.0-rc2/VCTargetsPath.txt | 1 + .../CMakeFiles/3.22.0-rc2/VCTargetsPath.vcxproj | 28 + .../INSTALL_force.rule | 1 + .../generate.stamp.rule | 1 + .../INSTALL_force.rule | 1 + .../INSTALL_force.rule | 1 + .../INSTALL_force.rule | 1 + .../INSTALL_force.rule | 1 + .../Box2D/proj/CMakeFiles/CMakeError.log | 16 + .../Box2D/proj/CMakeFiles/CMakeOutput.log | 123 + .../Box2D/proj/CMakeFiles/TargetDirectories.txt | 17 + .../INSTALL_force.rule | 1 + .../Box2D/proj/CMakeFiles/cmake.check_cache | 1 + .../Box2D/proj/CMakeFiles/generate.stamp | 1 + .../Box2D/proj/CMakeFiles/generate.stamp.depend | 96 + .../Box2D/proj/CMakeFiles/generate.stamp.list | 8 + Client/ThirdParty/Box2D/proj/INSTALL.vcxproj | 193 + .../ThirdParty/Box2D/proj/INSTALL.vcxproj.filters | 13 + Client/ThirdParty/Box2D/proj/ZERO_CHECK.vcxproj | 167 + .../Box2D/proj/ZERO_CHECK.vcxproj.filters | 13 + Client/ThirdParty/Box2D/proj/box2d.sln | 164 + Client/ThirdParty/Box2D/proj/cmake_install.cmake | 60 + .../proj/extern/glad/CMakeFiles/generate.stamp | 1 + .../extern/glad/CMakeFiles/generate.stamp.depend | 2 + .../Box2D/proj/extern/glad/INSTALL.vcxproj | 193 + .../Box2D/proj/extern/glad/INSTALL.vcxproj.filters | 13 + .../Box2D/proj/extern/glad/cmake_install.cmake | 34 + .../ThirdParty/Box2D/proj/extern/glad/glad.vcxproj | 279 + .../Box2D/proj/extern/glad/glad.vcxproj.filters | 33 + .../proj/extern/glfw/CMakeFiles/generate.stamp | 1 + .../extern/glfw/CMakeFiles/generate.stamp.depend | 10 + .../Box2D/proj/extern/glfw/INSTALL.vcxproj | 193 + .../Box2D/proj/extern/glfw/INSTALL.vcxproj.filters | 13 + .../Box2D/proj/extern/glfw/cmake_install.cmake | 34 + .../ThirdParty/Box2D/proj/extern/glfw/glfw.vcxproj | 300 + .../Box2D/proj/extern/glfw/glfw.vcxproj.filters | 93 + .../proj/extern/imgui/CMakeFiles/generate.stamp | 1 + .../extern/imgui/CMakeFiles/generate.stamp.depend | 2 + .../Box2D/proj/extern/imgui/INSTALL.vcxproj | 193 + .../proj/extern/imgui/INSTALL.vcxproj.filters | 13 + .../Box2D/proj/extern/imgui/cmake_install.cmake | 34 + .../Box2D/proj/extern/imgui/imgui.vcxproj | 286 + .../Box2D/proj/extern/imgui/imgui.vcxproj.filters | 22 + .../proj/extern/sajson/CMakeFiles/generate.stamp | 1 + .../extern/sajson/CMakeFiles/generate.stamp.depend | 2 + .../Box2D/proj/extern/sajson/INSTALL.vcxproj | 193 + .../proj/extern/sajson/INSTALL.vcxproj.filters | 13 + .../Box2D/proj/extern/sajson/cmake_install.cmake | 34 + .../Box2D/proj/extern/sajson/sajson.vcxproj | 278 + .../proj/extern/sajson/sajson.vcxproj.filters | 14 + .../Export/lib/cmake/box2d/box2dConfig-debug.cmake | 19 + .../lib/cmake/box2d/box2dConfig-minsizerel.cmake | 19 + .../lib/cmake/box2d/box2dConfig-release.cmake | 19 + .../cmake/box2d/box2dConfig-relwithdebinfo.cmake | 19 + .../Export/lib/cmake/box2d/box2dConfig.cmake | 94 + .../Box2D/proj/src/CMakeFiles/generate.stamp | 1 + .../proj/src/CMakeFiles/generate.stamp.depend | 5 + Client/ThirdParty/Box2D/proj/src/INSTALL.vcxproj | 193 + .../Box2D/proj/src/INSTALL.vcxproj.filters | 13 + Client/ThirdParty/Box2D/proj/src/box2d.vcxproj | 374 + .../Box2D/proj/src/box2d.vcxproj.filters | 315 + .../Box2D/proj/src/box2dConfigVersion.cmake | 70 + .../ThirdParty/Box2D/proj/src/cmake_install.cmake | 90 + .../Box2D/proj/testbed/CMakeFiles/generate.stamp | 1 + .../proj/testbed/CMakeFiles/generate.stamp.depend | 2 + .../ThirdParty/Box2D/proj/testbed/INSTALL.vcxproj | 193 + .../Box2D/proj/testbed/INSTALL.vcxproj.filters | 13 + .../Box2D/proj/testbed/cmake_install.cmake | 34 + .../ThirdParty/Box2D/proj/testbed/testbed.vcxproj | 465 + .../Box2D/proj/testbed/testbed.vcxproj.filters | 200 + .../Box2D/proj/unit-test/CMakeFiles/generate.stamp | 1 + .../unit-test/CMakeFiles/generate.stamp.depend | 2 + .../Box2D/proj/unit-test/INSTALL.vcxproj | 193 + .../Box2D/proj/unit-test/INSTALL.vcxproj.filters | 13 + .../Box2D/proj/unit-test/cmake_install.cmake | 34 + .../Box2D/proj/unit-test/unit_test.vcxproj | 334 + .../Box2D/proj/unit-test/unit_test.vcxproj.filters | 18 + Client/ThirdParty/Box2D/src/CMakeLists.txt | 163 + .../Box2D/src/collision/b2_broad_phase.cpp | 131 + .../Box2D/src/collision/b2_chain_shape.cpp | 185 + .../Box2D/src/collision/b2_circle_shape.cpp | 105 + .../Box2D/src/collision/b2_collide_circle.cpp | 158 + .../Box2D/src/collision/b2_collide_edge.cpp | 524 + .../Box2D/src/collision/b2_collide_polygon.cpp | 243 + .../Box2D/src/collision/b2_collision.cpp | 258 + .../ThirdParty/Box2D/src/collision/b2_distance.cpp | 746 + .../Box2D/src/collision/b2_dynamic_tree.cpp | 801 + .../Box2D/src/collision/b2_edge_shape.cpp | 158 + .../Box2D/src/collision/b2_polygon_shape.cpp | 459 + .../Box2D/src/collision/b2_time_of_impact.cpp | 490 + .../Box2D/src/common/b2_block_allocator.cpp | 230 + Client/ThirdParty/Box2D/src/common/b2_draw.cpp | 47 + Client/ThirdParty/Box2D/src/common/b2_math.cpp | 98 + Client/ThirdParty/Box2D/src/common/b2_settings.cpp | 74 + .../Box2D/src/common/b2_stack_allocator.cpp | 87 + Client/ThirdParty/Box2D/src/common/b2_timer.cpp | 125 + Client/ThirdParty/Box2D/src/dynamics/b2_body.cpp | 565 + .../Box2D/src/dynamics/b2_chain_circle_contact.cpp | 57 + .../Box2D/src/dynamics/b2_chain_circle_contact.h | 43 + .../src/dynamics/b2_chain_polygon_contact.cpp | 57 + .../Box2D/src/dynamics/b2_chain_polygon_contact.h | 43 + .../Box2D/src/dynamics/b2_circle_contact.cpp | 56 + .../Box2D/src/dynamics/b2_circle_contact.h | 43 + .../ThirdParty/Box2D/src/dynamics/b2_contact.cpp | 252 + .../Box2D/src/dynamics/b2_contact_manager.cpp | 293 + .../Box2D/src/dynamics/b2_contact_solver.cpp | 843 + .../Box2D/src/dynamics/b2_contact_solver.h | 100 + .../Box2D/src/dynamics/b2_distance_joint.cpp | 421 + .../Box2D/src/dynamics/b2_edge_circle_contact.cpp | 54 + .../Box2D/src/dynamics/b2_edge_circle_contact.h | 43 + .../Box2D/src/dynamics/b2_edge_polygon_contact.cpp | 54 + .../Box2D/src/dynamics/b2_edge_polygon_contact.h | 43 + .../ThirdParty/Box2D/src/dynamics/b2_fixture.cpp | 305 + .../Box2D/src/dynamics/b2_friction_joint.cpp | 255 + .../Box2D/src/dynamics/b2_gear_joint.cpp | 429 + Client/ThirdParty/Box2D/src/dynamics/b2_island.cpp | 544 + Client/ThirdParty/Box2D/src/dynamics/b2_island.h | 97 + Client/ThirdParty/Box2D/src/dynamics/b2_joint.cpp | 301 + .../Box2D/src/dynamics/b2_motor_joint.cpp | 311 + .../Box2D/src/dynamics/b2_mouse_joint.cpp | 192 + .../src/dynamics/b2_polygon_circle_contact.cpp | 54 + .../Box2D/src/dynamics/b2_polygon_circle_contact.h | 42 + .../Box2D/src/dynamics/b2_polygon_contact.cpp | 57 + .../Box2D/src/dynamics/b2_polygon_contact.h | 43 + .../Box2D/src/dynamics/b2_prismatic_joint.cpp | 643 + .../Box2D/src/dynamics/b2_pulley_joint.cpp | 352 + .../Box2D/src/dynamics/b2_revolute_joint.cpp | 501 + .../Box2D/src/dynamics/b2_weld_joint.cpp | 344 + .../Box2D/src/dynamics/b2_wheel_joint.cpp | 672 + Client/ThirdParty/Box2D/src/dynamics/b2_world.cpp | 1322 + .../Box2D/src/dynamics/b2_world_callbacks.cpp | 40 + Client/ThirdParty/Box2D/src/rope/b2_rope.cpp | 809 + Client/ThirdParty/Box2D/testbed/CMakeLists.txt | 92 + .../Box2D/testbed/MacOSXBundleInfo.plist.in | 41 + .../ThirdParty/Box2D/testbed/data/droid_sans.ttf | Bin 0 -> 190044 bytes Client/ThirdParty/Box2D/testbed/draw.cpp | 829 + Client/ThirdParty/Box2D/testbed/draw.h | 102 + .../ThirdParty/Box2D/testbed/imgui_impl_glfw.cpp | 324 + Client/ThirdParty/Box2D/testbed/imgui_impl_glfw.h | 33 + .../Box2D/testbed/imgui_impl_opengl3.cpp | 556 + .../ThirdParty/Box2D/testbed/imgui_impl_opengl3.h | 44 + Client/ThirdParty/Box2D/testbed/main.cpp | 651 + Client/ThirdParty/Box2D/testbed/settings.cpp | 176 + Client/ThirdParty/Box2D/testbed/settings.h | 83 + Client/ThirdParty/Box2D/testbed/test.cpp | 469 + Client/ThirdParty/Box2D/testbed/test.h | 156 + Client/ThirdParty/Box2D/testbed/tests/add_pair.cpp | 71 + .../ThirdParty/Box2D/testbed/tests/apply_force.cpp | 203 + .../ThirdParty/Box2D/testbed/tests/body_types.cpp | 163 + .../ThirdParty/Box2D/testbed/tests/box_stack.cpp | 174 + .../ThirdParty/Box2D/testbed/tests/breakable.cpp | 158 + Client/ThirdParty/Box2D/testbed/tests/bridge.cpp | 128 + .../ThirdParty/Box2D/testbed/tests/bullet_test.cpp | 139 + .../ThirdParty/Box2D/testbed/tests/cantilever.cpp | 218 + Client/ThirdParty/Box2D/testbed/tests/car.cpp | 284 + Client/ThirdParty/Box2D/testbed/tests/chain.cpp | 92 + .../Box2D/testbed/tests/chain_problem.cpp | 94 + .../Box2D/testbed/tests/character_collision.cpp | 256 + .../Box2D/testbed/tests/circle_stack.cpp | 89 + .../Box2D/testbed/tests/collision_filtering.cpp | 179 + .../Box2D/testbed/tests/collision_processing.cpp | 191 + .../Box2D/testbed/tests/compound_shapes.cpp | 227 + Client/ThirdParty/Box2D/testbed/tests/confined.cpp | 170 + .../Box2D/testbed/tests/continuous_test.cpp | 160 + .../ThirdParty/Box2D/testbed/tests/convex_hull.cpp | 112 + .../Box2D/testbed/tests/conveyor_belt.cpp | 101 + .../Box2D/testbed/tests/distance_joint.cpp | 123 + .../Box2D/testbed/tests/distance_test.cpp | 139 + Client/ThirdParty/Box2D/testbed/tests/dominos.cpp | 220 + .../ThirdParty/Box2D/testbed/tests/dump_loader.cpp | 88 + .../Box2D/testbed/tests/dynamic_tree.cpp | 360 + .../ThirdParty/Box2D/testbed/tests/edge_shapes.cpp | 253 + .../ThirdParty/Box2D/testbed/tests/edge_test.cpp | 282 + Client/ThirdParty/Box2D/testbed/tests/friction.cpp | 127 + .../ThirdParty/Box2D/testbed/tests/gear_joint.cpp | 180 + Client/ThirdParty/Box2D/testbed/tests/heavy1.cpp | 61 + Client/ThirdParty/Box2D/testbed/tests/heavy2.cpp | 94 + .../Box2D/testbed/tests/mobile_balanced.cpp | 108 + .../Box2D/testbed/tests/mobile_unbalanced.cpp | 105 + .../ThirdParty/Box2D/testbed/tests/motor_joint.cpp | 118 + Client/ThirdParty/Box2D/testbed/tests/pinball.cpp | 170 + .../ThirdParty/Box2D/testbed/tests/platformer.cpp | 133 + .../Box2D/testbed/tests/polygon_collision.cpp | 127 + .../Box2D/testbed/tests/polygon_shapes.cpp | 265 + .../Box2D/testbed/tests/prismatic_joint.cpp | 118 + .../Box2D/testbed/tests/pulley_joint.cpp | 96 + Client/ThirdParty/Box2D/testbed/tests/pyramid.cpp | 92 + Client/ThirdParty/Box2D/testbed/tests/ray_cast.cpp | 479 + .../ThirdParty/Box2D/testbed/tests/restitution.cpp | 79 + .../Box2D/testbed/tests/revolute_joint.cpp | 162 + Client/ThirdParty/Box2D/testbed/tests/rope.cpp | 286 + Client/ThirdParty/Box2D/testbed/tests/sensor.cpp | 195 + .../ThirdParty/Box2D/testbed/tests/shape_cast.cpp | 193 + .../Box2D/testbed/tests/shape_editing.cpp | 108 + Client/ThirdParty/Box2D/testbed/tests/skier.cpp | 150 + .../Box2D/testbed/tests/slider_crank_1.cpp | 106 + .../Box2D/testbed/tests/slider_crank_2.cpp | 160 + .../ThirdParty/Box2D/testbed/tests/theo_jansen.cpp | 266 + Client/ThirdParty/Box2D/testbed/tests/tiles.cpp | 159 + .../Box2D/testbed/tests/time_of_impact.cpp | 131 + Client/ThirdParty/Box2D/testbed/tests/tumbler.cpp | 102 + Client/ThirdParty/Box2D/testbed/tests/web.cpp | 218 + .../ThirdParty/Box2D/testbed/tests/wheel_joint.cpp | 126 + .../Box2D/testbed/tests/wrecking_ball.cpp | 165 + Client/ThirdParty/Box2D/unit-test/CMakeLists.txt | 18 + .../ThirdParty/Box2D/unit-test/collision_test.cpp | 81 + Client/ThirdParty/Box2D/unit-test/doctest.h | 6580 +++++ Client/ThirdParty/Box2D/unit-test/hello_world.cpp | 112 + Client/ThirdParty/Box2D/unit-test/joint_test.cpp | 106 + Client/ThirdParty/Box2D/unit-test/math_test.cpp | 54 + Client/ThirdParty/Box2D/unit-test/world_test.cpp | 73 + Client/ThirdParty/SDL2/BUGS.txt | 16 + Client/ThirdParty/SDL2/COPYING.txt | 20 + Client/ThirdParty/SDL2/README-SDL.txt | 13 + Client/ThirdParty/SDL2/README.txt | 21 + Client/ThirdParty/SDL2/SDL.h | 221 + Client/ThirdParty/SDL2/SDL_assert.h | 318 + Client/ThirdParty/SDL2/SDL_atomic.h | 379 + Client/ThirdParty/SDL2/SDL_audio.h | 1185 + Client/ThirdParty/SDL2/SDL_bits.h | 126 + Client/ThirdParty/SDL2/SDL_blendmode.h | 200 + Client/ThirdParty/SDL2/SDL_clipboard.h | 89 + Client/ThirdParty/SDL2/SDL_config.h | 299 + Client/ThirdParty/SDL2/SDL_config.h.cmake | 445 + Client/ThirdParty/SDL2/SDL_config.h.in | 389 + Client/ThirdParty/SDL2/SDL_config_android.h | 157 + Client/ThirdParty/SDL2/SDL_config_iphoneos.h | 166 + Client/ThirdParty/SDL2/SDL_config_macosx.h | 197 + Client/ThirdParty/SDL2/SDL_config_macosx.h.orig | 197 + Client/ThirdParty/SDL2/SDL_config_minimal.h | 82 + Client/ThirdParty/SDL2/SDL_config_pandora.h | 128 + Client/ThirdParty/SDL2/SDL_config_psp.h | 144 + Client/ThirdParty/SDL2/SDL_config_windows.h | 225 + Client/ThirdParty/SDL2/SDL_config_winrt.h | 215 + Client/ThirdParty/SDL2/SDL_config_wiz.h | 121 + Client/ThirdParty/SDL2/SDL_copying.h | 20 + Client/ThirdParty/SDL2/SDL_cpuinfo.h | 524 + Client/ThirdParty/SDL2/SDL_egl.h | 1676 ++ Client/ThirdParty/SDL2/SDL_endian.h | 316 + Client/ThirdParty/SDL2/SDL_error.h | 155 + Client/ThirdParty/SDL2/SDL_events.h | 1098 + Client/ThirdParty/SDL2/SDL_filesystem.h | 145 + Client/ThirdParty/SDL2/SDL_gamecontroller.h | 870 + Client/ThirdParty/SDL2/SDL_gesture.h | 117 + Client/ThirdParty/SDL2/SDL_haptic.h | 1320 + Client/ThirdParty/SDL2/SDL_hints.h | 1840 ++ Client/ThirdParty/SDL2/SDL_joystick.h | 821 + Client/ThirdParty/SDL2/SDL_keyboard.h | 294 + Client/ThirdParty/SDL2/SDL_keycode.h | 351 + Client/ThirdParty/SDL2/SDL_loadso.h | 109 + Client/ThirdParty/SDL2/SDL_locale.h | 101 + Client/ThirdParty/SDL2/SDL_log.h | 376 + Client/ThirdParty/SDL2/SDL_main.h | 186 + Client/ThirdParty/SDL2/SDL_messagebox.h | 191 + Client/ThirdParty/SDL2/SDL_metal.h | 104 + Client/ThirdParty/SDL2/SDL_misc.h | 79 + Client/ThirdParty/SDL2/SDL_mouse.h | 432 + Client/ThirdParty/SDL2/SDL_mutex.h | 435 + Client/ThirdParty/SDL2/SDL_name.h | 33 + Client/ThirdParty/SDL2/SDL_opengl.h | 2183 ++ Client/ThirdParty/SDL2/SDL_opengl_glext.h | 11180 ++++++++ Client/ThirdParty/SDL2/SDL_opengles.h | 39 + Client/ThirdParty/SDL2/SDL_opengles2.h | 52 + Client/ThirdParty/SDL2/SDL_opengles2_gl2.h | 621 + Client/ThirdParty/SDL2/SDL_opengles2_gl2ext.h | 2050 ++ Client/ThirdParty/SDL2/SDL_opengles2_gl2platform.h | 30 + Client/ThirdParty/SDL2/SDL_opengles2_khrplatform.h | 282 + Client/ThirdParty/SDL2/SDL_pixels.h | 613 + Client/ThirdParty/SDL2/SDL_platform.h | 233 + Client/ThirdParty/SDL2/SDL_power.h | 86 + Client/ThirdParty/SDL2/SDL_quit.h | 58 + Client/ThirdParty/SDL2/SDL_rect.h | 218 + Client/ThirdParty/SDL2/SDL_render.h | 1625 ++ Client/ThirdParty/SDL2/SDL_revision.h | 2 + Client/ThirdParty/SDL2/SDL_rwops.h | 412 + Client/ThirdParty/SDL2/SDL_scancode.h | 413 + Client/ThirdParty/SDL2/SDL_sensor.h | 271 + Client/ThirdParty/SDL2/SDL_shape.h | 147 + Client/ThirdParty/SDL2/SDL_stdinc.h | 694 + Client/ThirdParty/SDL2/SDL_surface.h | 887 + Client/ThirdParty/SDL2/SDL_system.h | 475 + Client/ThirdParty/SDL2/SDL_syswm.h | 378 + Client/ThirdParty/SDL2/SDL_test.h | 69 + Client/ThirdParty/SDL2/SDL_test_assert.h | 105 + Client/ThirdParty/SDL2/SDL_test_common.h | 230 + Client/ThirdParty/SDL2/SDL_test_compare.h | 69 + Client/ThirdParty/SDL2/SDL_test_crc32.h | 124 + Client/ThirdParty/SDL2/SDL_test_font.h | 81 + Client/ThirdParty/SDL2/SDL_test_fuzzer.h | 386 + Client/ThirdParty/SDL2/SDL_test_harness.h | 134 + Client/ThirdParty/SDL2/SDL_test_images.h | 78 + Client/ThirdParty/SDL2/SDL_test_log.h | 67 + Client/ThirdParty/SDL2/SDL_test_md5.h | 129 + Client/ThirdParty/SDL2/SDL_test_memory.h | 63 + Client/ThirdParty/SDL2/SDL_test_random.h | 115 + Client/ThirdParty/SDL2/SDL_thread.h | 454 + Client/ThirdParty/SDL2/SDL_timer.h | 172 + Client/ThirdParty/SDL2/SDL_touch.h | 138 + Client/ThirdParty/SDL2/SDL_types.h | 29 + Client/ThirdParty/SDL2/SDL_version.h | 172 + Client/ThirdParty/SDL2/SDL_video.h | 1901 ++ Client/ThirdParty/SDL2/SDL_vulkan.h | 213 + Client/ThirdParty/SDL2/WhatsNew.txt | 643 + Client/ThirdParty/SDL2/begin_code.h | 166 + Client/ThirdParty/SDL2/close_code.h | 40 + Client/ThirdParty/SDL2/docs/README-android.md | 472 + Client/ThirdParty/SDL2/docs/README-cmake.md | 84 + Client/ThirdParty/SDL2/docs/README-directfb.md | 107 + Client/ThirdParty/SDL2/docs/README-dynapi.md | 138 + Client/ThirdParty/SDL2/docs/README-emscripten.md | 35 + Client/ThirdParty/SDL2/docs/README-gesture.md | 71 + Client/ThirdParty/SDL2/docs/README-git.md | 19 + Client/ThirdParty/SDL2/docs/README-hg.md | 4 + Client/ThirdParty/SDL2/docs/README-ios.md | 295 + Client/ThirdParty/SDL2/docs/README-kmsbsd.md | 27 + Client/ThirdParty/SDL2/docs/README-linux.md | 83 + Client/ThirdParty/SDL2/docs/README-macosx.md | 240 + Client/ThirdParty/SDL2/docs/README-nacl.md | 103 + Client/ThirdParty/SDL2/docs/README-os2.md | 54 + Client/ThirdParty/SDL2/docs/README-pandora.md | 17 + Client/ThirdParty/SDL2/docs/README-platforms.md | 8 + Client/ThirdParty/SDL2/docs/README-porting.md | 68 + Client/ThirdParty/SDL2/docs/README-psp.md | 19 + Client/ThirdParty/SDL2/docs/README-raspberrypi.md | 188 + Client/ThirdParty/SDL2/docs/README-touch.md | 86 + Client/ThirdParty/SDL2/docs/README-visualc.md | 114 + Client/ThirdParty/SDL2/docs/README-vita.md | 25 + Client/ThirdParty/SDL2/docs/README-wince.md | 10 + Client/ThirdParty/SDL2/docs/README-windows.md | 45 + Client/ThirdParty/SDL2/docs/README-winrt.md | 550 + Client/ThirdParty/SDL2/docs/README.md | 65 + Client/ThirdParty/SDL2/docs/doxyfile | 1560 ++ Client/ThirdParty/SDL2/include/SDL.h | 221 + Client/ThirdParty/SDL2/include/SDL_assert.h | 318 + Client/ThirdParty/SDL2/include/SDL_atomic.h | 379 + Client/ThirdParty/SDL2/include/SDL_audio.h | 1185 + Client/ThirdParty/SDL2/include/SDL_bits.h | 126 + Client/ThirdParty/SDL2/include/SDL_blendmode.h | 200 + Client/ThirdParty/SDL2/include/SDL_clipboard.h | 89 + Client/ThirdParty/SDL2/include/SDL_config.h | 299 + Client/ThirdParty/SDL2/include/SDL_config.h.cmake | 445 + Client/ThirdParty/SDL2/include/SDL_config.h.in | 389 + .../ThirdParty/SDL2/include/SDL_config_android.h | 157 + .../ThirdParty/SDL2/include/SDL_config_iphoneos.h | 166 + Client/ThirdParty/SDL2/include/SDL_config_macosx.h | 197 + .../SDL2/include/SDL_config_macosx.h.orig | 197 + .../ThirdParty/SDL2/include/SDL_config_minimal.h | 82 + .../ThirdParty/SDL2/include/SDL_config_pandora.h | 128 + Client/ThirdParty/SDL2/include/SDL_config_psp.h | 144 + .../ThirdParty/SDL2/include/SDL_config_windows.h | 225 + Client/ThirdParty/SDL2/include/SDL_config_winrt.h | 215 + Client/ThirdParty/SDL2/include/SDL_config_wiz.h | 121 + Client/ThirdParty/SDL2/include/SDL_copying.h | 20 + Client/ThirdParty/SDL2/include/SDL_cpuinfo.h | 524 + Client/ThirdParty/SDL2/include/SDL_egl.h | 1676 ++ Client/ThirdParty/SDL2/include/SDL_endian.h | 316 + Client/ThirdParty/SDL2/include/SDL_error.h | 155 + Client/ThirdParty/SDL2/include/SDL_events.h | 1098 + Client/ThirdParty/SDL2/include/SDL_filesystem.h | 145 + .../ThirdParty/SDL2/include/SDL_gamecontroller.h | 870 + Client/ThirdParty/SDL2/include/SDL_gesture.h | 117 + Client/ThirdParty/SDL2/include/SDL_haptic.h | 1320 + Client/ThirdParty/SDL2/include/SDL_hints.h | 1840 ++ Client/ThirdParty/SDL2/include/SDL_joystick.h | 821 + Client/ThirdParty/SDL2/include/SDL_keyboard.h | 294 + Client/ThirdParty/SDL2/include/SDL_keycode.h | 351 + Client/ThirdParty/SDL2/include/SDL_loadso.h | 109 + Client/ThirdParty/SDL2/include/SDL_locale.h | 101 + Client/ThirdParty/SDL2/include/SDL_log.h | 376 + Client/ThirdParty/SDL2/include/SDL_main.h | 186 + Client/ThirdParty/SDL2/include/SDL_messagebox.h | 191 + Client/ThirdParty/SDL2/include/SDL_metal.h | 104 + Client/ThirdParty/SDL2/include/SDL_misc.h | 79 + Client/ThirdParty/SDL2/include/SDL_mouse.h | 432 + Client/ThirdParty/SDL2/include/SDL_mutex.h | 435 + Client/ThirdParty/SDL2/include/SDL_name.h | 33 + Client/ThirdParty/SDL2/include/SDL_opengl.h | 2183 ++ Client/ThirdParty/SDL2/include/SDL_opengl_glext.h | 11180 ++++++++ Client/ThirdParty/SDL2/include/SDL_opengles.h | 39 + Client/ThirdParty/SDL2/include/SDL_opengles2.h | 52 + Client/ThirdParty/SDL2/include/SDL_opengles2_gl2.h | 621 + .../ThirdParty/SDL2/include/SDL_opengles2_gl2ext.h | 2050 ++ .../SDL2/include/SDL_opengles2_gl2platform.h | 30 + .../SDL2/include/SDL_opengles2_khrplatform.h | 282 + Client/ThirdParty/SDL2/include/SDL_pixels.h | 613 + Client/ThirdParty/SDL2/include/SDL_platform.h | 233 + Client/ThirdParty/SDL2/include/SDL_power.h | 86 + Client/ThirdParty/SDL2/include/SDL_quit.h | 58 + Client/ThirdParty/SDL2/include/SDL_rect.h | 218 + Client/ThirdParty/SDL2/include/SDL_render.h | 1625 ++ Client/ThirdParty/SDL2/include/SDL_revision.h | 2 + Client/ThirdParty/SDL2/include/SDL_rwops.h | 412 + Client/ThirdParty/SDL2/include/SDL_scancode.h | 413 + Client/ThirdParty/SDL2/include/SDL_sensor.h | 271 + Client/ThirdParty/SDL2/include/SDL_shape.h | 147 + Client/ThirdParty/SDL2/include/SDL_stdinc.h | 694 + Client/ThirdParty/SDL2/include/SDL_surface.h | 887 + Client/ThirdParty/SDL2/include/SDL_system.h | 475 + Client/ThirdParty/SDL2/include/SDL_syswm.h | 378 + Client/ThirdParty/SDL2/include/SDL_test.h | 69 + Client/ThirdParty/SDL2/include/SDL_test_assert.h | 105 + Client/ThirdParty/SDL2/include/SDL_test_common.h | 230 + Client/ThirdParty/SDL2/include/SDL_test_compare.h | 69 + Client/ThirdParty/SDL2/include/SDL_test_crc32.h | 124 + Client/ThirdParty/SDL2/include/SDL_test_font.h | 81 + Client/ThirdParty/SDL2/include/SDL_test_fuzzer.h | 386 + Client/ThirdParty/SDL2/include/SDL_test_harness.h | 134 + Client/ThirdParty/SDL2/include/SDL_test_images.h | 78 + Client/ThirdParty/SDL2/include/SDL_test_log.h | 67 + Client/ThirdParty/SDL2/include/SDL_test_md5.h | 129 + Client/ThirdParty/SDL2/include/SDL_test_memory.h | 63 + Client/ThirdParty/SDL2/include/SDL_test_random.h | 115 + Client/ThirdParty/SDL2/include/SDL_thread.h | 454 + Client/ThirdParty/SDL2/include/SDL_timer.h | 172 + Client/ThirdParty/SDL2/include/SDL_touch.h | 138 + Client/ThirdParty/SDL2/include/SDL_types.h | 29 + Client/ThirdParty/SDL2/include/SDL_version.h | 172 + Client/ThirdParty/SDL2/include/SDL_video.h | 1901 ++ Client/ThirdParty/SDL2/include/SDL_vulkan.h | 213 + Client/ThirdParty/SDL2/include/begin_code.h | 166 + Client/ThirdParty/SDL2/include/close_code.h | 40 + Client/ThirdParty/SDL2/lib/x64/SDL2.dll | Bin 0 -> 1609728 bytes Client/ThirdParty/SDL2/lib/x64/SDL2.lib | Bin 0 -> 165034 bytes Client/ThirdParty/SDL2/lib/x64/SDL2main.lib | Bin 0 -> 42892 bytes Client/ThirdParty/SDL2/lib/x64/SDL2test.lib | Bin 0 -> 979548 bytes Client/ThirdParty/SDL2/lib/x86/SDL2.dll | Bin 0 -> 1398272 bytes Client/ThirdParty/SDL2/lib/x86/SDL2.lib | Bin 0 -> 168866 bytes Client/ThirdParty/SDL2/lib/x86/SDL2main.lib | Bin 0 -> 41534 bytes Client/ThirdParty/SDL2/lib/x86/SDL2test.lib | Bin 0 -> 934890 bytes .../StaticConstructorSample/MyClass.cpp | 43 + .../StaticConstructorSample/MyClass.h | 36 + .../StaticConstructorSample/MyTemplate.h | 48 + .../StaticConstructorSample.cpp | 76 + .../StaticConstructorSample.sln | 20 + .../StaticConstructorSample.vcproj | 229 + .../StaticConstructorSample/stdafx.cpp | 8 + .../StaticConstructorSample/stdafx.h | 24 + .../StaticConstructor/include/StaticConstructor.h | 126 + Client/ThirdParty/freetype/ChangeLog | 7815 ++++++ Client/ThirdParty/freetype/FTL.TXT | 169 + Client/ThirdParty/freetype/GPLv2.TXT | 340 + Client/ThirdParty/freetype/LICENSE.TXT | 42 + Client/ThirdParty/freetype/README.md | 23 + .../freetype/include/freetype/config/ftconfig.h | 51 + .../freetype/include/freetype/config/ftheader.h | 824 + .../freetype/include/freetype/config/ftmodule.h | 32 + .../freetype/include/freetype/config/ftoption.h | 1011 + .../freetype/include/freetype/config/ftstdlib.h | 175 + .../include/freetype/config/integer-types.h | 245 + .../freetype/include/freetype/config/mac-support.h | 49 + .../include/freetype/config/public-macros.h | 120 + .../freetype/include/freetype/freetype.h | 4833 ++++ .../freetype/include/freetype/ftadvanc.h | 188 + .../ThirdParty/freetype/include/freetype/ftbbox.h | 101 + .../ThirdParty/freetype/include/freetype/ftbdf.h | 212 + .../freetype/include/freetype/ftbitmap.h | 329 + .../ThirdParty/freetype/include/freetype/ftbzip2.h | 102 + .../ThirdParty/freetype/include/freetype/ftcache.h | 1087 + .../freetype/include/freetype/ftchapters.h | 147 + .../ThirdParty/freetype/include/freetype/ftcid.h | 167 + .../ThirdParty/freetype/include/freetype/ftcolor.h | 1609 ++ .../freetype/include/freetype/ftdriver.h | 1193 + .../freetype/include/freetype/fterrdef.h | 279 + .../freetype/include/freetype/fterrors.h | 296 + .../freetype/include/freetype/ftfntfmt.h | 93 + .../ThirdParty/freetype/include/freetype/ftgasp.h | 143 + .../ThirdParty/freetype/include/freetype/ftglyph.h | 664 + .../ThirdParty/freetype/include/freetype/ftgxval.h | 354 + .../ThirdParty/freetype/include/freetype/ftgzip.h | 151 + .../ThirdParty/freetype/include/freetype/ftimage.h | 1276 + .../freetype/include/freetype/ftincrem.h | 348 + .../freetype/include/freetype/ftlcdfil.h | 323 + .../ThirdParty/freetype/include/freetype/ftlist.h | 296 + .../freetype/include/freetype/ftlogging.h | 184 + .../ThirdParty/freetype/include/freetype/ftlzw.h | 100 + .../ThirdParty/freetype/include/freetype/ftmac.h | 289 + Client/ThirdParty/freetype/include/freetype/ftmm.h | 752 + .../freetype/include/freetype/ftmodapi.h | 806 + .../freetype/include/freetype/ftmoderr.h | 204 + .../ThirdParty/freetype/include/freetype/ftotval.h | 206 + .../ThirdParty/freetype/include/freetype/ftoutln.h | 586 + .../freetype/include/freetype/ftparams.h | 203 + .../ThirdParty/freetype/include/freetype/ftpfr.h | 179 + .../freetype/include/freetype/ftrender.h | 244 + .../ThirdParty/freetype/include/freetype/ftsizes.h | 159 + .../freetype/include/freetype/ftsnames.h | 272 + .../freetype/include/freetype/ftstroke.h | 773 + .../ThirdParty/freetype/include/freetype/ftsynth.h | 83 + .../freetype/include/freetype/ftsystem.h | 352 + .../freetype/include/freetype/fttrigon.h | 350 + .../ThirdParty/freetype/include/freetype/fttypes.h | 615 + .../freetype/include/freetype/ftwinfnt.h | 276 + .../freetype/include/freetype/t1tables.h | 773 + .../freetype/include/freetype/ttnameid.h | 1235 + .../freetype/include/freetype/tttables.h | 855 + .../ThirdParty/freetype/include/freetype/tttags.h | 123 + Client/ThirdParty/freetype/include/ft2build.h | 42 + .../freetype/release dll/win32/freetype.dll | Bin 0 -> 706048 bytes .../freetype/release dll/win32/freetype.lib | Bin 0 -> 49486 bytes .../freetype/release dll/win64/freetype.dll | Bin 0 -> 868352 bytes .../freetype/release dll/win64/freetype.lib | Bin 0 -> 48402 bytes .../ThirdParty/freetype/release static/README.TXT | 1 + .../release static/vs2015-2019/win32/freetype.lib | Bin 0 -> 3689862 bytes .../release static/vs2015-2019/win64/freetype.lib | Bin 0 -> 4124048 bytes Client/ThirdParty/glad/glad.c | 1850 ++ Client/ThirdParty/glad/glad.h | 3621 +++ Client/ThirdParty/glad/khrplatform.h | 290 + Client/ThirdParty/imgui/.editorconfig | 24 + Client/ThirdParty/imgui/.gitattributes | 30 + Client/ThirdParty/imgui/.github/FUNDING.yml | 1 + Client/ThirdParty/imgui/.github/issue_template.md | 46 + .../imgui/.github/pull_request_template.md | 6 + .../ThirdParty/imgui/.github/workflows/build.yml | 530 + .../imgui/.github/workflows/scheduled.yml | 15 + .../imgui/.github/workflows/static-analysis.yml | 77 + Client/ThirdParty/imgui/.gitignore | 53 + Client/ThirdParty/imgui/LICENSE.txt | 21 + .../imgui/backends/imgui_impl_allegro5.cpp | 478 + .../imgui/backends/imgui_impl_allegro5.h | 31 + .../imgui/backends/imgui_impl_android.cpp | 187 + .../ThirdParty/imgui/backends/imgui_impl_android.h | 27 + .../ThirdParty/imgui/backends/imgui_impl_dx10.cpp | 578 + Client/ThirdParty/imgui/backends/imgui_impl_dx10.h | 25 + .../ThirdParty/imgui/backends/imgui_impl_dx11.cpp | 594 + Client/ThirdParty/imgui/backends/imgui_impl_dx11.h | 26 + .../ThirdParty/imgui/backends/imgui_impl_dx12.cpp | 746 + Client/ThirdParty/imgui/backends/imgui_impl_dx12.h | 39 + .../ThirdParty/imgui/backends/imgui_impl_dx9.cpp | 378 + Client/ThirdParty/imgui/backends/imgui_impl_dx9.h | 25 + .../ThirdParty/imgui/backends/imgui_impl_glfw.cpp | 454 + Client/ThirdParty/imgui/backends/imgui_impl_glfw.h | 41 + .../ThirdParty/imgui/backends/imgui_impl_glut.cpp | 217 + Client/ThirdParty/imgui/backends/imgui_impl_glut.h | 37 + .../imgui/backends/imgui_impl_marmalade.cpp | 318 + .../imgui/backends/imgui_impl_marmalade.h | 28 + .../ThirdParty/imgui/backends/imgui_impl_metal.h | 29 + .../ThirdParty/imgui/backends/imgui_impl_metal.mm | 556 + .../imgui/backends/imgui_impl_opengl2.cpp | 285 + .../ThirdParty/imgui/backends/imgui_impl_opengl2.h | 32 + .../imgui/backends/imgui_impl_opengl3.cpp | 778 + .../ThirdParty/imgui/backends/imgui_impl_opengl3.h | 55 + .../imgui/backends/imgui_impl_opengl3_loader.h | 752 + Client/ThirdParty/imgui/backends/imgui_impl_osx.h | 24 + Client/ThirdParty/imgui/backends/imgui_impl_osx.mm | 387 + .../ThirdParty/imgui/backends/imgui_impl_sdl.cpp | 449 + Client/ThirdParty/imgui/backends/imgui_impl_sdl.h | 35 + .../imgui/backends/imgui_impl_sdlrenderer.cpp | 238 + .../imgui/backends/imgui_impl_sdlrenderer.h | 27 + .../imgui/backends/imgui_impl_vulkan.cpp | 1474 + .../ThirdParty/imgui/backends/imgui_impl_vulkan.h | 149 + .../ThirdParty/imgui/backends/imgui_impl_wgpu.cpp | 717 + Client/ThirdParty/imgui/backends/imgui_impl_wgpu.h | 25 + .../ThirdParty/imgui/backends/imgui_impl_win32.cpp | 616 + .../ThirdParty/imgui/backends/imgui_impl_win32.h | 42 + .../imgui/backends/vulkan/generate_spv.sh | 6 + .../imgui/backends/vulkan/glsl_shader.frag | 14 + .../imgui/backends/vulkan/glsl_shader.vert | 25 + Client/ThirdParty/imgui/docs/BACKENDS.md | 142 + Client/ThirdParty/imgui/docs/CHANGELOG.txt | 3338 +++ Client/ThirdParty/imgui/docs/EXAMPLES.md | 246 + Client/ThirdParty/imgui/docs/FAQ.md | 676 + Client/ThirdParty/imgui/docs/FONTS.md | 397 + Client/ThirdParty/imgui/docs/README.md | 243 + Client/ThirdParty/imgui/docs/TODO.txt | 404 + Client/ThirdParty/imgui/examples/README.txt | 9 + .../imgui/examples/example_allegro5/README.md | 36 + .../example_allegro5/example_allegro5.vcxproj | 180 + .../example_allegro5.vcxproj.filters | 58 + .../examples/example_allegro5/imconfig_allegro5.h | 11 + .../imgui/examples/example_allegro5/main.cpp | 144 + .../example_android_opengl3/CMakeLists.txt | 40 + .../example_android_opengl3/android/.gitignore | 12 + .../android/app/build.gradle | 34 + .../android/app/src/main/AndroidManifest.xml | 24 + .../android/app/src/main/java/MainActivity.kt | 40 + .../example_android_opengl3/android/build.gradle | 24 + .../android/settings.gradle | 1 + .../examples/example_android_opengl3/main.cpp | 369 + .../imgui/examples/example_apple_metal/README.md | 10 + .../example_apple_metal.xcodeproj/project.pbxproj | 499 + .../example_apple_metal/iOS/Info-iOS.plist | 49 + .../iOS/LaunchScreen.storyboard | 27 + .../example_apple_metal/macOS/Info-macOS.plist | 30 + .../example_apple_metal/macOS/MainMenu.storyboard | 93 + .../imgui/examples/example_apple_metal/main.mm | 356 + .../project.pbxproj | 328 + .../imgui/examples/example_apple_opengl2/main.mm | 282 + .../examples/example_emscripten_opengl3/Makefile | 91 + .../examples/example_emscripten_opengl3/README.md | 26 + .../examples/example_emscripten_opengl3/main.cpp | 174 + .../example_emscripten_opengl3/shell_minimal.html | 64 + .../examples/example_emscripten_wgpu/Makefile | 88 + .../examples/example_emscripten_wgpu/README.md | 24 + .../examples/example_emscripten_wgpu/main.cpp | 245 + .../imgui/examples/example_glfw_metal/Makefile | 46 + .../imgui/examples/example_glfw_metal/main.mm | 172 + .../imgui/examples/example_glfw_opengl2/Makefile | 81 + .../examples/example_glfw_opengl2/build_win32.bat | 8 + .../example_glfw_opengl2.vcxproj | 181 + .../example_glfw_opengl2.vcxproj.filters | 61 + .../imgui/examples/example_glfw_opengl2/main.cpp | 159 + .../imgui/examples/example_glfw_opengl3/Makefile | 89 + .../examples/example_glfw_opengl3/build_win32.bat | 8 + .../example_glfw_opengl3.vcxproj | 182 + .../example_glfw_opengl3.vcxproj.filters | 64 + .../imgui/examples/example_glfw_opengl3/main.cpp | 172 + .../examples/example_glfw_vulkan/CMakeLists.txt | 43 + .../examples/example_glfw_vulkan/build_win32.bat | 14 + .../examples/example_glfw_vulkan/build_win64.bat | 13 + .../example_glfw_vulkan.vcxproj | 181 + .../example_glfw_vulkan.vcxproj.filters | 61 + .../imgui/examples/example_glfw_vulkan/main.cpp | 558 + .../imgui/examples/example_glut_opengl2/Makefile | 75 + .../example_glut_opengl2.vcxproj | 181 + .../example_glut_opengl2.vcxproj.filters | 61 + .../imgui/examples/example_glut_opengl2/main.cpp | 155 + .../imgui/examples/example_marmalade/data/app.icf | 32 + .../imgui/examples/example_marmalade/main.cpp | 124 + .../example_marmalade/marmalade_example.mkb | 47 + .../imgui/examples/example_null/Makefile | 92 + .../imgui/examples/example_null/build_win32.bat | 3 + .../imgui/examples/example_null/main.cpp | 37 + .../examples/example_sdl_directx11/build_win32.bat | 8 + .../example_sdl_directx11.vcxproj | 182 + .../example_sdl_directx11.vcxproj.filters | 60 + .../imgui/examples/example_sdl_directx11/main.cpp | 230 + .../imgui/examples/example_sdl_metal/Makefile | 47 + .../imgui/examples/example_sdl_metal/main.mm | 181 + .../imgui/examples/example_sdl_opengl2/Makefile | 79 + .../imgui/examples/example_sdl_opengl2/README.md | 29 + .../examples/example_sdl_opengl2/build_win32.bat | 8 + .../example_sdl_opengl2.vcxproj | 181 + .../example_sdl_opengl2.vcxproj.filters | 61 + .../imgui/examples/example_sdl_opengl2/main.cpp | 157 + .../imgui/examples/example_sdl_opengl3/Makefile | 91 + .../imgui/examples/example_sdl_opengl3/README.md | 29 + .../examples/example_sdl_opengl3/build_win32.bat | 8 + .../example_sdl_opengl3.vcxproj | 182 + .../example_sdl_opengl3.vcxproj.filters | 64 + .../imgui/examples/example_sdl_opengl3/main.cpp | 178 + .../examples/example_sdl_sdlrenderer/Makefile | 79 + .../examples/example_sdl_sdlrenderer/README.md | 25 + .../example_sdl_sdlrenderer/build_win32.bat | 8 + .../example_sdl_sdlrenderer.vcxproj | 181 + .../example_sdl_sdlrenderer.vcxproj.filters | 61 + .../examples/example_sdl_sdlrenderer/main.cpp | 161 + .../examples/example_sdl_vulkan/build_win32.bat | 10 + .../example_sdl_vulkan/example_sdl_vulkan.vcxproj | 181 + .../example_sdl_vulkan.vcxproj.filters | 61 + .../imgui/examples/example_sdl_vulkan/main.cpp | 559 + .../example_win32_directx10/build_win32.bat | 8 + .../example_win32_directx10.vcxproj | 171 + .../example_win32_directx10.vcxproj.filters | 60 + .../examples/example_win32_directx10/main.cpp | 242 + .../example_win32_directx11/build_win32.bat | 9 + .../example_win32_directx11.vcxproj | 170 + .../example_win32_directx11.vcxproj.filters | 60 + .../examples/example_win32_directx11/main.cpp | 246 + .../example_win32_directx12/build_win32.bat | 9 + .../example_win32_directx12.vcxproj | 172 + .../example_win32_directx12.vcxproj.filters | 57 + .../examples/example_win32_directx12/main.cpp | 464 + .../example_win32_directx9/build_win32.bat | 8 + .../example_win32_directx9.vcxproj | 171 + .../example_win32_directx9.vcxproj.filters | 61 + .../imgui/examples/example_win32_directx9/main.cpp | 236 + .../ThirdParty/imgui/examples/imgui_examples.sln | 88 + .../imgui/examples/libs/glfw/COPYING.txt | 22 + .../imgui/examples/libs/glfw/include/GLFW/glfw3.h | 4227 +++ .../examples/libs/glfw/include/GLFW/glfw3native.h | 456 + .../examples/libs/glfw/lib-vc2010-32/glfw3.lib | Bin 0 -> 187376 bytes .../examples/libs/glfw/lib-vc2010-64/glfw3.lib | Bin 0 -> 291120 bytes .../imgui/examples/libs/usynergy/README.txt | 8 + .../imgui/examples/libs/usynergy/uSynergy.c | 636 + .../imgui/examples/libs/usynergy/uSynergy.h | 420 + Client/ThirdParty/imgui/imconfig.h | 123 + Client/ThirdParty/imgui/imgui.cpp | 12388 +++++++++ Client/ThirdParty/imgui/imgui.h | 2916 ++ Client/ThirdParty/imgui/imgui_demo.cpp | 7849 ++++++ Client/ThirdParty/imgui/imgui_draw.cpp | 4179 +++ Client/ThirdParty/imgui/imgui_internal.h | 2841 ++ Client/ThirdParty/imgui/imgui_tables.cpp | 4049 +++ Client/ThirdParty/imgui/imgui_widgets.cpp | 8247 ++++++ Client/ThirdParty/imgui/imstb_rectpack.h | 639 + Client/ThirdParty/imgui/imstb_textedit.h | 1449 + Client/ThirdParty/imgui/imstb_truetype.h | 4903 ++++ Client/ThirdParty/imgui/misc/README.txt | 23 + Client/ThirdParty/imgui/misc/cpp/README.txt | 13 + Client/ThirdParty/imgui/misc/cpp/imgui_stdlib.cpp | 76 + Client/ThirdParty/imgui/misc/cpp/imgui_stdlib.h | 22 + Client/ThirdParty/imgui/misc/debuggers/README.txt | 16 + Client/ThirdParty/imgui/misc/debuggers/imgui.gdb | 12 + .../imgui/misc/debuggers/imgui.natstepfilter | 30 + .../ThirdParty/imgui/misc/debuggers/imgui.natvis | 58 + .../imgui/misc/fonts/Cousine-Regular.ttf | Bin 0 -> 43912 bytes Client/ThirdParty/imgui/misc/fonts/DroidSans.ttf | Bin 0 -> 190044 bytes .../ThirdParty/imgui/misc/fonts/Karla-Regular.ttf | Bin 0 -> 16848 bytes Client/ThirdParty/imgui/misc/fonts/ProggyClean.ttf | Bin 0 -> 41208 bytes Client/ThirdParty/imgui/misc/fonts/ProggyTiny.ttf | Bin 0 -> 35656 bytes .../ThirdParty/imgui/misc/fonts/Roboto-Medium.ttf | Bin 0 -> 162588 bytes .../imgui/misc/fonts/binary_to_compressed_c.cpp | 385 + Client/ThirdParty/imgui/misc/freetype/README.md | 37 + .../imgui/misc/freetype/imgui_freetype.cpp | 779 + .../imgui/misc/freetype/imgui_freetype.h | 50 + .../imgui/misc/single_file/imgui_single_file.h | 18 + Client/ThirdParty/json/json.hpp | 26750 +++++++++++++++++++ .../~$\350\256\276\350\256\241.xlsx" | Bin 0 -> 165 bytes .../\350\256\276\350\256\241.xlsx" | Bin 0 -> 8446381 bytes 1018 files changed, 391445 insertions(+) create mode 100644 .gitignore create mode 100644 Client/.gitignore create mode 100644 Client/Art/Avatar/test.pdn create mode 100644 Client/Project/VisualStudio/Ragdolls/MeshBuilder/MeshBuilder.vcxproj create mode 100644 Client/Project/VisualStudio/Ragdolls/MeshBuilder/MeshBuilder.vcxproj.filters create mode 100644 Client/Project/VisualStudio/Ragdolls/MeshBuilder/MeshBuilder.vcxproj.user create mode 100644 Client/Project/VisualStudio/Ragdolls/Ragdolls.sln create mode 100644 Client/Project/VisualStudio/Ragdolls/Ragdolls/Ragdolls.vcxproj create mode 100644 Client/Project/VisualStudio/Ragdolls/Ragdolls/Ragdolls.vcxproj.filters create mode 100644 Client/Project/VisualStudio/Ragdolls/Ragdolls/Ragdolls.vcxproj.user create mode 100644 Client/Project/VisualStudio/Ragdolls/Ragdolls/imgui.ini create mode 100644 Client/Source/Common/DataBuffer.cpp create mode 100644 Client/Source/Common/DataBuffer.h create mode 100644 Client/Source/Debug/Log.cpp create mode 100644 Client/Source/Debug/Log.h create mode 100644 Client/Source/GUI/Font.cpp create mode 100644 Client/Source/GUI/Font.h create mode 100644 Client/Source/GUI/TextMeshGenerator.cpp create mode 100644 Client/Source/GUI/TextMeshGenerator.h create mode 100644 Client/Source/GUI/UI9Slicing.cpp create mode 100644 Client/Source/GUI/UI9Slicing.h create mode 100644 Client/Source/GUI/UILine.cpp create mode 100644 Client/Source/GUI/UILine.h create mode 100644 Client/Source/GUI/UIMesh.cpp create mode 100644 Client/Source/GUI/UIMesh.h create mode 100644 Client/Source/GUI/UIQuad.cpp create mode 100644 Client/Source/GUI/UIQuad.h create mode 100644 Client/Source/GUI/UISquare.cpp create mode 100644 Client/Source/GUI/UISquare.h create mode 100644 Client/Source/GUI/UITextMesh.cpp create mode 100644 Client/Source/GUI/UITextMesh.h create mode 100644 Client/Source/GUI/freetype.h create mode 100644 Client/Source/GUI/utf8.cpp create mode 100644 Client/Source/GUI/utf8.h create mode 100644 Client/Source/Graphics/Color.cpp create mode 100644 Client/Source/Graphics/Color.h create mode 100644 Client/Source/Graphics/CustomVertexLayout.cpp create mode 100644 Client/Source/Graphics/CustomVertexLayout.h create mode 100644 Client/Source/Graphics/DefaultVertexLayout.cpp create mode 100644 Client/Source/Graphics/DefaultVertexLayout.h create mode 100644 Client/Source/Graphics/DeviceDefine.h create mode 100644 Client/Source/Graphics/DynamicMesh.h create mode 100644 Client/Source/Graphics/DynamicVertexBuffer.cpp create mode 100644 Client/Source/Graphics/DynamicVertexBuffer.h create mode 100644 Client/Source/Graphics/FrameBuffer.cpp create mode 100644 Client/Source/Graphics/FrameBuffer.h create mode 100644 Client/Source/Graphics/GPUDataBuffer.cpp create mode 100644 Client/Source/Graphics/GPUDataBuffer.h create mode 100644 Client/Source/Graphics/GfxDevice.cpp create mode 100644 Client/Source/Graphics/GfxDevice.h create mode 100644 Client/Source/Graphics/GlyphAtlas.cpp create mode 100644 Client/Source/Graphics/GlyphAtlas.h create mode 100644 Client/Source/Graphics/ImageData.cpp create mode 100644 Client/Source/Graphics/ImageData.h create mode 100644 Client/Source/Graphics/OpenGL.cpp create mode 100644 Client/Source/Graphics/OpenGL.h create mode 100644 Client/Source/Graphics/Point.cpp create mode 100644 Client/Source/Graphics/Point.h create mode 100644 Client/Source/Graphics/PolyLine.cpp create mode 100644 Client/Source/Graphics/PolyLine.h create mode 100644 Client/Source/Graphics/Primitive.h create mode 100644 Client/Source/Graphics/Quad.cpp create mode 100644 Client/Source/Graphics/Quad.h create mode 100644 Client/Source/Graphics/RenderCommands.cpp create mode 100644 Client/Source/Graphics/RenderCommands.h create mode 100644 Client/Source/Graphics/RenderTexture.cpp create mode 100644 Client/Source/Graphics/RenderTexture.h create mode 100644 Client/Source/Graphics/Shader.cpp create mode 100644 Client/Source/Graphics/Shader.h create mode 100644 Client/Source/Graphics/ShaderCompiler.cpp create mode 100644 Client/Source/Graphics/ShaderCompiler.h create mode 100644 Client/Source/Graphics/Texture.cpp create mode 100644 Client/Source/Graphics/Texture.h create mode 100644 Client/Source/Graphics/VertexAttribute.cpp create mode 100644 Client/Source/Graphics/VertexAttribute.h create mode 100644 Client/Source/Graphics/VertexBuffer.cpp create mode 100644 Client/Source/Graphics/VertexBuffer.h create mode 100644 Client/Source/Math/Functions.cpp create mode 100644 Client/Source/Math/Functions.h create mode 100644 Client/Source/Math/Math.h create mode 100644 Client/Source/Math/Matrix22.h create mode 100644 Client/Source/Math/Matrix44.h create mode 100644 Client/Source/Math/Rect.h create mode 100644 Client/Source/Math/Vector2.hpp create mode 100644 Client/Source/Math/Vector3.hpp create mode 100644 Client/Source/Math/Vector4.hpp create mode 100644 Client/Source/RagdollMain.cpp create mode 100644 Client/Source/Threading/Job.cpp create mode 100644 Client/Source/Threading/Job.h create mode 100644 Client/Source/Threading/JobSystem.cpp create mode 100644 Client/Source/Threading/JobSystem.h create mode 100644 Client/Source/Threading/Mutex.cpp create mode 100644 Client/Source/Threading/Mutex.h create mode 100644 Client/Source/Threading/Semaphore.cpp create mode 100644 Client/Source/Threading/Semaphore.h create mode 100644 Client/Source/Threading/Thread.cpp create mode 100644 Client/Source/Threading/Thread.h create mode 100644 Client/Source/Threading/WorkThread.cpp create mode 100644 Client/Source/Utilities/Assert.h create mode 100644 Client/Source/Utilities/AutoInvoke.h create mode 100644 Client/Source/Utilities/Exception.h create mode 100644 Client/Source/Utilities/Singleton.h create mode 100644 Client/Source/Utilities/StaticInitiator.h create mode 100644 Client/Source/Utilities/Type.h create mode 100644 Client/Source/Utilities/UIDGenerator.h create mode 100644 Client/Source/Utilities/UtilMacros.h create mode 100644 Client/ThirdParty/Box2D/.gitignore create mode 100644 Client/ThirdParty/Box2D/.travis.yml create mode 100644 Client/ThirdParty/Box2D/CHANGELOG.md create mode 100644 Client/ThirdParty/Box2D/CMakeLists.txt create mode 100644 Client/ThirdParty/Box2D/LICENSE create mode 100644 Client/ThirdParty/Box2D/README.md create mode 100644 Client/ThirdParty/Box2D/build.bat create mode 100644 Client/ThirdParty/Box2D/build.sh create mode 100644 Client/ThirdParty/Box2D/build_docs.sh create mode 100644 Client/ThirdParty/Box2D/deploy_docs.sh create mode 100644 Client/ThirdParty/Box2D/docs/CMakeLists.txt create mode 100644 Client/ThirdParty/Box2D/docs/Doxyfile.in create mode 100644 Client/ThirdParty/Box2D/docs/FAQ.md create mode 100644 Client/ThirdParty/Box2D/docs/collision.md create mode 100644 Client/ThirdParty/Box2D/docs/common.md create mode 100644 Client/ThirdParty/Box2D/docs/copycss.sh create mode 100644 Client/ThirdParty/Box2D/docs/dynamics.md create mode 100644 Client/ThirdParty/Box2D/docs/extra.css create mode 100644 Client/ThirdParty/Box2D/docs/hello.md create mode 100644 Client/ThirdParty/Box2D/docs/images/body_origin.gif create mode 100644 Client/ThirdParty/Box2D/docs/images/captured_toi.svg create mode 100644 Client/ThirdParty/Box2D/docs/images/chain_loop_inwards.svg create mode 100644 Client/ThirdParty/Box2D/docs/images/chain_loop_outwards.svg create mode 100644 Client/ThirdParty/Box2D/docs/images/chain_shape.svg create mode 100644 Client/ThirdParty/Box2D/docs/images/convex_concave.gif create mode 100644 Client/ThirdParty/Box2D/docs/images/debug_draw.png create mode 100644 Client/ThirdParty/Box2D/docs/images/distance.svg create mode 100644 Client/ThirdParty/Box2D/docs/images/distance_joint.gif create mode 100644 Client/ThirdParty/Box2D/docs/images/gear_joint.gif create mode 100644 Client/ThirdParty/Box2D/docs/images/ghost_collision.svg create mode 100644 Client/ThirdParty/Box2D/docs/images/ghost_vertices.svg create mode 100644 Client/ThirdParty/Box2D/docs/images/logo.svg create mode 100644 Client/ThirdParty/Box2D/docs/images/manifolds.svg create mode 100644 Client/ThirdParty/Box2D/docs/images/missed_toi.svg create mode 100644 Client/ThirdParty/Box2D/docs/images/modules.svg create mode 100644 Client/ThirdParty/Box2D/docs/images/overlap_test.svg create mode 100644 Client/ThirdParty/Box2D/docs/images/prismatic_joint.gif create mode 100644 Client/ThirdParty/Box2D/docs/images/pulley_joint.gif create mode 100644 Client/ThirdParty/Box2D/docs/images/raycast.svg create mode 100644 Client/ThirdParty/Box2D/docs/images/revolute_joint.gif create mode 100644 Client/ThirdParty/Box2D/docs/images/self_intersect.svg create mode 100644 Client/ThirdParty/Box2D/docs/images/skin_collision.svg create mode 100644 Client/ThirdParty/Box2D/docs/images/skinned_polygon.svg create mode 100644 Client/ThirdParty/Box2D/docs/images/testbed.png create mode 100644 Client/ThirdParty/Box2D/docs/images/tunneling1.svg create mode 100644 Client/ThirdParty/Box2D/docs/images/tunneling2.svg create mode 100644 Client/ThirdParty/Box2D/docs/images/wheel_joint.svg create mode 100644 Client/ThirdParty/Box2D/docs/images/winding.svg create mode 100644 Client/ThirdParty/Box2D/docs/loose_ends.md create mode 100644 Client/ThirdParty/Box2D/docs/overview.md create mode 100644 Client/ThirdParty/Box2D/docs/references.md create mode 100644 Client/ThirdParty/Box2D/docs/testbed.md create mode 100644 Client/ThirdParty/Box2D/extern/glad/CMakeLists.txt create mode 100644 Client/ThirdParty/Box2D/extern/glad/include/KHR/khrplatform.h create mode 100644 Client/ThirdParty/Box2D/extern/glad/include/glad/gl.h create mode 100644 Client/ThirdParty/Box2D/extern/glad/src/gl.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/CMakeLists.txt create mode 100644 Client/ThirdParty/Box2D/extern/glfw/include/GLFW/glfw3.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/include/GLFW/glfw3native.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/cocoa_init.m create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/cocoa_joystick.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/cocoa_joystick.m create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/cocoa_monitor.m create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/cocoa_platform.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/cocoa_time.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/cocoa_window.m create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/context.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/egl_context.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/egl_context.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/glfw_config.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/glx_context.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/glx_context.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/init.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/input.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/internal.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/linux_joystick.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/linux_joystick.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/mappings.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/mappings.h.in create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/monitor.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/nsgl_context.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/nsgl_context.m create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/null_init.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/null_joystick.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/null_joystick.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/null_monitor.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/null_platform.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/null_window.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/osmesa_context.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/osmesa_context.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/posix_thread.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/posix_thread.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/posix_time.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/posix_time.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/vulkan.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/wgl_context.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/wgl_context.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/win32_init.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/win32_joystick.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/win32_joystick.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/win32_monitor.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/win32_platform.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/win32_thread.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/win32_time.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/win32_window.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/window.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/wl_init.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/wl_monitor.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/wl_platform.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/wl_window.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/x11_init.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/x11_monitor.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/x11_platform.h create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/x11_window.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/xkb_unicode.c create mode 100644 Client/ThirdParty/Box2D/extern/glfw/src/xkb_unicode.h create mode 100644 Client/ThirdParty/Box2D/extern/imgui/CMakeLists.txt create mode 100644 Client/ThirdParty/Box2D/extern/imgui/imconfig.h create mode 100644 Client/ThirdParty/Box2D/extern/imgui/imgui.cpp create mode 100644 Client/ThirdParty/Box2D/extern/imgui/imgui.h create mode 100644 Client/ThirdParty/Box2D/extern/imgui/imgui_demo.cpp create mode 100644 Client/ThirdParty/Box2D/extern/imgui/imgui_draw.cpp create mode 100644 Client/ThirdParty/Box2D/extern/imgui/imgui_internal.h create mode 100644 Client/ThirdParty/Box2D/extern/imgui/imgui_widgets.cpp create mode 100644 Client/ThirdParty/Box2D/extern/imgui/imstb_rectpack.h create mode 100644 Client/ThirdParty/Box2D/extern/imgui/imstb_textedit.h create mode 100644 Client/ThirdParty/Box2D/extern/imgui/imstb_truetype.h create mode 100644 Client/ThirdParty/Box2D/extern/sajson/CMakeLists.txt create mode 100644 Client/ThirdParty/Box2D/extern/sajson/sajson.cpp create mode 100644 Client/ThirdParty/Box2D/extern/sajson/sajson.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_api.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_block_allocator.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_body.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_broad_phase.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_chain_shape.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_circle_shape.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_collision.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_common.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_contact.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_contact_manager.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_distance.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_distance_joint.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_draw.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_dynamic_tree.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_edge_shape.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_fixture.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_friction_joint.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_gear_joint.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_growable_stack.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_joint.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_math.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_motor_joint.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_mouse_joint.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_polygon_shape.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_prismatic_joint.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_pulley_joint.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_revolute_joint.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_rope.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_settings.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_shape.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_stack_allocator.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_time_of_impact.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_time_step.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_timer.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_types.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_weld_joint.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_wheel_joint.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_world.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/b2_world_callbacks.h create mode 100644 Client/ThirdParty/Box2D/include/box2d/box2d.h create mode 100644 Client/ThirdParty/Box2D/proj/ALL_BUILD.vcxproj create mode 100644 Client/ThirdParty/Box2D/proj/ALL_BUILD.vcxproj.filters create mode 100644 Client/ThirdParty/Box2D/proj/CMakeCache.txt create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/049e1eb7380682ec4cf9a2c62dad57db/INSTALL_force.rule create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/14f8a92cc8883d19b638672092016c39/INSTALL_force.rule create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CMakeCCompiler.cmake create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CMakeCXXCompiler.cmake create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CMakeDetermineCompilerABI_C.bin create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CMakeDetermineCompilerABI_CXX.bin create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CMakeRCCompiler.cmake create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CMakeSystem.cmake create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdC/CMakeCCompilerId.c create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdC/CompilerIdC.exe create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdC/CompilerIdC.vcxproj create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdC/Debug/CMakeCCompilerId.obj create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdC/Debug/CompilerIdC.tlog/CL.command.1.tlog create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdC/Debug/CompilerIdC.tlog/CL.read.1.tlog create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdC/Debug/CompilerIdC.tlog/CL.write.1.tlog create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdC/Debug/CompilerIdC.tlog/CompilerIdC.lastbuildstate create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdC/Debug/CompilerIdC.tlog/link.command.1.tlog create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdC/Debug/CompilerIdC.tlog/link.read.1.tlog create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdC/Debug/CompilerIdC.tlog/link.write.1.tlog create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdCXX/CMakeCXXCompilerId.cpp create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdCXX/CompilerIdCXX.exe create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdCXX/CompilerIdCXX.vcxproj create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdCXX/Debug/CMakeCXXCompilerId.obj create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CL.command.1.tlog create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CL.read.1.tlog create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CL.write.1.tlog create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdCXX/Debug/CompilerIdCXX.tlog/CompilerIdCXX.lastbuildstate create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.command.1.tlog create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.read.1.tlog create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/CompilerIdCXX/Debug/CompilerIdCXX.tlog/link.write.1.tlog create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/Debug/VCTargetsPath.tlog/VCTargetsPath.lastbuildstate create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/VCTargetsPath.txt create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3.22.0-rc2/VCTargetsPath.vcxproj create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3f042071a51acdc6d8fcb5e7be7244c8/INSTALL_force.rule create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/3f042071a51acdc6d8fcb5e7be7244c8/generate.stamp.rule create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/455517aeb2285a20077dbce51065d1ef/INSTALL_force.rule create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/5db6461968e3a28c7176c305697cc35c/INSTALL_force.rule create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/6ddefecedef78174b7ed9b2bc8a1e035/INSTALL_force.rule create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/9ab13db7d2176474a16e440b6b1b97a8/INSTALL_force.rule create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/CMakeError.log create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/CMakeOutput.log create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/TargetDirectories.txt create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/bfe9de955132cd9d067c24acf7d98bef/INSTALL_force.rule create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/cmake.check_cache create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/generate.stamp create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/generate.stamp.depend create mode 100644 Client/ThirdParty/Box2D/proj/CMakeFiles/generate.stamp.list create mode 100644 Client/ThirdParty/Box2D/proj/INSTALL.vcxproj create mode 100644 Client/ThirdParty/Box2D/proj/INSTALL.vcxproj.filters create mode 100644 Client/ThirdParty/Box2D/proj/ZERO_CHECK.vcxproj create mode 100644 Client/ThirdParty/Box2D/proj/ZERO_CHECK.vcxproj.filters create mode 100644 Client/ThirdParty/Box2D/proj/box2d.sln create mode 100644 Client/ThirdParty/Box2D/proj/cmake_install.cmake create mode 100644 Client/ThirdParty/Box2D/proj/extern/glad/CMakeFiles/generate.stamp create mode 100644 Client/ThirdParty/Box2D/proj/extern/glad/CMakeFiles/generate.stamp.depend create mode 100644 Client/ThirdParty/Box2D/proj/extern/glad/INSTALL.vcxproj create mode 100644 Client/ThirdParty/Box2D/proj/extern/glad/INSTALL.vcxproj.filters create mode 100644 Client/ThirdParty/Box2D/proj/extern/glad/cmake_install.cmake create mode 100644 Client/ThirdParty/Box2D/proj/extern/glad/glad.vcxproj create mode 100644 Client/ThirdParty/Box2D/proj/extern/glad/glad.vcxproj.filters create mode 100644 Client/ThirdParty/Box2D/proj/extern/glfw/CMakeFiles/generate.stamp create mode 100644 Client/ThirdParty/Box2D/proj/extern/glfw/CMakeFiles/generate.stamp.depend create mode 100644 Client/ThirdParty/Box2D/proj/extern/glfw/INSTALL.vcxproj create mode 100644 Client/ThirdParty/Box2D/proj/extern/glfw/INSTALL.vcxproj.filters create mode 100644 Client/ThirdParty/Box2D/proj/extern/glfw/cmake_install.cmake create mode 100644 Client/ThirdParty/Box2D/proj/extern/glfw/glfw.vcxproj create mode 100644 Client/ThirdParty/Box2D/proj/extern/glfw/glfw.vcxproj.filters create mode 100644 Client/ThirdParty/Box2D/proj/extern/imgui/CMakeFiles/generate.stamp create mode 100644 Client/ThirdParty/Box2D/proj/extern/imgui/CMakeFiles/generate.stamp.depend create mode 100644 Client/ThirdParty/Box2D/proj/extern/imgui/INSTALL.vcxproj create mode 100644 Client/ThirdParty/Box2D/proj/extern/imgui/INSTALL.vcxproj.filters create mode 100644 Client/ThirdParty/Box2D/proj/extern/imgui/cmake_install.cmake create mode 100644 Client/ThirdParty/Box2D/proj/extern/imgui/imgui.vcxproj create mode 100644 Client/ThirdParty/Box2D/proj/extern/imgui/imgui.vcxproj.filters create mode 100644 Client/ThirdParty/Box2D/proj/extern/sajson/CMakeFiles/generate.stamp create mode 100644 Client/ThirdParty/Box2D/proj/extern/sajson/CMakeFiles/generate.stamp.depend create mode 100644 Client/ThirdParty/Box2D/proj/extern/sajson/INSTALL.vcxproj create mode 100644 Client/ThirdParty/Box2D/proj/extern/sajson/INSTALL.vcxproj.filters create mode 100644 Client/ThirdParty/Box2D/proj/extern/sajson/cmake_install.cmake create mode 100644 Client/ThirdParty/Box2D/proj/extern/sajson/sajson.vcxproj create mode 100644 Client/ThirdParty/Box2D/proj/extern/sajson/sajson.vcxproj.filters create mode 100644 Client/ThirdParty/Box2D/proj/src/CMakeFiles/Export/lib/cmake/box2d/box2dConfig-debug.cmake create mode 100644 Client/ThirdParty/Box2D/proj/src/CMakeFiles/Export/lib/cmake/box2d/box2dConfig-minsizerel.cmake create mode 100644 Client/ThirdParty/Box2D/proj/src/CMakeFiles/Export/lib/cmake/box2d/box2dConfig-release.cmake create mode 100644 Client/ThirdParty/Box2D/proj/src/CMakeFiles/Export/lib/cmake/box2d/box2dConfig-relwithdebinfo.cmake create mode 100644 Client/ThirdParty/Box2D/proj/src/CMakeFiles/Export/lib/cmake/box2d/box2dConfig.cmake create mode 100644 Client/ThirdParty/Box2D/proj/src/CMakeFiles/generate.stamp create mode 100644 Client/ThirdParty/Box2D/proj/src/CMakeFiles/generate.stamp.depend create mode 100644 Client/ThirdParty/Box2D/proj/src/INSTALL.vcxproj create mode 100644 Client/ThirdParty/Box2D/proj/src/INSTALL.vcxproj.filters create mode 100644 Client/ThirdParty/Box2D/proj/src/box2d.vcxproj create mode 100644 Client/ThirdParty/Box2D/proj/src/box2d.vcxproj.filters create mode 100644 Client/ThirdParty/Box2D/proj/src/box2dConfigVersion.cmake create mode 100644 Client/ThirdParty/Box2D/proj/src/cmake_install.cmake create mode 100644 Client/ThirdParty/Box2D/proj/testbed/CMakeFiles/generate.stamp create mode 100644 Client/ThirdParty/Box2D/proj/testbed/CMakeFiles/generate.stamp.depend create mode 100644 Client/ThirdParty/Box2D/proj/testbed/INSTALL.vcxproj create mode 100644 Client/ThirdParty/Box2D/proj/testbed/INSTALL.vcxproj.filters create mode 100644 Client/ThirdParty/Box2D/proj/testbed/cmake_install.cmake create mode 100644 Client/ThirdParty/Box2D/proj/testbed/testbed.vcxproj create mode 100644 Client/ThirdParty/Box2D/proj/testbed/testbed.vcxproj.filters create mode 100644 Client/ThirdParty/Box2D/proj/unit-test/CMakeFiles/generate.stamp create mode 100644 Client/ThirdParty/Box2D/proj/unit-test/CMakeFiles/generate.stamp.depend create mode 100644 Client/ThirdParty/Box2D/proj/unit-test/INSTALL.vcxproj create mode 100644 Client/ThirdParty/Box2D/proj/unit-test/INSTALL.vcxproj.filters create mode 100644 Client/ThirdParty/Box2D/proj/unit-test/cmake_install.cmake create mode 100644 Client/ThirdParty/Box2D/proj/unit-test/unit_test.vcxproj create mode 100644 Client/ThirdParty/Box2D/proj/unit-test/unit_test.vcxproj.filters create mode 100644 Client/ThirdParty/Box2D/src/CMakeLists.txt create mode 100644 Client/ThirdParty/Box2D/src/collision/b2_broad_phase.cpp create mode 100644 Client/ThirdParty/Box2D/src/collision/b2_chain_shape.cpp create mode 100644 Client/ThirdParty/Box2D/src/collision/b2_circle_shape.cpp create mode 100644 Client/ThirdParty/Box2D/src/collision/b2_collide_circle.cpp create mode 100644 Client/ThirdParty/Box2D/src/collision/b2_collide_edge.cpp create mode 100644 Client/ThirdParty/Box2D/src/collision/b2_collide_polygon.cpp create mode 100644 Client/ThirdParty/Box2D/src/collision/b2_collision.cpp create mode 100644 Client/ThirdParty/Box2D/src/collision/b2_distance.cpp create mode 100644 Client/ThirdParty/Box2D/src/collision/b2_dynamic_tree.cpp create mode 100644 Client/ThirdParty/Box2D/src/collision/b2_edge_shape.cpp create mode 100644 Client/ThirdParty/Box2D/src/collision/b2_polygon_shape.cpp create mode 100644 Client/ThirdParty/Box2D/src/collision/b2_time_of_impact.cpp create mode 100644 Client/ThirdParty/Box2D/src/common/b2_block_allocator.cpp create mode 100644 Client/ThirdParty/Box2D/src/common/b2_draw.cpp create mode 100644 Client/ThirdParty/Box2D/src/common/b2_math.cpp create mode 100644 Client/ThirdParty/Box2D/src/common/b2_settings.cpp create mode 100644 Client/ThirdParty/Box2D/src/common/b2_stack_allocator.cpp create mode 100644 Client/ThirdParty/Box2D/src/common/b2_timer.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_body.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_chain_circle_contact.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_chain_circle_contact.h create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_chain_polygon_contact.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_chain_polygon_contact.h create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_circle_contact.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_circle_contact.h create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_contact.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_contact_manager.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_contact_solver.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_contact_solver.h create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_distance_joint.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_edge_circle_contact.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_edge_circle_contact.h create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_edge_polygon_contact.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_edge_polygon_contact.h create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_fixture.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_friction_joint.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_gear_joint.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_island.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_island.h create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_joint.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_motor_joint.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_mouse_joint.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_polygon_circle_contact.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_polygon_circle_contact.h create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_polygon_contact.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_polygon_contact.h create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_prismatic_joint.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_pulley_joint.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_revolute_joint.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_weld_joint.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_wheel_joint.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_world.cpp create mode 100644 Client/ThirdParty/Box2D/src/dynamics/b2_world_callbacks.cpp create mode 100644 Client/ThirdParty/Box2D/src/rope/b2_rope.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/CMakeLists.txt create mode 100644 Client/ThirdParty/Box2D/testbed/MacOSXBundleInfo.plist.in create mode 100644 Client/ThirdParty/Box2D/testbed/data/droid_sans.ttf create mode 100644 Client/ThirdParty/Box2D/testbed/draw.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/draw.h create mode 100644 Client/ThirdParty/Box2D/testbed/imgui_impl_glfw.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/imgui_impl_glfw.h create mode 100644 Client/ThirdParty/Box2D/testbed/imgui_impl_opengl3.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/imgui_impl_opengl3.h create mode 100644 Client/ThirdParty/Box2D/testbed/main.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/settings.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/settings.h create mode 100644 Client/ThirdParty/Box2D/testbed/test.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/test.h create mode 100644 Client/ThirdParty/Box2D/testbed/tests/add_pair.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/apply_force.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/body_types.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/box_stack.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/breakable.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/bridge.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/bullet_test.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/cantilever.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/car.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/chain.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/chain_problem.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/character_collision.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/circle_stack.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/collision_filtering.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/collision_processing.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/compound_shapes.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/confined.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/continuous_test.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/convex_hull.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/conveyor_belt.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/distance_joint.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/distance_test.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/dominos.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/dump_loader.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/dynamic_tree.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/edge_shapes.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/edge_test.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/friction.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/gear_joint.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/heavy1.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/heavy2.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/mobile_balanced.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/mobile_unbalanced.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/motor_joint.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/pinball.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/platformer.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/polygon_collision.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/polygon_shapes.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/prismatic_joint.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/pulley_joint.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/pyramid.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/ray_cast.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/restitution.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/revolute_joint.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/rope.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/sensor.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/shape_cast.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/shape_editing.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/skier.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/slider_crank_1.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/slider_crank_2.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/theo_jansen.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/tiles.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/time_of_impact.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/tumbler.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/web.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/wheel_joint.cpp create mode 100644 Client/ThirdParty/Box2D/testbed/tests/wrecking_ball.cpp create mode 100644 Client/ThirdParty/Box2D/unit-test/CMakeLists.txt create mode 100644 Client/ThirdParty/Box2D/unit-test/collision_test.cpp create mode 100644 Client/ThirdParty/Box2D/unit-test/doctest.h create mode 100644 Client/ThirdParty/Box2D/unit-test/hello_world.cpp create mode 100644 Client/ThirdParty/Box2D/unit-test/joint_test.cpp create mode 100644 Client/ThirdParty/Box2D/unit-test/math_test.cpp create mode 100644 Client/ThirdParty/Box2D/unit-test/world_test.cpp create mode 100644 Client/ThirdParty/SDL2/BUGS.txt create mode 100644 Client/ThirdParty/SDL2/COPYING.txt create mode 100644 Client/ThirdParty/SDL2/README-SDL.txt create mode 100644 Client/ThirdParty/SDL2/README.txt create mode 100644 Client/ThirdParty/SDL2/SDL.h create mode 100644 Client/ThirdParty/SDL2/SDL_assert.h create mode 100644 Client/ThirdParty/SDL2/SDL_atomic.h create mode 100644 Client/ThirdParty/SDL2/SDL_audio.h create mode 100644 Client/ThirdParty/SDL2/SDL_bits.h create mode 100644 Client/ThirdParty/SDL2/SDL_blendmode.h create mode 100644 Client/ThirdParty/SDL2/SDL_clipboard.h create mode 100644 Client/ThirdParty/SDL2/SDL_config.h create mode 100644 Client/ThirdParty/SDL2/SDL_config.h.cmake create mode 100644 Client/ThirdParty/SDL2/SDL_config.h.in create mode 100644 Client/ThirdParty/SDL2/SDL_config_android.h create mode 100644 Client/ThirdParty/SDL2/SDL_config_iphoneos.h create mode 100644 Client/ThirdParty/SDL2/SDL_config_macosx.h create mode 100644 Client/ThirdParty/SDL2/SDL_config_macosx.h.orig create mode 100644 Client/ThirdParty/SDL2/SDL_config_minimal.h create mode 100644 Client/ThirdParty/SDL2/SDL_config_pandora.h create mode 100644 Client/ThirdParty/SDL2/SDL_config_psp.h create mode 100644 Client/ThirdParty/SDL2/SDL_config_windows.h create mode 100644 Client/ThirdParty/SDL2/SDL_config_winrt.h create mode 100644 Client/ThirdParty/SDL2/SDL_config_wiz.h create mode 100644 Client/ThirdParty/SDL2/SDL_copying.h create mode 100644 Client/ThirdParty/SDL2/SDL_cpuinfo.h create mode 100644 Client/ThirdParty/SDL2/SDL_egl.h create mode 100644 Client/ThirdParty/SDL2/SDL_endian.h create mode 100644 Client/ThirdParty/SDL2/SDL_error.h create mode 100644 Client/ThirdParty/SDL2/SDL_events.h create mode 100644 Client/ThirdParty/SDL2/SDL_filesystem.h create mode 100644 Client/ThirdParty/SDL2/SDL_gamecontroller.h create mode 100644 Client/ThirdParty/SDL2/SDL_gesture.h create mode 100644 Client/ThirdParty/SDL2/SDL_haptic.h create mode 100644 Client/ThirdParty/SDL2/SDL_hints.h create mode 100644 Client/ThirdParty/SDL2/SDL_joystick.h create mode 100644 Client/ThirdParty/SDL2/SDL_keyboard.h create mode 100644 Client/ThirdParty/SDL2/SDL_keycode.h create mode 100644 Client/ThirdParty/SDL2/SDL_loadso.h create mode 100644 Client/ThirdParty/SDL2/SDL_locale.h create mode 100644 Client/ThirdParty/SDL2/SDL_log.h create mode 100644 Client/ThirdParty/SDL2/SDL_main.h create mode 100644 Client/ThirdParty/SDL2/SDL_messagebox.h create mode 100644 Client/ThirdParty/SDL2/SDL_metal.h create mode 100644 Client/ThirdParty/SDL2/SDL_misc.h create mode 100644 Client/ThirdParty/SDL2/SDL_mouse.h create mode 100644 Client/ThirdParty/SDL2/SDL_mutex.h create mode 100644 Client/ThirdParty/SDL2/SDL_name.h create mode 100644 Client/ThirdParty/SDL2/SDL_opengl.h create mode 100644 Client/ThirdParty/SDL2/SDL_opengl_glext.h create mode 100644 Client/ThirdParty/SDL2/SDL_opengles.h create mode 100644 Client/ThirdParty/SDL2/SDL_opengles2.h create mode 100644 Client/ThirdParty/SDL2/SDL_opengles2_gl2.h create mode 100644 Client/ThirdParty/SDL2/SDL_opengles2_gl2ext.h create mode 100644 Client/ThirdParty/SDL2/SDL_opengles2_gl2platform.h create mode 100644 Client/ThirdParty/SDL2/SDL_opengles2_khrplatform.h create mode 100644 Client/ThirdParty/SDL2/SDL_pixels.h create mode 100644 Client/ThirdParty/SDL2/SDL_platform.h create mode 100644 Client/ThirdParty/SDL2/SDL_power.h create mode 100644 Client/ThirdParty/SDL2/SDL_quit.h create mode 100644 Client/ThirdParty/SDL2/SDL_rect.h create mode 100644 Client/ThirdParty/SDL2/SDL_render.h create mode 100644 Client/ThirdParty/SDL2/SDL_revision.h create mode 100644 Client/ThirdParty/SDL2/SDL_rwops.h create mode 100644 Client/ThirdParty/SDL2/SDL_scancode.h create mode 100644 Client/ThirdParty/SDL2/SDL_sensor.h create mode 100644 Client/ThirdParty/SDL2/SDL_shape.h create mode 100644 Client/ThirdParty/SDL2/SDL_stdinc.h create mode 100644 Client/ThirdParty/SDL2/SDL_surface.h create mode 100644 Client/ThirdParty/SDL2/SDL_system.h create mode 100644 Client/ThirdParty/SDL2/SDL_syswm.h create mode 100644 Client/ThirdParty/SDL2/SDL_test.h create mode 100644 Client/ThirdParty/SDL2/SDL_test_assert.h create mode 100644 Client/ThirdParty/SDL2/SDL_test_common.h create mode 100644 Client/ThirdParty/SDL2/SDL_test_compare.h create mode 100644 Client/ThirdParty/SDL2/SDL_test_crc32.h create mode 100644 Client/ThirdParty/SDL2/SDL_test_font.h create mode 100644 Client/ThirdParty/SDL2/SDL_test_fuzzer.h create mode 100644 Client/ThirdParty/SDL2/SDL_test_harness.h create mode 100644 Client/ThirdParty/SDL2/SDL_test_images.h create mode 100644 Client/ThirdParty/SDL2/SDL_test_log.h create mode 100644 Client/ThirdParty/SDL2/SDL_test_md5.h create mode 100644 Client/ThirdParty/SDL2/SDL_test_memory.h create mode 100644 Client/ThirdParty/SDL2/SDL_test_random.h create mode 100644 Client/ThirdParty/SDL2/SDL_thread.h create mode 100644 Client/ThirdParty/SDL2/SDL_timer.h create mode 100644 Client/ThirdParty/SDL2/SDL_touch.h create mode 100644 Client/ThirdParty/SDL2/SDL_types.h create mode 100644 Client/ThirdParty/SDL2/SDL_version.h create mode 100644 Client/ThirdParty/SDL2/SDL_video.h create mode 100644 Client/ThirdParty/SDL2/SDL_vulkan.h create mode 100644 Client/ThirdParty/SDL2/WhatsNew.txt create mode 100644 Client/ThirdParty/SDL2/begin_code.h create mode 100644 Client/ThirdParty/SDL2/close_code.h create mode 100644 Client/ThirdParty/SDL2/docs/README-android.md create mode 100644 Client/ThirdParty/SDL2/docs/README-cmake.md create mode 100644 Client/ThirdParty/SDL2/docs/README-directfb.md create mode 100644 Client/ThirdParty/SDL2/docs/README-dynapi.md create mode 100644 Client/ThirdParty/SDL2/docs/README-emscripten.md create mode 100644 Client/ThirdParty/SDL2/docs/README-gesture.md create mode 100644 Client/ThirdParty/SDL2/docs/README-git.md create mode 100644 Client/ThirdParty/SDL2/docs/README-hg.md create mode 100644 Client/ThirdParty/SDL2/docs/README-ios.md create mode 100644 Client/ThirdParty/SDL2/docs/README-kmsbsd.md create mode 100644 Client/ThirdParty/SDL2/docs/README-linux.md create mode 100644 Client/ThirdParty/SDL2/docs/README-macosx.md create mode 100644 Client/ThirdParty/SDL2/docs/README-nacl.md create mode 100644 Client/ThirdParty/SDL2/docs/README-os2.md create mode 100644 Client/ThirdParty/SDL2/docs/README-pandora.md create mode 100644 Client/ThirdParty/SDL2/docs/README-platforms.md create mode 100644 Client/ThirdParty/SDL2/docs/README-porting.md create mode 100644 Client/ThirdParty/SDL2/docs/README-psp.md create mode 100644 Client/ThirdParty/SDL2/docs/README-raspberrypi.md create mode 100644 Client/ThirdParty/SDL2/docs/README-touch.md create mode 100644 Client/ThirdParty/SDL2/docs/README-visualc.md create mode 100644 Client/ThirdParty/SDL2/docs/README-vita.md create mode 100644 Client/ThirdParty/SDL2/docs/README-wince.md create mode 100644 Client/ThirdParty/SDL2/docs/README-windows.md create mode 100644 Client/ThirdParty/SDL2/docs/README-winrt.md create mode 100644 Client/ThirdParty/SDL2/docs/README.md create mode 100644 Client/ThirdParty/SDL2/docs/doxyfile create mode 100644 Client/ThirdParty/SDL2/include/SDL.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_assert.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_atomic.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_audio.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_bits.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_blendmode.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_clipboard.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_config.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_config.h.cmake create mode 100644 Client/ThirdParty/SDL2/include/SDL_config.h.in create mode 100644 Client/ThirdParty/SDL2/include/SDL_config_android.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_config_iphoneos.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_config_macosx.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_config_macosx.h.orig create mode 100644 Client/ThirdParty/SDL2/include/SDL_config_minimal.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_config_pandora.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_config_psp.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_config_windows.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_config_winrt.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_config_wiz.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_copying.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_cpuinfo.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_egl.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_endian.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_error.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_events.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_filesystem.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_gamecontroller.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_gesture.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_haptic.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_hints.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_joystick.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_keyboard.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_keycode.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_loadso.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_locale.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_log.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_main.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_messagebox.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_metal.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_misc.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_mouse.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_mutex.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_name.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_opengl.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_opengl_glext.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_opengles.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_opengles2.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_opengles2_gl2.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_opengles2_gl2ext.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_opengles2_gl2platform.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_opengles2_khrplatform.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_pixels.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_platform.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_power.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_quit.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_rect.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_render.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_revision.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_rwops.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_scancode.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_sensor.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_shape.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_stdinc.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_surface.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_system.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_syswm.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_test.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_test_assert.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_test_common.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_test_compare.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_test_crc32.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_test_font.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_test_fuzzer.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_test_harness.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_test_images.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_test_log.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_test_md5.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_test_memory.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_test_random.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_thread.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_timer.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_touch.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_types.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_version.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_video.h create mode 100644 Client/ThirdParty/SDL2/include/SDL_vulkan.h create mode 100644 Client/ThirdParty/SDL2/include/begin_code.h create mode 100644 Client/ThirdParty/SDL2/include/close_code.h create mode 100644 Client/ThirdParty/SDL2/lib/x64/SDL2.dll create mode 100644 Client/ThirdParty/SDL2/lib/x64/SDL2.lib create mode 100644 Client/ThirdParty/SDL2/lib/x64/SDL2main.lib create mode 100644 Client/ThirdParty/SDL2/lib/x64/SDL2test.lib create mode 100644 Client/ThirdParty/SDL2/lib/x86/SDL2.dll create mode 100644 Client/ThirdParty/SDL2/lib/x86/SDL2.lib create mode 100644 Client/ThirdParty/SDL2/lib/x86/SDL2main.lib create mode 100644 Client/ThirdParty/SDL2/lib/x86/SDL2test.lib create mode 100644 Client/ThirdParty/StaticConstructor/StaticConstructorSample/MyClass.cpp create mode 100644 Client/ThirdParty/StaticConstructor/StaticConstructorSample/MyClass.h create mode 100644 Client/ThirdParty/StaticConstructor/StaticConstructorSample/MyTemplate.h create mode 100644 Client/ThirdParty/StaticConstructor/StaticConstructorSample/StaticConstructorSample.cpp create mode 100644 Client/ThirdParty/StaticConstructor/StaticConstructorSample/StaticConstructorSample.sln create mode 100644 Client/ThirdParty/StaticConstructor/StaticConstructorSample/StaticConstructorSample.vcproj create mode 100644 Client/ThirdParty/StaticConstructor/StaticConstructorSample/stdafx.cpp create mode 100644 Client/ThirdParty/StaticConstructor/StaticConstructorSample/stdafx.h create mode 100644 Client/ThirdParty/StaticConstructor/include/StaticConstructor.h create mode 100644 Client/ThirdParty/freetype/ChangeLog create mode 100644 Client/ThirdParty/freetype/FTL.TXT create mode 100644 Client/ThirdParty/freetype/GPLv2.TXT create mode 100644 Client/ThirdParty/freetype/LICENSE.TXT create mode 100644 Client/ThirdParty/freetype/README.md create mode 100644 Client/ThirdParty/freetype/include/freetype/config/ftconfig.h create mode 100644 Client/ThirdParty/freetype/include/freetype/config/ftheader.h create mode 100644 Client/ThirdParty/freetype/include/freetype/config/ftmodule.h create mode 100644 Client/ThirdParty/freetype/include/freetype/config/ftoption.h create mode 100644 Client/ThirdParty/freetype/include/freetype/config/ftstdlib.h create mode 100644 Client/ThirdParty/freetype/include/freetype/config/integer-types.h create mode 100644 Client/ThirdParty/freetype/include/freetype/config/mac-support.h create mode 100644 Client/ThirdParty/freetype/include/freetype/config/public-macros.h create mode 100644 Client/ThirdParty/freetype/include/freetype/freetype.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftadvanc.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftbbox.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftbdf.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftbitmap.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftbzip2.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftcache.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftchapters.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftcid.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftcolor.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftdriver.h create mode 100644 Client/ThirdParty/freetype/include/freetype/fterrdef.h create mode 100644 Client/ThirdParty/freetype/include/freetype/fterrors.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftfntfmt.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftgasp.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftglyph.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftgxval.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftgzip.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftimage.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftincrem.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftlcdfil.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftlist.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftlogging.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftlzw.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftmac.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftmm.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftmodapi.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftmoderr.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftotval.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftoutln.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftparams.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftpfr.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftrender.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftsizes.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftsnames.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftstroke.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftsynth.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftsystem.h create mode 100644 Client/ThirdParty/freetype/include/freetype/fttrigon.h create mode 100644 Client/ThirdParty/freetype/include/freetype/fttypes.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ftwinfnt.h create mode 100644 Client/ThirdParty/freetype/include/freetype/t1tables.h create mode 100644 Client/ThirdParty/freetype/include/freetype/ttnameid.h create mode 100644 Client/ThirdParty/freetype/include/freetype/tttables.h create mode 100644 Client/ThirdParty/freetype/include/freetype/tttags.h create mode 100644 Client/ThirdParty/freetype/include/ft2build.h create mode 100644 Client/ThirdParty/freetype/release dll/win32/freetype.dll create mode 100644 Client/ThirdParty/freetype/release dll/win32/freetype.lib create mode 100644 Client/ThirdParty/freetype/release dll/win64/freetype.dll create mode 100644 Client/ThirdParty/freetype/release dll/win64/freetype.lib create mode 100644 Client/ThirdParty/freetype/release static/README.TXT create mode 100644 Client/ThirdParty/freetype/release static/vs2015-2019/win32/freetype.lib create mode 100644 Client/ThirdParty/freetype/release static/vs2015-2019/win64/freetype.lib create mode 100644 Client/ThirdParty/glad/glad.c create mode 100644 Client/ThirdParty/glad/glad.h create mode 100644 Client/ThirdParty/glad/khrplatform.h create mode 100644 Client/ThirdParty/imgui/.editorconfig create mode 100644 Client/ThirdParty/imgui/.gitattributes create mode 100644 Client/ThirdParty/imgui/.github/FUNDING.yml create mode 100644 Client/ThirdParty/imgui/.github/issue_template.md create mode 100644 Client/ThirdParty/imgui/.github/pull_request_template.md create mode 100644 Client/ThirdParty/imgui/.github/workflows/build.yml create mode 100644 Client/ThirdParty/imgui/.github/workflows/scheduled.yml create mode 100644 Client/ThirdParty/imgui/.github/workflows/static-analysis.yml create mode 100644 Client/ThirdParty/imgui/.gitignore create mode 100644 Client/ThirdParty/imgui/LICENSE.txt create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_allegro5.cpp create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_allegro5.h create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_android.cpp create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_android.h create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_dx10.cpp create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_dx10.h create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_dx11.cpp create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_dx11.h create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_dx12.cpp create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_dx12.h create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_dx9.cpp create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_dx9.h create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_glfw.cpp create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_glfw.h create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_glut.cpp create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_glut.h create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_marmalade.cpp create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_marmalade.h create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_metal.h create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_metal.mm create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_opengl2.cpp create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_opengl2.h create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_opengl3.cpp create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_opengl3.h create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_opengl3_loader.h create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_osx.h create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_osx.mm create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_sdl.cpp create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_sdl.h create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_sdlrenderer.cpp create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_sdlrenderer.h create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_vulkan.cpp create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_vulkan.h create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_wgpu.cpp create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_wgpu.h create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_win32.cpp create mode 100644 Client/ThirdParty/imgui/backends/imgui_impl_win32.h create mode 100644 Client/ThirdParty/imgui/backends/vulkan/generate_spv.sh create mode 100644 Client/ThirdParty/imgui/backends/vulkan/glsl_shader.frag create mode 100644 Client/ThirdParty/imgui/backends/vulkan/glsl_shader.vert create mode 100644 Client/ThirdParty/imgui/docs/BACKENDS.md create mode 100644 Client/ThirdParty/imgui/docs/CHANGELOG.txt create mode 100644 Client/ThirdParty/imgui/docs/EXAMPLES.md create mode 100644 Client/ThirdParty/imgui/docs/FAQ.md create mode 100644 Client/ThirdParty/imgui/docs/FONTS.md create mode 100644 Client/ThirdParty/imgui/docs/README.md create mode 100644 Client/ThirdParty/imgui/docs/TODO.txt create mode 100644 Client/ThirdParty/imgui/examples/README.txt create mode 100644 Client/ThirdParty/imgui/examples/example_allegro5/README.md create mode 100644 Client/ThirdParty/imgui/examples/example_allegro5/example_allegro5.vcxproj create mode 100644 Client/ThirdParty/imgui/examples/example_allegro5/example_allegro5.vcxproj.filters create mode 100644 Client/ThirdParty/imgui/examples/example_allegro5/imconfig_allegro5.h create mode 100644 Client/ThirdParty/imgui/examples/example_allegro5/main.cpp create mode 100644 Client/ThirdParty/imgui/examples/example_android_opengl3/CMakeLists.txt create mode 100644 Client/ThirdParty/imgui/examples/example_android_opengl3/android/.gitignore create mode 100644 Client/ThirdParty/imgui/examples/example_android_opengl3/android/app/build.gradle create mode 100644 Client/ThirdParty/imgui/examples/example_android_opengl3/android/app/src/main/AndroidManifest.xml create mode 100644 Client/ThirdParty/imgui/examples/example_android_opengl3/android/app/src/main/java/MainActivity.kt create mode 100644 Client/ThirdParty/imgui/examples/example_android_opengl3/android/build.gradle create mode 100644 Client/ThirdParty/imgui/examples/example_android_opengl3/android/settings.gradle create mode 100644 Client/ThirdParty/imgui/examples/example_android_opengl3/main.cpp create mode 100644 Client/ThirdParty/imgui/examples/example_apple_metal/README.md create mode 100644 Client/ThirdParty/imgui/examples/example_apple_metal/example_apple_metal.xcodeproj/project.pbxproj create mode 100644 Client/ThirdParty/imgui/examples/example_apple_metal/iOS/Info-iOS.plist create mode 100644 Client/ThirdParty/imgui/examples/example_apple_metal/iOS/LaunchScreen.storyboard create mode 100644 Client/ThirdParty/imgui/examples/example_apple_metal/macOS/Info-macOS.plist create mode 100644 Client/ThirdParty/imgui/examples/example_apple_metal/macOS/MainMenu.storyboard create mode 100644 Client/ThirdParty/imgui/examples/example_apple_metal/main.mm create mode 100644 Client/ThirdParty/imgui/examples/example_apple_opengl2/example_apple_opengl2.xcodeproj/project.pbxproj create mode 100644 Client/ThirdParty/imgui/examples/example_apple_opengl2/main.mm create mode 100644 Client/ThirdParty/imgui/examples/example_emscripten_opengl3/Makefile create mode 100644 Client/ThirdParty/imgui/examples/example_emscripten_opengl3/README.md create mode 100644 Client/ThirdParty/imgui/examples/example_emscripten_opengl3/main.cpp create mode 100644 Client/ThirdParty/imgui/examples/example_emscripten_opengl3/shell_minimal.html create mode 100644 Client/ThirdParty/imgui/examples/example_emscripten_wgpu/Makefile create mode 100644 Client/ThirdParty/imgui/examples/example_emscripten_wgpu/README.md create mode 100644 Client/ThirdParty/imgui/examples/example_emscripten_wgpu/main.cpp create mode 100644 Client/ThirdParty/imgui/examples/example_glfw_metal/Makefile create mode 100644 Client/ThirdParty/imgui/examples/example_glfw_metal/main.mm create mode 100644 Client/ThirdParty/imgui/examples/example_glfw_opengl2/Makefile create mode 100644 Client/ThirdParty/imgui/examples/example_glfw_opengl2/build_win32.bat create mode 100644 Client/ThirdParty/imgui/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj create mode 100644 Client/ThirdParty/imgui/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj.filters create mode 100644 Client/ThirdParty/imgui/examples/example_glfw_opengl2/main.cpp create mode 100644 Client/ThirdParty/imgui/examples/example_glfw_opengl3/Makefile create mode 100644 Client/ThirdParty/imgui/examples/example_glfw_opengl3/build_win32.bat create mode 100644 Client/ThirdParty/imgui/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj create mode 100644 Client/ThirdParty/imgui/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj.filters create mode 100644 Client/ThirdParty/imgui/examples/example_glfw_opengl3/main.cpp create mode 100644 Client/ThirdParty/imgui/examples/example_glfw_vulkan/CMakeLists.txt create mode 100644 Client/ThirdParty/imgui/examples/example_glfw_vulkan/build_win32.bat create mode 100644 Client/ThirdParty/imgui/examples/example_glfw_vulkan/build_win64.bat create mode 100644 Client/ThirdParty/imgui/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj create mode 100644 Client/ThirdParty/imgui/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj.filters create mode 100644 Client/ThirdParty/imgui/examples/example_glfw_vulkan/main.cpp create mode 100644 Client/ThirdParty/imgui/examples/example_glut_opengl2/Makefile create mode 100644 Client/ThirdParty/imgui/examples/example_glut_opengl2/example_glut_opengl2.vcxproj create mode 100644 Client/ThirdParty/imgui/examples/example_glut_opengl2/example_glut_opengl2.vcxproj.filters create mode 100644 Client/ThirdParty/imgui/examples/example_glut_opengl2/main.cpp create mode 100644 Client/ThirdParty/imgui/examples/example_marmalade/data/app.icf create mode 100644 Client/ThirdParty/imgui/examples/example_marmalade/main.cpp create mode 100644 Client/ThirdParty/imgui/examples/example_marmalade/marmalade_example.mkb create mode 100644 Client/ThirdParty/imgui/examples/example_null/Makefile create mode 100644 Client/ThirdParty/imgui/examples/example_null/build_win32.bat create mode 100644 Client/ThirdParty/imgui/examples/example_null/main.cpp create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_directx11/build_win32.bat create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_directx11/example_sdl_directx11.vcxproj create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_directx11/example_sdl_directx11.vcxproj.filters create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_directx11/main.cpp create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_metal/Makefile create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_metal/main.mm create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_opengl2/Makefile create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_opengl2/README.md create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_opengl2/build_win32.bat create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_opengl2/example_sdl_opengl2.vcxproj create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_opengl2/example_sdl_opengl2.vcxproj.filters create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_opengl2/main.cpp create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_opengl3/Makefile create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_opengl3/README.md create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_opengl3/build_win32.bat create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_opengl3/example_sdl_opengl3.vcxproj create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_opengl3/example_sdl_opengl3.vcxproj.filters create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_opengl3/main.cpp create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_sdlrenderer/Makefile create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_sdlrenderer/README.md create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_sdlrenderer/build_win32.bat create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_sdlrenderer/example_sdl_sdlrenderer.vcxproj create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_sdlrenderer/example_sdl_sdlrenderer.vcxproj.filters create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_sdlrenderer/main.cpp create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_vulkan/build_win32.bat create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_vulkan/example_sdl_vulkan.vcxproj create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_vulkan/example_sdl_vulkan.vcxproj.filters create mode 100644 Client/ThirdParty/imgui/examples/example_sdl_vulkan/main.cpp create mode 100644 Client/ThirdParty/imgui/examples/example_win32_directx10/build_win32.bat create mode 100644 Client/ThirdParty/imgui/examples/example_win32_directx10/example_win32_directx10.vcxproj create mode 100644 Client/ThirdParty/imgui/examples/example_win32_directx10/example_win32_directx10.vcxproj.filters create mode 100644 Client/ThirdParty/imgui/examples/example_win32_directx10/main.cpp create mode 100644 Client/ThirdParty/imgui/examples/example_win32_directx11/build_win32.bat create mode 100644 Client/ThirdParty/imgui/examples/example_win32_directx11/example_win32_directx11.vcxproj create mode 100644 Client/ThirdParty/imgui/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters create mode 100644 Client/ThirdParty/imgui/examples/example_win32_directx11/main.cpp create mode 100644 Client/ThirdParty/imgui/examples/example_win32_directx12/build_win32.bat create mode 100644 Client/ThirdParty/imgui/examples/example_win32_directx12/example_win32_directx12.vcxproj create mode 100644 Client/ThirdParty/imgui/examples/example_win32_directx12/example_win32_directx12.vcxproj.filters create mode 100644 Client/ThirdParty/imgui/examples/example_win32_directx12/main.cpp create mode 100644 Client/ThirdParty/imgui/examples/example_win32_directx9/build_win32.bat create mode 100644 Client/ThirdParty/imgui/examples/example_win32_directx9/example_win32_directx9.vcxproj create mode 100644 Client/ThirdParty/imgui/examples/example_win32_directx9/example_win32_directx9.vcxproj.filters create mode 100644 Client/ThirdParty/imgui/examples/example_win32_directx9/main.cpp create mode 100644 Client/ThirdParty/imgui/examples/imgui_examples.sln create mode 100644 Client/ThirdParty/imgui/examples/libs/glfw/COPYING.txt create mode 100644 Client/ThirdParty/imgui/examples/libs/glfw/include/GLFW/glfw3.h create mode 100644 Client/ThirdParty/imgui/examples/libs/glfw/include/GLFW/glfw3native.h create mode 100644 Client/ThirdParty/imgui/examples/libs/glfw/lib-vc2010-32/glfw3.lib create mode 100644 Client/ThirdParty/imgui/examples/libs/glfw/lib-vc2010-64/glfw3.lib create mode 100644 Client/ThirdParty/imgui/examples/libs/usynergy/README.txt create mode 100644 Client/ThirdParty/imgui/examples/libs/usynergy/uSynergy.c create mode 100644 Client/ThirdParty/imgui/examples/libs/usynergy/uSynergy.h create mode 100644 Client/ThirdParty/imgui/imconfig.h create mode 100644 Client/ThirdParty/imgui/imgui.cpp create mode 100644 Client/ThirdParty/imgui/imgui.h create mode 100644 Client/ThirdParty/imgui/imgui_demo.cpp create mode 100644 Client/ThirdParty/imgui/imgui_draw.cpp create mode 100644 Client/ThirdParty/imgui/imgui_internal.h create mode 100644 Client/ThirdParty/imgui/imgui_tables.cpp create mode 100644 Client/ThirdParty/imgui/imgui_widgets.cpp create mode 100644 Client/ThirdParty/imgui/imstb_rectpack.h create mode 100644 Client/ThirdParty/imgui/imstb_textedit.h create mode 100644 Client/ThirdParty/imgui/imstb_truetype.h create mode 100644 Client/ThirdParty/imgui/misc/README.txt create mode 100644 Client/ThirdParty/imgui/misc/cpp/README.txt create mode 100644 Client/ThirdParty/imgui/misc/cpp/imgui_stdlib.cpp create mode 100644 Client/ThirdParty/imgui/misc/cpp/imgui_stdlib.h create mode 100644 Client/ThirdParty/imgui/misc/debuggers/README.txt create mode 100644 Client/ThirdParty/imgui/misc/debuggers/imgui.gdb create mode 100644 Client/ThirdParty/imgui/misc/debuggers/imgui.natstepfilter create mode 100644 Client/ThirdParty/imgui/misc/debuggers/imgui.natvis create mode 100644 Client/ThirdParty/imgui/misc/fonts/Cousine-Regular.ttf create mode 100644 Client/ThirdParty/imgui/misc/fonts/DroidSans.ttf create mode 100644 Client/ThirdParty/imgui/misc/fonts/Karla-Regular.ttf create mode 100644 Client/ThirdParty/imgui/misc/fonts/ProggyClean.ttf create mode 100644 Client/ThirdParty/imgui/misc/fonts/ProggyTiny.ttf create mode 100644 Client/ThirdParty/imgui/misc/fonts/Roboto-Medium.ttf create mode 100644 Client/ThirdParty/imgui/misc/fonts/binary_to_compressed_c.cpp create mode 100644 Client/ThirdParty/imgui/misc/freetype/README.md create mode 100644 Client/ThirdParty/imgui/misc/freetype/imgui_freetype.cpp create mode 100644 Client/ThirdParty/imgui/misc/freetype/imgui_freetype.h create mode 100644 Client/ThirdParty/imgui/misc/single_file/imgui_single_file.h create mode 100644 Client/ThirdParty/json/json.hpp create mode 100644 "Documents/\350\256\276\350\256\241/~$\350\256\276\350\256\241.xlsx" create mode 100644 "Documents/\350\256\276\350\256\241/\350\256\276\350\256\241.xlsx" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/Client/.gitignore b/Client/.gitignore new file mode 100644 index 0000000..3c403b0 --- /dev/null +++ b/Client/.gitignore @@ -0,0 +1,8 @@ +/Build +/Project/VisualStudio/Ragdolls/.vs +/Project/VisualStudio/Ragdolls/x64 +/Project/VisualStudio/Ragdolls/*/x64 +/Project/VisualStudio/Ragdolls/*/CmakeFiles/ +/Project/VisualStudio/Ragdolls/Win32 +/Project/VisualStudio/Ragdolls/*/Win32 +.vs \ No newline at end of file diff --git a/Client/Art/Avatar/test.pdn b/Client/Art/Avatar/test.pdn new file mode 100644 index 0000000..d664792 Binary files /dev/null and b/Client/Art/Avatar/test.pdn differ diff --git a/Client/Project/VisualStudio/Ragdolls/MeshBuilder/MeshBuilder.vcxproj b/Client/Project/VisualStudio/Ragdolls/MeshBuilder/MeshBuilder.vcxproj new file mode 100644 index 0000000..37aad1b --- /dev/null +++ b/Client/Project/VisualStudio/Ragdolls/MeshBuilder/MeshBuilder.vcxproj @@ -0,0 +1,130 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {C16CF3E1-0B6C-4166-A89C-846F7B28CA42} + MeshBuilder + 10.0.17763.0 + + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + true + true + + + Console + + + + + Level3 + Disabled + true + true + + + Console + + + + + Level3 + MaxSpeed + true + true + true + true + + + Console + true + true + + + + + Level3 + MaxSpeed + true + true + true + true + + + Console + true + true + + + + + + + + \ No newline at end of file diff --git a/Client/Project/VisualStudio/Ragdolls/MeshBuilder/MeshBuilder.vcxproj.filters b/Client/Project/VisualStudio/Ragdolls/MeshBuilder/MeshBuilder.vcxproj.filters new file mode 100644 index 0000000..3c6f4fd --- /dev/null +++ b/Client/Project/VisualStudio/Ragdolls/MeshBuilder/MeshBuilder.vcxproj.filters @@ -0,0 +1,17 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + \ No newline at end of file diff --git a/Client/Project/VisualStudio/Ragdolls/MeshBuilder/MeshBuilder.vcxproj.user b/Client/Project/VisualStudio/Ragdolls/MeshBuilder/MeshBuilder.vcxproj.user new file mode 100644 index 0000000..be25078 --- /dev/null +++ b/Client/Project/VisualStudio/Ragdolls/MeshBuilder/MeshBuilder.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Client/Project/VisualStudio/Ragdolls/Ragdolls.sln b/Client/Project/VisualStudio/Ragdolls/Ragdolls.sln new file mode 100644 index 0000000..2126b83 --- /dev/null +++ b/Client/Project/VisualStudio/Ragdolls/Ragdolls.sln @@ -0,0 +1,48 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.1500 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{CCEAD487-2900-4EC3-BA6C-663849A5517E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{DA076690-8AD4-41EF-A512-A2883924E841}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MeshBuilder", "MeshBuilder\MeshBuilder.vcxproj", "{C16CF3E1-0B6C-4166-A89C-846F7B28CA42}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ragdolls", "Ragdolls\Ragdolls.vcxproj", "{2F2534C8-5E6C-4F97-A0E6-17A523FD8AED}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C16CF3E1-0B6C-4166-A89C-846F7B28CA42}.Debug|x64.ActiveCfg = Debug|x64 + {C16CF3E1-0B6C-4166-A89C-846F7B28CA42}.Debug|x64.Build.0 = Debug|x64 + {C16CF3E1-0B6C-4166-A89C-846F7B28CA42}.Debug|x86.ActiveCfg = Debug|Win32 + {C16CF3E1-0B6C-4166-A89C-846F7B28CA42}.Debug|x86.Build.0 = Debug|Win32 + {C16CF3E1-0B6C-4166-A89C-846F7B28CA42}.Release|x64.ActiveCfg = Release|x64 + {C16CF3E1-0B6C-4166-A89C-846F7B28CA42}.Release|x64.Build.0 = Release|x64 + {C16CF3E1-0B6C-4166-A89C-846F7B28CA42}.Release|x86.ActiveCfg = Release|Win32 + {C16CF3E1-0B6C-4166-A89C-846F7B28CA42}.Release|x86.Build.0 = Release|Win32 + {2F2534C8-5E6C-4F97-A0E6-17A523FD8AED}.Debug|x64.ActiveCfg = Debug|x64 + {2F2534C8-5E6C-4F97-A0E6-17A523FD8AED}.Debug|x64.Build.0 = Debug|x64 + {2F2534C8-5E6C-4F97-A0E6-17A523FD8AED}.Debug|x86.ActiveCfg = Debug|Win32 + {2F2534C8-5E6C-4F97-A0E6-17A523FD8AED}.Debug|x86.Build.0 = Debug|Win32 + {2F2534C8-5E6C-4F97-A0E6-17A523FD8AED}.Release|x64.ActiveCfg = Release|x64 + {2F2534C8-5E6C-4F97-A0E6-17A523FD8AED}.Release|x64.Build.0 = Release|x64 + {2F2534C8-5E6C-4F97-A0E6-17A523FD8AED}.Release|x86.ActiveCfg = Release|Win32 + {2F2534C8-5E6C-4F97-A0E6-17A523FD8AED}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {C16CF3E1-0B6C-4166-A89C-846F7B28CA42} = {DA076690-8AD4-41EF-A512-A2883924E841} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4711990F-AE3C-42FE-8E31-1AB4861146E0} + EndGlobalSection +EndGlobal diff --git a/Client/Project/VisualStudio/Ragdolls/Ragdolls/Ragdolls.vcxproj b/Client/Project/VisualStudio/Ragdolls/Ragdolls/Ragdolls.vcxproj new file mode 100644 index 0000000..0ad9b2c --- /dev/null +++ b/Client/Project/VisualStudio/Ragdolls/Ragdolls/Ragdolls.vcxproj @@ -0,0 +1,256 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {2F2534C8-5E6C-4F97-A0E6-17A523FD8AED} + Ragdolls + 10.0.17763.0 + + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + Application + true + v141 + MultiByte + + + Application + false + v141 + true + MultiByte + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\..\..\Build + + + $(SolutionDir)..\..\..\Build + + + + Level3 + Disabled + true + true + $(SolutionDir)..\..\..\ThirdParty;$(SolutionDir)..\..\..\ThirdParty\imgui;$(SolutionDir)..\..\..\ThirdParty\SDL2\include;$(SolutionDir)..\..\..\ThirdParty\freetype\include;%(AdditionalIncludeDirectories) + RAGDOLL_WIN;_CRT_SECURE_NO_WARNINGS;RAGDOLL_DEBUG;%(PreprocessorDefinitions) + + + $(SolutionDir)..\..\..\ThirdParty\SDL2\lib\x64;$(SolutionDir)..\..\..\ThirdParty\freetype\release static\vs2015-2019\win64;%(AdditionalLibraryDirectories) + SDL2main.lib;SDL2.lib;OpenGL32.lib;freetype.lib;%(AdditionalDependencies) + Console + + + + + Level3 + Disabled + true + true + RAGDOLL_DEBUG;RAGDOLL_WIN;%(PreprocessorDefinitions) + + + + + Level3 + MaxSpeed + true + true + true + true + RAGDOLL_DEBUG;RAGDOLL_WIN;%(PreprocessorDefinitions) + + + true + true + + + + + Level3 + MaxSpeed + true + true + true + true + $(SolutionDir)..\..\..\ThirdParty;$(SolutionDir)..\..\..\ThirdParty\imgui;$(SolutionDir)..\..\..\ThirdParty\SDL2\include;$(SolutionDir)..\..\..\ThirdParty\freetype\include;%(AdditionalIncludeDirectories) + RAGDOLL_WIN;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + true + true + $(SolutionDir)..\..\..\ThirdParty\SDL2\lib\x64;$(SolutionDir)..\..\..\ThirdParty\freetype\release static\vs2015-2019\win64;%(AdditionalLibraryDirectories) + SDL2main.lib;SDL2.lib;OpenGL32.lib;freetype.lib;%(AdditionalDependencies) + Console + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Client/Project/VisualStudio/Ragdolls/Ragdolls/Ragdolls.vcxproj.filters b/Client/Project/VisualStudio/Ragdolls/Ragdolls/Ragdolls.vcxproj.filters new file mode 100644 index 0000000..52c6542 --- /dev/null +++ b/Client/Project/VisualStudio/Ragdolls/Ragdolls/Ragdolls.vcxproj.filters @@ -0,0 +1,382 @@ + + + + + {1f77a406-ef5a-499b-9ca8-d24663dbad62} + + + {6b71c85a-273e-4337-b0df-9d736ef367bf} + + + {8645b107-8283-49b4-8433-d499800122d6} + + + {a5de18e0-e161-4ae6-bc2f-005636ec0903} + + + {277eb251-3130-46f1-a047-4da6cddf5917} + + + {24b129f5-2de6-47e3-9f11-f1de0ee308a5} + + + {aa992e90-3b5b-405d-b72a-8dda570502e8} + + + {1c125d38-ee4b-4e91-88dd-0116bbe704cb} + + + {0993b33f-0262-42a0-9481-dc5cce4945c6} + + + {f5224050-f441-4f8a-807a-c63600ef81d7} + + + {196504c3-0cb5-4ad9-8022-0c17d665a73b} + + + {7ba5ea51-ff9a-4edb-a192-c40276aefa3e} + + + + + ThirdParty\glad + + + ThirdParty\imgui + + + ThirdParty\imgui + + + ThirdParty\imgui + + + ThirdParty\imgui + + + ThirdParty\imgui + + + ThirdParty\imgui + + + ThirdParty\imgui + + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Debug + + + Threading + + + Threading + + + Threading + + + Threading + + + Threading + + + Threading + + + GUI + + + GUI + + + GUI + + + GUI + + + GUI + + + GUI + + + GUI + + + GUI + + + GUI + + + Common + + + Math + + + Graphics + + + + + ThirdParty\glad + + + ThirdParty\glad + + + ThirdParty\imgui + + + ThirdParty\imgui + + + ThirdParty\imgui + + + ThirdParty\imgui + + + ThirdParty\imgui + + + ThirdParty\imgui + + + ThirdParty\imgui + + + ThirdParty\imgui + + + Graphics + + + Math + + + Math + + + Math + + + Math + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Graphics + + + Utilities + + + Utilities + + + Utilities + + + Math + + + Math + + + Utilities + + + Debug + + + Threading + + + Threading + + + Threading + + + Threading + + + Threading + + + Math + + + Utilities + + + GUI + + + GUI + + + GUI + + + GUI + + + GUI + + + GUI + + + GUI + + + GUI + + + GUI + + + GUI + + + Common + + + Math + + + Graphics + + + Graphics + + + Utilities + + + Utilities + + + Utilities + + + \ No newline at end of file diff --git a/Client/Project/VisualStudio/Ragdolls/Ragdolls/Ragdolls.vcxproj.user b/Client/Project/VisualStudio/Ragdolls/Ragdolls/Ragdolls.vcxproj.user new file mode 100644 index 0000000..be25078 --- /dev/null +++ b/Client/Project/VisualStudio/Ragdolls/Ragdolls/Ragdolls.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/Client/Project/VisualStudio/Ragdolls/Ragdolls/imgui.ini b/Client/Project/VisualStudio/Ragdolls/Ragdolls/imgui.ini new file mode 100644 index 0000000..cb3db17 --- /dev/null +++ b/Client/Project/VisualStudio/Ragdolls/Ragdolls/imgui.ini @@ -0,0 +1,34 @@ +[Window][Debug##Default] +Pos=60,60 +Size=400,400 +Collapsed=0 + +[Window][Hello, world!] +Pos=69,248 +Size=399,197 +Collapsed=0 + +[Window][Dear ImGui Demo] +Pos=1154,114 +Size=531,795 +Collapsed=0 + +[Table][0x49F8DCEA,3] +RefScale=13 +Column 0 Weight=1.0000 +Column 1 Width=84 +Column 2 Width=126 + +[Table][0xC9935533,3] +Column 0 Weight=1.0000 +Column 1 Weight=1.0000 +Column 2 Weight=1.0000 + +[Table][0x8DFA6E86,2] +Column 0 Weight=1.0000 +Column 1 Weight=1.0000 + +[Table][0xFABAAEF7,2] +Column 0 Weight=1.0000 +Column 1 Weight=1.0000 + diff --git a/Client/Source/Common/DataBuffer.cpp b/Client/Source/Common/DataBuffer.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Common/DataBuffer.h b/Client/Source/Common/DataBuffer.h new file mode 100644 index 0000000..02bfc2b --- /dev/null +++ b/Client/Source/Common/DataBuffer.h @@ -0,0 +1,29 @@ +#pragma once + +enum EDataBufferType +{ + DataBufferMode_Binary, // ²»ÒÔ\0½á⣬²»°üÀ¨\0 + DataBufferMode_Text, // ÒÔ\0½á⣬°üÀ¨\0 +}; + +// ÃèÊöÄÚ´æ¶ÔÏ󣬻á×÷Ϊ +// 1. ¶àÏ̶߳ÁÈ¡ÎļþµÄ·µ»Ø +class DataBuffer +{ +public: + DataBuffer() + {} + ~DataBuffer() + { + delete data; + } + + union { + char* data; + unsigned char* udata; + char* sdata; + }; + int length; + EDataBufferType type; + +}; \ No newline at end of file diff --git a/Client/Source/Debug/Log.cpp b/Client/Source/Debug/Log.cpp new file mode 100644 index 0000000..1b0ddf4 --- /dev/null +++ b/Client/Source/Debug/Log.cpp @@ -0,0 +1,164 @@ +#include "../Threading/Mutex.h" +#include "log.h" +#include +#include +#include +#include + +using namespace std; + +#ifdef RAGDOLL_WIN +#include +static HANDLE s_ConsoleHandle = 0; +#endif + +unordered_set s_OpenTags; + +Mutex s_Mutex; + +#ifdef RAGDOLL_DEBUG +// https://stackoverflow.com/questions/997946/how-to-get-current-time-and-date-in-c +// Get current date/time, format is YYYY-MM-DD.HH:mm:ss +const std::string currentDateTime() { + time_t now = time(0); + struct tm tstruct; + char buf[80]; + tstruct = *localtime(&now); + // Visit http://en.cppreference.com/w/cpp/chrono/c/strftime + // for more information about date/time format + strftime(buf, sizeof(buf), "%Y-%m-%d %X", &tstruct); + + return buf; +} + +static void SetOutputColor(int i) { + if (s_ConsoleHandle == 0) { + s_ConsoleHandle = GetStdHandle(STD_OUTPUT_HANDLE); + } + if (i == 0) { + SetConsoleTextAttribute(s_ConsoleHandle, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY); + } + else if(i == 1) { + SetConsoleTextAttribute(s_ConsoleHandle, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY); + } + else { + SetConsoleTextAttribute(s_ConsoleHandle, FOREGROUND_RED | FOREGROUND_INTENSITY); + } +} + +void log_error_null_param(const char* funcName, const char* param) +{ + log_error("Null parameter in %s called %s", funcName, param); +} + +void log_open_tag(const char* tag) +{ + s_OpenTags.insert(tag); +} + +void log_info(const char* fmt, ...) +{ + Lock(s_Mutex) { + SetOutputColor(0); + va_list pArgs = NULL; + va_start(pArgs, fmt); + printf("%s [Info] ", currentDateTime().c_str()); + vprintf(fmt, pArgs); + printf("\n"); + va_end(pArgs); + } +} + +void log_warning(const char* fmt, ...) +{ + Lock(s_Mutex) { + SetOutputColor(1); + va_list pArgs = NULL; + va_start(pArgs, fmt); + printf("%s [Warning] ", currentDateTime().c_str()); + vprintf(fmt, pArgs); + printf("\n"); + va_end(pArgs); + } +} + +void log_error(const char* fmt, ...) +{ + Lock(s_Mutex) { + SetOutputColor(2); + va_list pArgs = NULL; + va_start(pArgs, fmt); + printf("%s [Error] ", currentDateTime().c_str()); + vprintf(fmt, pArgs); + printf("\n"); + va_end(pArgs); + } +} + +#define CHECK_TAG(tag)\ +if (s_OpenTags.count(tag) == 0)\ + return; + +void log_info_tag(const char* tag, const char* fmt, ...) +{ + CHECK_TAG(tag); + + Lock(s_Mutex) { + SetOutputColor(0); + va_list pArgs = NULL; + va_start(pArgs, fmt); + printf("%s [Info] [%s] ", currentDateTime().c_str(), tag); + vprintf(fmt, pArgs); + printf("\n"); + va_end(pArgs); + } +} + +void log_warning_tag(const char* tag, const char* fmt, ...) +{ + CHECK_TAG(tag); + + Lock(s_Mutex) { + SetOutputColor(1); + va_list pArgs = NULL; + va_start(pArgs, fmt); + printf("%s [Warning] [%s] ", currentDateTime().c_str(), tag); + vprintf(fmt, pArgs); + printf("\n"); + va_end(pArgs); + } +} + +void log_error_tag(const char* tag, const char* fmt, ...) +{ + CHECK_TAG(tag); + + Lock(s_Mutex) { + SetOutputColor(2); + va_list pArgs = NULL; + va_start(pArgs, fmt); + printf("%s [Error] [%s] ", currentDateTime().c_str(), tag); + vprintf(fmt, pArgs); + printf("\n"); + va_end(pArgs); + } +} + +#else +void log_open_tag(std::string tag) {} +void log_info(std::string log) {} +void log_warning(std::string log){} +void log_error(std::string log){} +void log_error_null_param(std::string funcName, std::string param){} +void log_info(string tag, std::string log) {} +void log_warning(string tag, std::string log) {} +void log_error(string tag, std::string log) {} + +void log_open_tag(const char* tag) {} +void log_info(const char* log, ...) {} +void log_warning(const char* log, ...) {} +void log_error(const char* log, ...) {} +void log_info(const char* tag, const char* log, ...) {} +void log_warning(const char* tag, const char* log, ...) {} +void log_error(const char* tag, const char* log, ...) {} +#endif \ No newline at end of file diff --git a/Client/Source/Debug/Log.h b/Client/Source/Debug/Log.h new file mode 100644 index 0000000..8547102 --- /dev/null +++ b/Client/Source/Debug/Log.h @@ -0,0 +1,14 @@ +#pragma once +#include + +void log_open_tag(const char* tag); + +void log_info(const char* fmt, ...); +void log_warning(const char* fmt, ...); +void log_error(const char* fmt, ...); + +void log_error_null_param(const char* funcName, const char* param); + +void log_info_tag(const char* tag, const char* fmt, ...); +void log_warning_tag(const char* tag, const char* fmt, ...); +void log_error_tag(const char* tag, const char* fmt, ...); diff --git a/Client/Source/GUI/Font.cpp b/Client/Source/GUI/Font.cpp new file mode 100644 index 0000000..1efe551 --- /dev/null +++ b/Client/Source/GUI/Font.cpp @@ -0,0 +1,302 @@ +#include "freetype.h" +#include "Font.h" + +#include "../Math/Functions.h" +#include "../Math/Math.h" +#include "../Debug/Log.h" +#include "../Utilities/Assert.h" +#include "../Graphics/ImageData.h" + +using namespace character; + +/* +* http://madig.github.io/freetype-web/documentation/tutorial/ +* https://unicode-table.com/en/#cjk-unified-ideographs-extension-a +* https://learnopengl.com/In-Practice/Text-Rendering +* https://www.zhihu.com/question/294660079 +* https://baike.baidu.com/item/%E5%9F%BA%E6%9C%AC%E5%A4%9A%E6%96%87%E7%A7%8D%E5%B9%B3%E9%9D%A2/10788078 +* https://stackoverflow.com/questions/27331819/whats-the-difference-between-a-character-a-code-point-a-glyph-and-a-grapheme +*/ + +static std::string s_FontError; + +static std::vector s_PixelBuffer; +static const int s_SizePerPixel = sizeof(unsigned char); + +Font::Font(std::string path, TextGeneratingSettings settings) + : m_Characters() +{ + m_AtlasMargin = settings.margin; + m_GlyphPadding = settings.padding; + m_AtlasSize = settings.atlasSize; + + if (FT_Init_FreeType(&m_FTLibrary)) + { + s_FontError = "Init freetype error. Font path " + path; + throw FontException(s_FontError.c_str()); + } + + if (FT_New_Face(m_FTLibrary, path.c_str(), 0, &m_FTFace)) + { + s_FontError = "Create freetype face error. Font path " + path; + throw FontException(s_FontError.c_str()); + } +} + +Font::Font(DataBuffer* db, TextGeneratingSettings settings) + : m_Characters() +{ + m_AtlasMargin = settings.margin; + m_GlyphPadding = settings.padding; + m_AtlasSize = settings.atlasSize; + + if (FT_Init_FreeType(&m_FTLibrary)) + { + s_FontError = "Init freetype error."; + throw FontException(s_FontError.c_str()); + } + + if (FT_New_Memory_Face(m_FTLibrary, db->udata, db->length, 0, &m_FTFace)) + { + s_FontError = "Create freetype face error."; + throw FontException(s_FontError.c_str()); + } +} + +character::Hash Font::GetHash(Unicode codepoint, int pixelSize) +{ + character::Hash hash; + hash.codepoint = codepoint; + hash.size = pixelSize; + return hash; +} + +const Character* Font::GetCharacter(character::Unicode codepoint, int pixelSize) +{ + character::Hash hash = GetHash(codepoint, pixelSize); + auto iter = m_Characters.find(hash.hashCode); + if (iter == m_Characters.end()) + { + if (RenderCharacter(codepoint, pixelSize)) + { + iter = m_Characters.find(hash.hashCode); + } + else + { + return NULL; + } + } + Assert(iter != m_Characters.end()); + return &iter->second; +} + +void Font::RenderCharacters(character::Unicode* codepoint, int n, int pixelSize) +{ + for (int i = 0; i < n; ++i) + { + RenderCharacter(codepoint[i], pixelSize); + } +} + +void Font::RenderCharacters(std::vector& codepoint, int pixelSize) +{ + int n = codepoint.size(); + for (int i = 0; i < n; ++i) + { + RenderCharacter(codepoint[i], pixelSize); + } +} + +bool Font::RenderCharacter(character::Unicode codepoint, int pixelSize) +{ + character::Hash hash = GetHash(codepoint, pixelSize); + if (m_Characters.size() > 0 && m_Characters.count(hash.hashCode) != 0) + return true; + FT_Set_Pixel_Sizes(m_FTFace, 0, pixelSize); + + // bug: ·¢ÏÖÓÐʱºòäÖȾµÄ½á¹ûÊÇFT_PIXEL_MODE_MONO£¨1-bits)£¬ÊÔ¹ý²»Í¬µÄflags×éºÏ»¹ÊDz»¶Ô£¬×îºóÊÖ¶¯×ª»»Îª8-bits + + FT_Int32 flags = FT_LOAD_RENDER; + if (FT_Load_Char(m_FTFace, codepoint, flags)) + return false; + + Character character; + + int w = m_FTFace->glyph->bitmap.width; + int h = m_FTFace->glyph->bitmap.rows; + + const unsigned char* pixels = m_FTFace->glyph->bitmap.buffer; + if (pixels != NULL) // ÓÐЩ×ÖÌåÖÐspace¡¢tabûÓÐ×ÖÐ뵀 + { + s_PixelBuffer.resize(w * h); + if (m_FTFace->glyph->bitmap.pixel_mode == FT_PIXEL_MODE_MONO) + { + // 1-bit monochrome + int pitch = m_FTFace->glyph->bitmap.pitch; + for (int y = 0; y < h; ++y) + { + for (int x = 0; x < w; ++x) + { + int index = x + y * w; + s_PixelBuffer[index] = ((pixels[pitch * y + x / 8]) & (1 << (7 - x % 8))) ? 255 : 0; + } + } + } + else if (m_FTFace->glyph->bitmap.pixel_mode) + { + // 8-bit grayscale + memcpy(&s_PixelBuffer[0], pixels, s_SizePerPixel * w * h); + } + + //TextHelper::print_glyph(&s_PixelBuffer[0], w, h); + + GlyphAtals* atlas = RequestAtlas(pixelSize, Vector2f(w, h)); + Assert(atlas); + + Rect rect = GetRenderChartAndMove(atlas, Vector2f(w, h)); + + try + { + atlas->altas->UpdateSubImage(rect, EPixelFormat::PixelFormat_R, EPixelElementType::PixelType_UNSIGNED_BYTE, &s_PixelBuffer[0]); + } + catch (TextureException& e) + { + s_PixelBuffer.clear(); + std::string error = e.what(); + error = "Render Character Error: " + error; + log_error(e.what()); + return false; + } + s_PixelBuffer.clear(); + + character.atlas = atlas->index; + character.position = rect; + character.bearing = Vector2f(m_FTFace->glyph->bitmap_left, m_FTFace->glyph->bitmap_top); + } + else // space¡¢tab + { + character.atlas = FONT_NOT_IN_ATLAS_PLACEHOLDER; + character.position = Rect(0,0,0,0); + character.bearing = Vector2f(0, 0); + } + + character.advance = m_FTFace->glyph->advance.x * 1/64.f; + + m_Characters.insert(std::pair(hash.hashCode, character)); + + return true; +} + +const GlyphAtals* Font::GetGlyphAtlas(int index) +{ + if (index >= m_Atlases.size()) + return NULL; + return &m_Atlases[index]; +} + +Rect Font::GetRenderChartAndMove(GlyphAtals* atlas, Vector2f preferSize) +{ + Rect rect; + Vector2f space; + space.x = atlas->width - atlas->cursor.x - m_AtlasMargin; + space.y = atlas->height - atlas->cursor.y - m_AtlasMargin; + if (space.x > preferSize.x && space.y > preferSize.y) + { + rect.x = atlas->cursor.x; + rect.y = atlas->cursor.y; + rect.width = preferSize.x; + rect.height = preferSize.y; + atlas->cursor.x += rect.width + m_GlyphPadding; + atlas->rowHeight = MathUtils::Max((float)atlas->rowHeight, preferSize.y); + } + else if (space.y - atlas->rowHeight - m_GlyphPadding - m_AtlasMargin > preferSize.y) + { + rect.x = m_AtlasMargin; + rect.y = atlas->cursor.y + m_GlyphPadding + atlas->rowHeight; + rect.width = preferSize.x; + rect.height = preferSize.y; + atlas->cursor.x = m_AtlasMargin; + atlas->cursor.y += atlas->rowHeight + m_GlyphPadding; + atlas->rowHeight = rect.height; + } + else + { + Assert(false); + } + return rect; +} + +GlyphAtals* Font::RequestAtlas(int pixelSize, Vector2f preferSize) +{ + GlyphAtals* atlas = NULL; + auto iter = m_AtlasCache.find(pixelSize); + if (iter == m_AtlasCache.end() || !HasEnoughSpace(iter->second, preferSize)) + { + Assert(m_Atlases.size() < FONT_NOT_IN_ATLAS_PLACEHOLDER); + + Texture* tex = CreateAtlas(); + GlyphAtals newAtlas = GlyphAtals(); + newAtlas.altas = tex; + newAtlas.width = m_AtlasSize.x; + newAtlas.height = m_AtlasSize.y; + newAtlas.index = m_Atlases.size(); + newAtlas.cursor = Vector2f(m_AtlasMargin, m_AtlasMargin); + + m_Atlases.push_back(newAtlas); + atlas = &m_Atlases[m_Atlases.size() - 1]; + + if (iter != m_AtlasCache.end()) + m_AtlasCache.erase(pixelSize); + m_AtlasCache.insert(std::pair(pixelSize, atlas)); + } + else + { + atlas = iter->second; + } + Assert(atlas); + return atlas; +} + +Texture* Font::CreateAtlas() +{ + TextureSetting setting; + setting.filterMode = ETextureFilterMode::Nearest; + setting.wrapMode = ETextureWrapMode::Clamp; + setting.format = ETextureFormat::R8; + setting.type = ETextureType::TEX_2D; + setting.keepImageData = false; + Texture* tex = new Texture(setting, m_AtlasSize.x, m_AtlasSize.y); + return tex; +} + +bool Font::HasEnoughSpace(GlyphAtals* atlas, Vector2f preferSize) +{ + if (atlas == NULL) + return false; + Vector2f space; + space.x = atlas->width - atlas->cursor.x - m_AtlasMargin; + space.y = atlas->height - atlas->cursor.y - m_AtlasMargin; + if (space.x > preferSize.x && space.y > preferSize.y) + return true; + if (space.y - atlas->rowHeight - m_GlyphPadding - m_AtlasMargin > preferSize.y) + return true; + return false; +} + +Character GetCharacter(character::Unicode Unicode, int pixelSize) +{ + return Character(); +} + +void TextHelper::print_glyph(unsigned char* glyph, int width, int height) +{ + for (int r = 0; r < height; ++r) + { + for (int c = 0; c < width; ++c) + { + unsigned char ch = glyph[c + r * width]; + printf("%c", ch == 0 ? ' ' : '+'); + } + printf("\n"); + } +} diff --git a/Client/Source/GUI/Font.h b/Client/Source/GUI/Font.h new file mode 100644 index 0000000..6fd3c19 --- /dev/null +++ b/Client/Source/GUI/Font.h @@ -0,0 +1,149 @@ +#pragma once + +#include "../Utilities/Singleton.h" +#include "../Graphics/Texture.h" +#include "../Common/DataBuffer.h" +#include "../Math/Math.h" + +#include "freetype.h" + +#include +#include +#include +#include + +//https://github.com/kaienfr/Font + +struct Character { + unsigned int atlas; // atlasË÷Òý + Rect position; // ÔÚaltasÀïµÄλÖã¬ÒÔ×óÉϽÇΪԭµãµÄ£¬ºÍGLµÄY¾µÏñ + Vector2f bearing; // ×óÉϽÇÏà¶ÔÓÚÔ­µãµÄÆ«ÒÆ + unsigned int advance; // ×Ü¿í£¬ËãÉÏÁ˼ä¸ô +}; + +namespace character +{ +#if GAMELAB_WIN + typedef unsigned short Unicode; // unicode codepoint£¨BMP£¬U+0000ÖÁU+FFFF) +#else + typedef unsigned int Unicode; // unicode codepoint£¨BMP£¬U+0000ÖÁU+FFFF) +#endif + +#pragma pack(1) + union Hash { + unsigned int hashCode; + struct { + Unicode codepoint; + unsigned short size;//×ÖÌå´óС + }; +#pragma pack(pop) + + bool operator==(const Hash &other) const + { + return codepoint == other.codepoint && size == other.size; + } + }; +} + +struct UnicodeString +{ + character::Unicode* str; + int length; +}; + +namespace std +{ + template <> + struct hash + { + std::size_t operator()(const character::Hash& k) const + { + return k.hashCode; + } + }; +} + +struct GlyphAtals +{ + int index; + Texture* altas; // Ìùͼ + int width, height; // ³ß´ç + + Vector2f cursor; // Óα꣬´Ó×óÉϽǣ¨0,0£©¿ªÊ¼ + int rowHeight; // µ±Ç°ÐÐµÄ¸ß¶È +}; + +struct TextGeneratingSettings +{ + Vector2f atlasSize; // atlasµÄ³ß´ç + int margin; // atlasµÄ±ß½ç + int padding; // glyphÏ໥֮¼äµÄ¼ä¾à£¬·ÀÖ¹²ÉÑùµÄʱºòÔ½½ç +}; + +class FontException : public std::exception +{ +public: + FontException(const char* what) + : std::exception(what) + { + } +}; + +enum EEncoding +{ + Encoding_ASCII, + Encoding_UTF8, + Encoding_UTF16, +}; + +// ûÓÐ×ÖÐΣ¬µ«ÊÇÓÐadvanceµÄÎÄ×Ö£¬±ÈÈçspaceºÍtab +#define FONT_NOT_IN_ATLAS_PLACEHOLDER (INT_MAX) + +// µ¥¸ö×ÖÌå +class Font +{ +public: + Font(std::string path, TextGeneratingSettings setting)/*throw FontException*/; + Font(DataBuffer* db, TextGeneratingSettings setting)/*throw FontException*/; + + const Character* GetCharacter(character::Unicode codepoint, int pixelSize); + const GlyphAtals* GetGlyphAtlas(int index); + + // pre-bake + bool RenderCharacter(character::Unicode codepoint, int pixelSize); + void RenderCharacters(character::Unicode* codepoint, int n, int pixelSize); + void RenderCharacters(std::vector& codepoint, int pixelSize); + + GET(Vector2f, AtlasSize, m_AtlasSize); + +private: + Texture* CreateAtlas(); + GlyphAtals* RequestAtlas(int pixelSize, Vector2f preferSize); + Rect GetRenderChartAndMove(GlyphAtals* atlas, Vector2f preferSize); + bool HasEnoughSpace(GlyphAtals* atlas, Vector2f preferSize); + character::Hash GetHash(character::Unicode Unicode, int pixelSize); + + //------------------------------------------------------------------------- + + std::unordered_map m_Characters; // äÖȾÍêµÄÎÄ×Ö + + std::vector m_Atlases; // µ±Ç°ËùÓеÄatlas£¬ÓÉfontÍêȫӵÓÐËùÓÐȨ£¬ËùÒÔÊÇlightuserdata + std::unordered_map m_AtlasCache; // ¿ìËÙÕÒµ½¿ÉÓõÄatlas + + bool m_IsEnabled; + + Vector2f m_AtlasSize; + int m_AtlasMargin; + int m_GlyphPadding; + + FT_Library m_FTLibrary; + FT_Face m_FTFace; + +}; + +namespace TextHelper +{ + + void print_glyph(unsigned char* glyph, int width, int height); + +} diff --git a/Client/Source/GUI/TextMeshGenerator.cpp b/Client/Source/GUI/TextMeshGenerator.cpp new file mode 100644 index 0000000..766a9b0 --- /dev/null +++ b/Client/Source/GUI/TextMeshGenerator.cpp @@ -0,0 +1,89 @@ +#include "TextMeshGenerator.h" + +// ¼ÆËãÒ»¸ö¹þÏ£Öµ +static uint32_t GetStrHash(const UnicodeString& str) +{ + if (str.length == 0) + return 0; + + int len = str.length; + uint32_t hash = (uint32_t)len; // seed + size_t step = (len >> 5) + 1; + for (int l = len; l >= step; l -= step) + { + unsigned short unicode = str.str[l - 1]; + unsigned char hicode = *((unsigned char*)&unicode); + unsigned char locode = *(((unsigned char*)&unicode) + 1); + hash = hash ^ ((hash << 5) + (hash >> 2) + hicode + locode); + } + return hash; +} + +const UITextMesh* TextMeshGenerator::GetTextMesh( + const UnicodeString& str + , Font* font + , int pixelSize + , int lineHeight + , Color32 col32 + , ETextAnchor anchor + , ETextAlignment alignment + , bool wordwrap + , float preferred +){ + uint32_t hash = GetStrHash(str); + UITextMeshList* tm = NULL; + bool hasHash = m_TextMeshes.count(hash); + if (hasHash) + { + tm = m_TextMeshes[hash]; + while (tm) + { + UITextMesh* mesh = tm->mesh; + if (mesh->GetFont() != font + || mesh->GetPixelSize() != pixelSize + || mesh->GetLineHeight() != lineHeight + || mesh->GetAnchor() != anchor + || mesh->GetAlignment() != alignment + || mesh->GetWordwrap() != wordwrap + || mesh->GetPreferred() != preferred + || mesh->GetColor() != col32 + ){ + tm = tm->next; + continue; + } + const UnicodeString& content = mesh->GetContent(); + if (content.length != str.length) + { + tm = tm->next; + continue; + } + if (memcmp(str.str, content.str, sizeof(character::Unicode) * str.length) == 0) + { + return tm->mesh; + } + tm = tm->next; + } + } + tm = new UITextMeshList(); + try { + tm->mesh = new UITextMesh(str, font, pixelSize, lineHeight, col32, anchor, alignment, wordwrap, preferred); + log_info("Text", "New UITextMesh"); + } + catch(TextMeshException& e) + { + delete tm; + throw; + } + if (hasHash) + { + UITextMeshList* list = m_TextMeshes[hash]; + tm->next = list; + m_TextMeshes[hash] = tm; + } + else + { + tm->next = NULL; + m_TextMeshes.insert(std::pair(hash, tm)); + } + return tm->mesh; +} diff --git a/Client/Source/GUI/TextMeshGenerator.h b/Client/Source/GUI/TextMeshGenerator.h new file mode 100644 index 0000000..acc0a0a --- /dev/null +++ b/Client/Source/GUI/TextMeshGenerator.h @@ -0,0 +1,31 @@ +#pragma once + +#include +#include + +#include "../Debug/Log.h" +#include "../Graphics/Color.h" + +#include "UITextMesh.h" +#include "Font.h" + +// Öð²½»ØÊÕ³¤ÆÚûÓõ½µÄtextmesh +class GraduallyReleaseTextMesh +{ +}; + +struct UITextMeshList { + UITextMesh* mesh; + UITextMeshList* next; +}; + +class TextMeshGenerator : public Singleton +{ +public: + const UITextMesh* GetTextMesh(const UnicodeString& str, Font* font, int pixelSize, int lineHeight, Color32 col32, ETextAnchor anchor, ETextAlignment alignment, bool wordwrap, float preferred); + +private: + std::unordered_map m_TextMeshes; +}; + +#define g_TextMeshGenerator (*TextMeshGenerator::Instance()) \ No newline at end of file diff --git a/Client/Source/GUI/UI9Slicing.cpp b/Client/Source/GUI/UI9Slicing.cpp new file mode 100644 index 0000000..c0d8f60 --- /dev/null +++ b/Client/Source/GUI/UI9Slicing.cpp @@ -0,0 +1,112 @@ +#include "../Math/Math.h" + +#include "UI9Slicing.h" + +#include +#include + +using namespace std; + +static vector s_Vertices; +static vector s_Indices; + +UI9Slicing::UI9Slicing(int mode, Vector2f horizontal, Vector2f vertical, Vector2f texPixelSize, Vector2f size) +{ + m_Slicing = mode; + m_Horizontal = horizontal.Clamp(0, texPixelSize.x, 0, texPixelSize.x); + m_Vertical = vertical.Clamp(0, texPixelSize.y, 0, texPixelSize.y); + + if (m_Horizontal[0] + m_Horizontal[1] > texPixelSize.x || m_Vertical[0] + m_Vertical[1] > texPixelSize.y) + { + throw UIMeshException("UI9Slicing wrong parameter."); + } + m_TexSize = texPixelSize; + m_Size = size; +} + +void UI9Slicing::Draw() +{ + s_Indices.clear(); + s_Vertices.clear(); + + Vector2f tileSize = Vector2f(m_TexSize.x - m_Horizontal[0] - m_Horizontal[1], m_TexSize.y - m_Vertical[0] - m_Vertical[1]); + Vector2f fillSize = Vector2f(m_Size.x - m_Horizontal[0] - m_Horizontal[1], m_Size.y - m_Vertical[0] - m_Vertical[1]); + // horizonalºÍvertical¶ÔÓ¦µÄuv£¬×¢ÒâuvÔÚ×óϽǣ¬meshÔÚ×óÉÏ½Ç + Vector2f tileUVx = Vector2f(m_Horizontal[0] / m_TexSize.x, (m_TexSize.x - m_Horizontal[1]) / m_TexSize.x); + Vector2f tileUVy = Vector2f((m_TexSize.y - m_Vertical[0]) / m_TexSize.y, m_Vertical[1] / m_TexSize.y); + + // fill vertices + int row = 2 + ((fillSize.y <= 0) ? 0 : (m_Slicing == Slicing_Simple ? 2 : ceilf((float)fillSize.y / tileSize.y) + 1)); + int colum = 2 + ((fillSize.x <= 0) ? 0 : (m_Slicing == Slicing_Simple ? 2 : ceilf((float)fillSize.x / tileSize.x) + 1)); + + for (int r = 0; r < row; ++r) + { + UIVertexLayout vert; + vert.color = Color32::white; + if (r == 0) + { + vert.position.y = 0; + vert.uv.y = 1; + } + else if (r == row - 1) + { + vert.position.y = m_Size.y; + vert.uv.y = 0; + } + else { + if (m_Slicing == Slicing_Tiled) { + vert.position.y = clamp(m_Vertical[0] + (r - 1) * tileSize.y, m_Vertical[0], m_Size.y - m_Vertical[1]); + vert.uv.y = odd(r - 1) ? tileUVy[1] : tileUVy[0]; + } else { + vert.position.y = odd(r - 1) ? m_Size.y - m_Vertical[1] : m_Vertical[0]; + vert.uv.y = odd(r - 1) ? tileUVy[1] : tileUVy[0]; + } + } + for (int c = 0; c < colum; ++c) + { + if (c == 0) + { + vert.position.x = 0; + vert.uv.x = 0; + } + else if (c == colum - 1) + { + vert.position.x = m_Size.x; + vert.uv.x = 1; + } + else { + if (m_Slicing == Slicing_Tiled) { + vert.position.x = clamp(m_Horizontal[0] + (c - 1) * tileSize.x, m_Horizontal[0], m_Size.x - m_Horizontal[0]); + vert.uv.x = odd(c - 1) ? tileUVx[1] : tileUVx[0]; + } else { + vert.position.x = odd(c - 1) ? (m_Size.x - m_Horizontal[1]) : m_Horizontal[0]; + vert.uv.x = odd(c - 1) ? tileUVx[1] : tileUVx[0]; + } + } + s_Vertices.push_back(vert); + + if (c < colum - 1 && r < row - 1) { + int index = c + r * colum; + s_Indices.push_back(index); s_Indices.push_back(index + colum); s_Indices.push_back(index + colum + 1); + s_Indices.push_back(index + colum + 1); s_Indices.push_back(index + 1); s_Indices.push_back(index); + } + } + } + + void* vb; + void* ib; + + int vertCount = s_Vertices.size(); + int indicesCount = s_Indices.size(); + + g_SharedVBO.GetChunk(sizeof(UIVertexLayout), sizeof(UIIndex), vertCount, indicesCount, Primitive_Triangle, &vb, &ib); + + memcpy(vb, &s_Vertices[0], vertCount * sizeof(UIVertexLayout)); + memcpy(ib, &s_Indices[0], indicesCount* sizeof(UIIndex)); + + s_Indices.resize(0); + s_Vertices.resize(0); + + g_SharedVBO.ReleaseChunk(vertCount, indicesCount); + g_SharedVBO.DrawChunk(s_UIVertexLayout); +} \ No newline at end of file diff --git a/Client/Source/GUI/UI9Slicing.h b/Client/Source/GUI/UI9Slicing.h new file mode 100644 index 0000000..6a37447 --- /dev/null +++ b/Client/Source/GUI/UI9Slicing.h @@ -0,0 +1,25 @@ +#pragma once + +#include "UIMesh.h" + +enum ESlicing +{ + Slicing_Simple, + Slicing_Tiled, +}; + +// ¾Å¹¬¸ñ +class UI9Slicing : public UIMesh +{ +public: + UI9Slicing(int mode, Vector2f horizontal, Vector2f vertical, Vector2f texPixelSize, Vector2f size)/*throw UIMeshException*/; + + void Draw() override; + +private: + int m_Slicing; + Vector2f m_Horizontal; // ×óÓÒÁ½ÌõÇиîÏßµ½×ó±ßºÍÓұߵľàÀë + Vector2f m_Vertical; // ÉÏÏÂÁ½ÌõÇиîÏßµ½ÉÏϵľàÀë + Vector2f m_TexSize; + Vector2f m_Size; +}; diff --git a/Client/Source/GUI/UILine.cpp b/Client/Source/GUI/UILine.cpp new file mode 100644 index 0000000..8aa8c1d --- /dev/null +++ b/Client/Source/GUI/UILine.cpp @@ -0,0 +1,48 @@ +#include "UILine.h" + +struct UILineLayout +{ + Vector2f position; +}; + +static CustomVertexLayout layout; + +InitializeStaticVariables([]() { + VertexAttributeDescriptor POSITION = VertexAttributeDescriptor(0, 2, VertexAttrFormat_Float, sizeof(UILineLayout)); + + layout.attributes.push_back(POSITION); +}); + +void UILine::Draw() +{ + const int nVerts = 2; + const int nIndices = 2; + + float pos[] = { + m_From.x, m_From.y, + m_To.x, m_To.y, + }; + + uint16 indices[] = { + 0, 1 + }; + + + uint8* vb; + uint16* ib; + + g_SharedVBO.GetChunk(sizeof(UILineLayout), sizeof(uint16), nVerts, nIndices, Primitive_Line, (void**)&vb, (void**)&ib); + + UILineLayout* dst = (UILineLayout*)vb; + + for (int i = 0; i < nVerts; ++i) + { + dst[i].position.Set(pos[2 * i], pos[2 * i + 1]); + } + + for (int i = 0; i < nIndices; ++i) + ib[i] = indices[i]; + + g_SharedVBO.ReleaseChunk(nVerts, nIndices); + g_SharedVBO.DrawChunk(layout); +} \ No newline at end of file diff --git a/Client/Source/GUI/UILine.h b/Client/Source/GUI/UILine.h new file mode 100644 index 0000000..a47b1f1 --- /dev/null +++ b/Client/Source/GUI/UILine.h @@ -0,0 +1,21 @@ +#pragma once + +#include "../Utilities/StaticInitiator.h" +#include "UIMesh.h" + +class UILine : public UIMesh +{ +public: + UILine(Vector2f from, Vector2f to) + { + m_From = from; + m_To = to; + } + + void Draw() override; + +private: + Vector2f m_From; + Vector2f m_To; + +}; diff --git a/Client/Source/GUI/UIMesh.cpp b/Client/Source/GUI/UIMesh.cpp new file mode 100644 index 0000000..9616c46 --- /dev/null +++ b/Client/Source/GUI/UIMesh.cpp @@ -0,0 +1,15 @@ +#include "UIMesh.h" + +CustomVertexLayout UIMesh::s_UIVertexLayout; +unsigned int UIMesh::s_SizePerVertex; + +InitializeStaticVariables([]() { + VertexAttributeDescriptor POSITION = VertexAttributeDescriptor(0, 2, VertexAttrFormat_Float, sizeof(UIVertexLayout)); + VertexAttributeDescriptor UV = VertexAttributeDescriptor(sizeof(Vector2f), 2, VertexAttrFormat_Float, sizeof(UIVertexLayout)); + VertexAttributeDescriptor COLOR = VertexAttributeDescriptor(sizeof(Vector2f) * 2, 4, VertexAttrFormat_Unsigned_Byte, sizeof(UIVertexLayout), true); + UIMesh::s_UIVertexLayout.attributes.push_back(POSITION); + UIMesh::s_UIVertexLayout.attributes.push_back(UV); + UIMesh::s_UIVertexLayout.attributes.push_back(COLOR); + + UIMesh::s_SizePerVertex = sizeof(UIVertexLayout); +}); diff --git a/Client/Source/GUI/UIMesh.h b/Client/Source/GUI/UIMesh.h new file mode 100644 index 0000000..11f157a --- /dev/null +++ b/Client/Source/GUI/UIMesh.h @@ -0,0 +1,42 @@ +#pragma once + +#include "../Utilities/Exception.h" +#include "../Graphics/DynamicMesh.h" +#include "../Math/Math.h" +#include "../Utilities/StaticInitiator.h" +#include "../Graphics/CustomVertexLayout.h" +#include "../Graphics/DefaultVertexLayout.h" +#include "../Graphics/Color.h" +#include "../Graphics/GfxDevice.h" + +// UIĬÈϵĶ¥µã²¼¾Ö +struct UIVertexLayout +{ + UIVertexLayout(Vector2f pos = Vector2f::zero, Vector2f texCoord = Vector2f::zero, Color32 col = Color32()) + { + position = pos; + uv = texCoord; + color = col; + } + + Vector2f position; + Vector2f uv; + Color32 color; +}; + +typedef uint16 UIIndex; + +CustomException(UIMeshException); + +// ËùÓеÄUIMesh¶¼ÊÇ×óÉϽÇΪԭµã +class UIMesh : public DynamicMesh +{ +public: + UIMesh() : DynamicMesh() {} + virtual ~UIMesh() {} + + virtual void Draw() = 0; + + static CustomVertexLayout s_UIVertexLayout; + static unsigned int s_SizePerVertex; +}; diff --git a/Client/Source/GUI/UIQuad.cpp b/Client/Source/GUI/UIQuad.cpp new file mode 100644 index 0000000..d3c7825 --- /dev/null +++ b/Client/Source/GUI/UIQuad.cpp @@ -0,0 +1,64 @@ +#include "../Math/Math.h" +#include "../Graphics/GfxDevice.h" + +#include "UIQuad.h" + +struct UIQuadLayout +{ + Vector2f position; + Vector2f uv; +}; + +static CustomVertexLayout layout; + +InitializeStaticVariables([]() { + VertexAttributeDescriptor POSITION = VertexAttributeDescriptor(0, 2, VertexAttrFormat_Float, sizeof(UIQuadLayout)); + VertexAttributeDescriptor UV = VertexAttributeDescriptor(sizeof(Vector2f), 2, VertexAttrFormat_Float, sizeof(UIQuadLayout)); + + layout.attributes.push_back(POSITION); + layout.attributes.push_back(UV); +}); + +void UIQuad::Draw() +{ + const int nVerts = 4; + const int nIndices = 6; + + float pos[] = { + m_Left, m_Bottom, // left-bottom + m_Right, m_Bottom, // right-bottom + m_Right, m_Top, // right-top + m_Left, m_Top, // top-left + }; + + float uv[] = { + 0, 0, + 1, 0, + 1, 1, + 0, 1, + }; + + uint16 indices[] = { + 0, 1, 3, // right-top + 1, 2, 3, // left-bottom + }; + + uint8* vb; + uint16* ib; + + g_SharedVBO.GetChunk(sizeof(UIQuadLayout), sizeof(uint16), nVerts, nIndices, Primitive_Triangle, (void**)&vb, (void**)&ib); + + UIQuadLayout* dst = (UIQuadLayout*)vb; + + for (int i = 0; i < nVerts; ++i) + { + dst[i].position.Set(pos[2 * i], pos[2 * i + 1]); + dst[i].uv.Set(uv[2 * i], uv[2 * i + 1]); + } + + for (int i = 0; i < nIndices; ++i) + ib[i] = indices[i]; + + g_SharedVBO.ReleaseChunk(nVerts, nIndices); + g_SharedVBO.DrawChunk(layout); +} \ No newline at end of file diff --git a/Client/Source/GUI/UIQuad.h b/Client/Source/GUI/UIQuad.h new file mode 100644 index 0000000..278848a --- /dev/null +++ b/Client/Source/GUI/UIQuad.h @@ -0,0 +1,21 @@ +#pragma once +#include "../Utilities/StaticInitiator.h" +#include "UIMesh.h" + +class UIQuad : public UIMesh +{ +public : + UIQuad(float l, float r, float t, float b) + { + m_Left = l; + m_Right = r; + m_Top = t; + m_Bottom = b; + } + + void Draw() override; + +private: + float m_Left, m_Right, m_Top, m_Bottom; + +}; diff --git a/Client/Source/GUI/UISquare.cpp b/Client/Source/GUI/UISquare.cpp new file mode 100644 index 0000000..f5c3702 --- /dev/null +++ b/Client/Source/GUI/UISquare.cpp @@ -0,0 +1,53 @@ +#include "../Math/Math.h" +#include "../Graphics/GfxDevice.h" + +#include "UISquare.h" + +struct UISquareLayout +{ + Vector2f position; +}; + +static CustomVertexLayout layout; + +InitializeStaticVariables([]() { + VertexAttributeDescriptor POSITION = VertexAttributeDescriptor(0, 2, VertexAttrFormat_Float, sizeof(UISquareLayout)); + + layout.attributes.push_back(POSITION); +}); + +void UISquare::Draw() +{ + const int nVerts = 4; + const int nIndices = 6; + + float pos[] = { + m_Left, m_Bottom, // left-bottom + m_Right, m_Bottom, // right-bottom + m_Right, m_Top, // right-top + m_Left, m_Top, // top-left + }; + + int indices[] = { + 0, 1, 3, // right-top + 1, 2, 3, // left-bottom + }; + + uint8* vb; + uint16* ib; + + g_SharedVBO.GetChunk(sizeof(UISquareLayout), sizeof(uint16), 4, 6, Primitive_Triangle, (void**)&vb, (void**)&ib); + + UISquareLayout* dst = (UISquareLayout*)vb; + + for (int i = 0; i < nVerts; ++i) + { + dst[i].position.Set(pos[2 * i], pos[2 * i + 1]); + } + + for (int i = 0; i < nIndices; ++i) + ib[i] = indices[i]; + + g_SharedVBO.ReleaseChunk(4, 6); + g_SharedVBO.DrawChunk(layout); +} diff --git a/Client/Source/GUI/UISquare.h b/Client/Source/GUI/UISquare.h new file mode 100644 index 0000000..8de07f0 --- /dev/null +++ b/Client/Source/GUI/UISquare.h @@ -0,0 +1,22 @@ +#pragma once +#include "../Utilities/StaticInitiator.h" +#include "UIMesh.h" + +// ´¿É«·½ÐÎ +class UISquare : public UIMesh +{ +public: + UISquare(float l, float r, float t, float b) + { + m_Left = l; + m_Right = r; + m_Top = t; + m_Bottom = b; + } + + void Draw() override; + +private: + float m_Left, m_Right, m_Top, m_Bottom; + +}; diff --git a/Client/Source/GUI/UITextMesh.cpp b/Client/Source/GUI/UITextMesh.cpp new file mode 100644 index 0000000..13bd8dc --- /dev/null +++ b/Client/Source/GUI/UITextMesh.cpp @@ -0,0 +1,278 @@ +#include "../Graphics/CustomVertexLayout.h" +#include "../Utilities/StaticInitiator.h" +#include "../Math/Math.h" +#include "../Graphics/Color.h" +#include "../Graphics/GfxDevice.h" +#include "../Utilities/AutoInvoke.h" +#include "../Graphics/DefaultVertexLayout.h" +#include "../Debug/Log.h" + +#include "UITextMesh.h" + +#include +#include + +using namespace std; + +struct TextMeshVBOLayout +{ + Vector2f position; + Vector2f uv; + Color32 color; +}; + +static CustomVertexLayout s_TextMeshVBOLayout; + +static unsigned int s_VertexPerText; +static unsigned int s_SizePerVertex; +static unsigned int s_SizePerText; +static unsigned int s_SizePerIndex; +static unsigned int s_IndicesPerText; + +struct TextInfo { + const Character* ch; + float offset; + int line; // ´Ó0¿ªÊ¼ +}; + +InitializeStaticVariables([]() { + VertexAttributeDescriptor POSITION = VertexAttributeDescriptor(0, 2, VertexAttrFormat_Float, sizeof(TextMeshVBOLayout)); + VertexAttributeDescriptor UV = VertexAttributeDescriptor(sizeof(Vector2f), 2, VertexAttrFormat_Float, sizeof(TextMeshVBOLayout)); + VertexAttributeDescriptor COLOR = VertexAttributeDescriptor(sizeof(Vector2f)*2, 4, VertexAttrFormat_Unsigned_Byte, sizeof(TextMeshVBOLayout), true); + s_TextMeshVBOLayout.attributes.push_back(POSITION); + s_TextMeshVBOLayout.attributes.push_back(UV); + s_TextMeshVBOLayout.attributes.push_back(COLOR); + + s_VertexPerText = 4; + s_SizePerVertex = sizeof(TextMeshVBOLayout); + + s_IndicesPerText = 6; + s_SizePerIndex = VertexLayout::GetDefaultIndexSize(); + + s_SizePerText = sizeof(TextMeshVBOLayout) * 4; +}); + +UITextMesh::UITextMesh( + const UnicodeString& str // Îı¾ + , Font* font // ×ÖÌå + , int pixelSize // ´óС + , int lineHeight // ÐÐ¸ß + , Color32 color32 // ÑÕÉ« + , ETextAnchor anchor // êµã + , ETextAlignment alignment // ¶ÔÆë·½Ê½ + , bool wordwrap // ×Ô¶¯»»ÐÐ + , float preferred // ×Ô¶¯»»ÐÐÇøÓò´óС +){ + m_Font = font; + m_PixelSize = pixelSize; + m_LineHeight = lineHeight; + m_Color = color32; + m_Alignment = alignment; + m_Anchor = anchor; + m_Wordwrap = wordwrap; + m_Preferred = preferred; + m_Content.length = str.length; + m_Content.str = (character::Unicode*)malloc(str.length * sizeof(character::Unicode)); + memcpy(m_Content.str, str.str, str.length * sizeof(character::Unicode)); + + // ¼Ç¼Îı¾°´atlas·ÖÀà + static unordered_map> s_TextInfos; + s_TextInfos.clear(); + + // ¼Ç¼Îı¾Ã¿Ðеij¤¶È + static unordered_map s_LineWidths; + s_LineWidths.clear(); + + // ¼Ç¼ÿÐÐµÄÆ«ÒƳ¤¶È + static unordered_map s_LineOffsets; + s_LineOffsets.clear(); + + InvokeWhenLeave([]() { + s_LineWidths.clear(); + s_LineOffsets.clear(); + s_TextInfos.clear(); + }); + + const Vector2f atlasSize = font->GetAtlasSize(); + + //----------------------------------------------------------------- + // ´¦ÀíÁË»»ÐкÍ×Ô¶¯»»ÐÐÖ®ºóµÄÎı¾ÇøÓò´óС + Vector2f textRegion; + // °´ÕÕ²»Í¬µÄatlas·ÖÀൽs_TextInfos + float offset = 0; + int line = 0; + for (int i = 0; i < str.length; ++i) + { + character::Unicode c = str.str[i]; + const Character* ch = font->GetCharacter(c, pixelSize); + if (ch == NULL) + continue; + + if (wordwrap) // ×Ô¶¯»»ÐÐ + { + if (offset + ch->bearing.x + ch->position.width > preferred) + { + + ++line; + offset = 0; + } + } + + unsigned int atlasIndex = ch->atlas; + if (atlasIndex != FONT_NOT_IN_ATLAS_PLACEHOLDER) //·Ç¿Õ¸ñ + { +// »»ÐзûUnix'\n', Windows'\r\n', MacOS '\r' +#define CHECK_BREAKS() \ + if (c == '\n' || c == '\r') \ + { \ + ++line; \ + offset = 0; \ + if (c == '\r' && ((i + 1) < str.length && str.str[i + 1] == '\n')) /*skip\n*/ \ + ++i; \ + continue; \ + } + + CHECK_BREAKS(); + + TextInfo info; + info.ch = ch; + info.offset = offset; + info.line = line; + + auto list = s_TextInfos.find(atlasIndex); + if (list == s_TextInfos.end()) + s_TextInfos.insert(std::pair>(atlasIndex, vector())); + + vector& v = s_TextInfos[atlasIndex]; + v.push_back(info); + } + else + { + // ÓÐЩ×ÖÌå»»ÐÐûÓÐ×ÖÐΣ¬ËùÒÔÒ²ÐèÒªÔÚÕâÀï´¦Àí + CHECK_BREAKS(); + } + + offset += ch->advance; + + textRegion.x = max(offset, textRegion.x); + + if (s_LineWidths.count(line) == 0) + s_LineWidths.insert(std::pair(line, 0)); + s_LineWidths[line] = max(offset, s_LineWidths[line]); + } + + textRegion.y = (line + 1) * lineHeight; + + if (s_TextInfos.size() == 0) + { + return; + } + + Vector2i textOffset; + Vector2f halfRegion = Vector2f(textRegion.x/ 2.f, textRegion.y / 2.f); + switch (anchor) + { + case TextAnchor_UpperLeft: textOffset.Set(0, 0); break; + case TextAnchor_UpperCenter: textOffset.Set(-halfRegion.x, 0); break; + case TextAnchor_UpperRight: textOffset.Set(-textRegion.x, 0); break; + case TextAnchor_MiddleLeft: textOffset.Set(0, -halfRegion.y); break; + case TextAnchor_MiddleCenter: textOffset.Set(-halfRegion.x, -halfRegion.y); break; + case TextAnchor_MiddleRight: textOffset.Set(-textRegion.x, -halfRegion.y); break; + case TextAnchor_LowerLeft: textOffset.Set(0, -textRegion.y); break; + case TextAnchor_LowerCenter: textOffset.Set(-halfRegion.x, -textRegion.y); break; + case TextAnchor_LowerRight: textOffset.Set(-textRegion.x, -textRegion.y); break; + } + + for (int i = 0; i < line; ++i) + { + int lineLen = s_LineWidths.count(i) != 0 ? s_LineWidths[i] : 0; + int lineOffset = 0; + switch (alignment) + { + case TextAlignment_Left: lineOffset = 0; break; + case TextAlignment_Center: lineOffset = (textRegion.x - lineLen)/2.f; break; + case TextAlignment_Right: lineOffset = textRegion.x - lineLen; break; + } + s_LineOffsets.insert(std::pair(i, lineOffset)); + } + + //----------------------------------------------------------------- + + // Ìî³äVBOºÍIBO + for (auto iter : s_TextInfos) { + unsigned int atlasIndex = iter.first; // atlas atlasIndex + vector& texts = iter.second; + int textCount = texts.size(); + + VertexBuffer* vb = new VertexBuffer(textCount * s_SizePerText, textCount * s_IndicesPerText * s_SizePerIndex, VertexBuffer::VertexBufferType_Static); + void* pVB; + uint16* pIB; + + vb->GetChunk(s_SizePerVertex, s_SizePerIndex, s_VertexPerText * textCount, s_IndicesPerText * textCount, EPrimitive::Primitive_Triangle, &pVB,(void**) &pIB); + + TextMeshVBOLayout* dst = (TextMeshVBOLayout*)pVB; + for (int i = 0; i < textCount; ++i) + { + TextInfo& text = texts[i]; + + int vOff = i * s_VertexPerText; + int lineXOff = s_LineOffsets.count(text.line) ? s_LineOffsets[text.line] : 0; + int lineYOff = text.line * lineHeight; + // ×óÉϽÇÊÇÔ­µã + float pos[] = { + textOffset.x + lineXOff + text.offset + text.ch->bearing.x, textOffset.y + lineYOff + pixelSize - text.ch->bearing.y + text.ch->position.height, // bottom-left + textOffset.x + lineXOff + text.offset + text.ch->bearing.x + text.ch->position.width, textOffset.y + lineYOff + pixelSize - text.ch->bearing.y + text.ch->position.height, // bottom-right + textOffset.x + lineXOff + text.offset + text.ch->bearing.x + text.ch->position.width, textOffset.y + lineYOff + pixelSize - text.ch->bearing.y, // top-right + textOffset.x + lineXOff + text.offset + text.ch->bearing.x, textOffset.y + lineYOff + pixelSize - text.ch->bearing.y, // top-left + }; + Vector4f uvQuad = Vector4f(text.ch->position.x / atlasSize.x, text.ch->position.y / atlasSize.y, text.ch->position.width / atlasSize.x, text.ch->position.height / atlasSize.y); + float uv[] = { + uvQuad.x, uvQuad.y + uvQuad.w, + uvQuad.x + uvQuad.z, uvQuad.y + uvQuad.w, + uvQuad.x + uvQuad.z, uvQuad.y, + uvQuad.x, uvQuad.y, + }; + for (int j = 0; j < s_VertexPerText; ++j) + { + dst[vOff + j].position.Set(pos[2 * j], pos[2 * j + 1]); + dst[vOff + j].uv.Set(uv[2 * j], uv[2 * j + 1]); + dst[vOff + j].color = color32; + } + + int iOff = i * s_IndicesPerText; + int indices[] = { + 0, 1, 3, // right-top + 1, 2, 3, // left-bottom + }; + for (int j = 0; j < s_IndicesPerText; ++j) + pIB[iOff + j] = vOff + indices[j]; + } + + vb->FlushChunk(s_VertexPerText * textCount, s_IndicesPerText * textCount); + + m_VBOs.insert(std::pair(atlasIndex, vb)); + } + + WipeGLError(); +} + +void UITextMesh::Draw() const +{ + for (auto subText : m_VBOs) + { + int atlasIndex = subText.first; // atlasIndex of atlas + VertexBuffer* vbo = subText.second; + + const GlyphAtals* atlas = m_Font->GetGlyphAtlas(atlasIndex); + if (atlas == NULL) + { + log_error("Render text failed, no glyph atlas."); + continue; + } + + g_GfxDevice.SetUniformTexture("gamelab_main_tex", atlas->altas); + + WipeGLError(); + vbo->Draw(s_TextMeshVBOLayout); + } +} diff --git a/Client/Source/GUI/UITextMesh.h b/Client/Source/GUI/UITextMesh.h new file mode 100644 index 0000000..869db80 --- /dev/null +++ b/Client/Source/GUI/UITextMesh.h @@ -0,0 +1,69 @@ +#pragma once + +#include "../Graphics/VertexBuffer.h" +#include "../Utilities/Exception.h" +#include "../Graphics/Color.h" + +#include "Font.h" + +#include + +CustomException(TextMeshException); + +enum ETextAnchor +{ + TextAnchor_UpperLeft, + TextAnchor_UpperCenter, + TextAnchor_UpperRight, + TextAnchor_MiddleLeft, + TextAnchor_MiddleCenter, + TextAnchor_MiddleRight, + TextAnchor_LowerLeft, + TextAnchor_LowerCenter, + TextAnchor_LowerRight, +}; + +enum ETextAlignment { + TextAlignment_Left, + TextAlignment_Center, + TextAlignment_Right, +}; + +namespace TextHelper +{ +} + +class UITextMesh +{ +public: + void Draw() const; + +private: + friend class TextMeshGenerator; + + UITextMesh(const UnicodeString& str, Font* font, int pixelSize, int lineHeight, Color32 color32 = Color32::white, ETextAnchor anchor = TextAnchor_UpperLeft, ETextAlignment alignment = TextAlignment_Left, bool wordwrap = false, float preferred = 0)/*throw TextMeshException*/; + ~UITextMesh(); + + GET(const Font*, Font, m_Font); + GET(int, PixelSize, m_PixelSize); + GET(int, LineHeight, m_LineHeight); + GET(Color32, Color, m_Color); + GET(ETextAlignment, Alignment, m_Alignment); + GET(ETextAnchor, Anchor, m_Anchor); + GET(bool, Wordwrap, m_Wordwrap); + GET(float, Preferred, m_Preferred); + GET(const UnicodeString&, Content, m_Content); + + std::unordered_map m_VBOs; + + Font* m_Font; + UnicodeString m_Content; + int m_PixelSize; + int m_LineHeight; + Color32 m_Color; + ETextAlignment m_Alignment; + ETextAnchor m_Anchor; + bool m_Wordwrap; + float m_Preferred; + +}; \ No newline at end of file diff --git a/Client/Source/GUI/freetype.h b/Client/Source/GUI/freetype.h new file mode 100644 index 0000000..4b54e20 --- /dev/null +++ b/Client/Source/GUI/freetype.h @@ -0,0 +1,4 @@ +#pragma once + +#include +#include FT_FREETYPE_H diff --git a/Client/Source/GUI/utf8.cpp b/Client/Source/GUI/utf8.cpp new file mode 100644 index 0000000..8a3a086 --- /dev/null +++ b/Client/Source/GUI/utf8.cpp @@ -0,0 +1,415 @@ +/* + * Description: UTF-8 字符串的解ç å’Œç¼–ç å‡½æ•° + * unicode 字符处ç†å‡½æ•° + * History: yang@haipo.me, 2013/05/29, create + * + * This code is in the public domain. + * You may use this code any way you wish, private, educational, + * or commercial. It's free. + */ + +# include +# include + +# include "utf8.h" + +namespace utf8 +{ + + ucs4_t getu8c(char **src, int *illegal) + { + static char umap[256] = { 0 }; + static int umap_init_flag = 0; + + if (umap_init_flag == 0) + { + int i; + + for (i = 0; i < 0x100; ++i) + { + if (i < 0x80) + { + umap[i] = 1; + } + else if (i >= 0xc0 && i < 0xe0) + { + umap[i] = 2; + } + else if (i >= 0xe0 && i < 0xf0) + { + umap[i] = 3; + } + else if (i >= 0xf0 && i < 0xf8) + { + umap[i] = 4; + } + else if (i >= 0xf8 && i < 0xfc) + { + umap[i] = 5; + } + else if (i >= 0xfc && i < 0xfe) + { + umap[i] = 6; + } + else + { + umap[i] = 0; + } + } + + umap_init_flag = 1; + } + + uint8_t *s = (uint8_t *)(*src); + int r_illegal = 0; + + while (umap[*s] == 0) + { + ++s; + ++r_illegal; + } + + uint8_t *t; + int byte_num; + uint32_t uc; + int i; + + repeat_label: + t = s; + byte_num = umap[*s]; + uc = *s++ & (0xff >> byte_num); + + for (i = 1; i < byte_num; ++i) + { + if (umap[*s]) + { + r_illegal += s - t; + goto repeat_label; + } + else + { + uc = (uc << 6) + (*s & 0x3f); + s += 1; + } + } + + *src = (char *)s; + if (illegal) + { + *illegal = r_illegal; + } + + return uc; + } + + size_t u8decode(char const *str, ucs4_t *des, size_t n, int *illegal) + { + if (n == 0) + return 0; + + char *s = (char *)str; + size_t i = 0; + ucs4_t uc = 0; + int r_illegal_all = 0, r_illegal; + + while ((uc = getu8c(&s, &r_illegal))) + { + if (i < (n - 1)) + { + des[i++] = uc; + r_illegal_all += r_illegal; + } + else + { + break; + } + } + + des[i] = 0; + if (illegal) + { + *illegal = r_illegal_all + r_illegal; + } + + return i; + } + +# define IF_CAN_HOLD(left, n) do { \ + size_t m = (size_t)(n); \ + if ((size_t)(left) < (m + 1)) return -2; \ + (left) -= m; \ +} while (0) + + int putu8c(ucs4_t uc, char **des, size_t *left) + { + if (uc < 0) + return -1; + + if (uc < (0x1 << 7)) + { + IF_CAN_HOLD(*left, 1); + + **des = (char)uc; + *des += 1; + **des = 0; + + return 1; + } + + int byte_num; + + if (uc < (0x1 << 11)) + { + byte_num = 2; + } + else if (uc < (0x1 << 16)) + { + byte_num = 3; + } + else if (uc < (0x1 << 21)) + { + byte_num = 4; + } + else if (uc < (0x1 << 26)) + { + byte_num = 5; + } + else + { + byte_num = 6; + } + + IF_CAN_HOLD(*left, byte_num); + + int i; + for (i = byte_num - 1; i > 0; --i) + { + *(uint8_t *)(*des + i) = (uc & 0x3f) | 0x80; + uc >>= 6; + } + + *(uint8_t *)(*des) = uc | (0xff << (8 - byte_num)); + + *des += byte_num; + **des = 0; + + return byte_num; + } + + size_t u8encode(ucs4_t *us, char *des, size_t n, int *illegal) + { + if (n == 0) + return 0; + + char *s = des; + size_t left = n; + size_t len = 0; + int r_illegal = 0; + + *s = 0; + while (*us) + { + int ret = putu8c(*us, &s, &left); + if (ret > 0) + { + len += ret; + } + else if (ret == -1) + { + r_illegal += 1; + } + else + { + break; + } + + ++us; + } + + if (illegal) + { + *illegal = r_illegal; + } + + return len; + } + + /* 全角字符 */ + int isufullwidth(ucs4_t uc) + { + if (uc == 0x3000) + return 1; + + if (uc >= 0xff01 && uc <= 0xff5e) + return 1; + + return 0; + } + + /* å…¨è§’å­—æ¯ */ + int isufullwidthalpha(ucs4_t uc) + { + if (uc >= 0xff21 && uc <= 0xff3a) + return 1; + + if (uc >= 0xff41 && uc <= 0xff5a) + return 2; + + return 0; + } + + /* 全角数字 */ + int isufullwidthdigit(ucs4_t uc) + { + if (uc >= 0xff10 && uc <= 0xff19) + return 1; + + return 0; + } + + /* 全角转åŠè§’ */ + ucs4_t ufull2half(ucs4_t uc) + { + if (uc == 0x3000) + return ' '; + + if (uc >= 0xff01 && uc <= 0xff5e) + return uc - 0xfee0; + + return uc; + } + + /* åŠè§’转全角 */ + ucs4_t uhalf2full(ucs4_t uc) + { + if (uc == ' ') + return 0x3000; + + if (uc >= 0x21 && uc <= 0x7e) + return uc + 0xfee0; + + return uc; + } + + /* ä¸­æ—¥éŸ©è¶Šç»Ÿä¸€è¡¨æ„æ–‡å­— */ + int isuchiness(ucs4_t uc) + { + /* æœ€åˆæœŸç»Ÿä¸€æ±‰å­— */ + if (uc >= 0x4e00 && uc <= 0x9fcc) + return 1; + + /* 扩展 A 区 */ + if (uc >= 0x3400 && uc <= 0x4db5) + return 2; + + /* 扩展 B 区 */ + if (uc >= 0x20000 && uc <= 0x2a6d6) + return 3; + + /* 扩展 C 区 */ + if (uc >= 0x2a700 && uc <= 0x2b734) + return 4; + + /* 扩展 D 区 */ + if (uc >= 0x2b740 && uc <= 0x2b81f) + return 5; + + /* 扩展 E 区 */ + if (uc >= 0x2b820 && uc <= 0x2f7ff) + return 6; + + /* å°æ¹¾å…¼å®¹æ±‰å­— */ + if (uc >= 0x2f800 && uc <= 0x2fa1d) + return 7; + + /* 北æœé²œå…¼å®¹æ±‰å­— */ + if (uc >= 0xfa70 && uc <= 0xfad9) + return 8; + + /* 兼容汉字 */ + if (uc >= 0xf900 && uc <= 0xfa2d) + return 9; + + /* 兼容汉字 */ + if (uc >= 0xfa30 && uc <= 0xfa6d) + return 10; + + return 0; + } + + /* 中文标点 */ + int isuzhpunct(ucs4_t uc) + { + if (uc >= 0x3001 && uc <= 0x3002) + return 1; + + if (uc >= 0x3008 && uc <= 0x300f) + return 1; + + if (uc >= 0xff01 && uc <= 0xff0f) + return 1; + + if (uc >= 0xff1a && uc <= 0xff20) + return 1; + + if (uc >= 0xff3b && uc <= 0xff40) + return 1; + + if (uc >= 0xff5b && uc <= 0xff5e) + return 1; + + if (uc >= 0x2012 && uc <= 0x201f) + return 1; + + if (uc >= 0xfe41 && uc <= 0xfe44) + return 1; + + if (uc >= 0xfe49 && uc <= 0xfe4f) + return 1; + + if (uc >= 0x3010 && uc <= 0x3017) + return 1; + + return 0; + } + + /* 日文平å‡å */ + int isuhiragana(ucs4_t uc) + { + if (uc >= 0x3040 && uc <= 0x309f) + return 1; + + return 0; + } + + /* 日文片å‡å */ + int isukatakana(ucs4_t uc) + { + if (uc >= 0x30a0 && uc <= 0x30ff) + return 1; + + if (uc >= 0x31f0 && uc <= 0x31ff) + return 2; + + return 0; + } + + /* 韩文 */ + int isukorean(ucs4_t uc) + { + /* 韩文拼音 */ + if (uc >= 0xac00 && uc <= 0xd7af) + return 1; + + /* éŸ©æ–‡å­—æ¯ */ + if (uc >= 0x1100 && uc <= 0x11ff) + return 2; + + /* éŸ©æ–‡å…¼å®¹å­—æ¯ */ + if (uc >= 0x3130 && uc <= 0x318f) + return 3; + + return 0; + } + +} diff --git a/Client/Source/GUI/utf8.h b/Client/Source/GUI/utf8.h new file mode 100644 index 0000000..b561b44 --- /dev/null +++ b/Client/Source/GUI/utf8.h @@ -0,0 +1,113 @@ +/* + * Description: UTF-8 字符串的解ç å’Œç¼–ç å‡½æ•° + * unicode 字符处ç†å‡½æ•° + * History: yang@haipo.me, 2013/05/29, create + * + * This code is in the public domain. + * You may use this code any way you wish, private, educational, + * or commercial. It's free. + */ + +# pragma once + +# include +# include + +namespace utf8 +{ + + + /* + * 标准 C 并没有规定 wchar_t çš„ä½æ•°ã€‚但 GNU C Lib ä¿è¯ wchar_t 是 32 ä½çš„, + * 所以å¯ä»¥ç”¨ wchar.h 中定义的函数æ¥åƒ wchar_t 一样æ“纵 ucs4_t. + * http://www.gnu.org/software/libc/manual/html_node/Extended-Char-Intro.html + */ + typedef int32_t ucs4_t; + + /* + * 从 UTF-8 ç¼–ç çš„字符串 *src 中读å–一个 unicode 字符,并更新 *src 的值。 + * + * 如果é‡åˆ°éžæ³• UTF-8 ç¼–ç ï¼Œåˆ™è·³è¿‡éžæ³•部分。 + * 如果 illegal 傿•°ä¸ä¸º NULL, 则 *illegal è¡¨ç¤ºéžæ³• UTF-8 ç¼–ç å­—节数。 + */ + ucs4_t getu8c(char **src, int *illegal); + + /* + * å°† src 指å‘çš„ UTF-8 ç¼–ç å­—符串解ç ä¸º unicode,放在长度为 n 的数组 des 中, + * 并在末尾添加 0. 如果 des ä¸è¶³ä»¥å­˜æ”¾æ‰€æœ‰çš„字符,则最多ä¿å­˜ n - 1 个 unicode + * 字符并补 0. + * + * 如果é‡åˆ°éžæ³• UTF-8 ç¼–ç ï¼Œåˆ™è·³è¿‡éžæ³•部分。 + * 如果 illegal ä¸ä¸º NULL, 则 *illegal è¡¨ç¤ºéžæ³• UTF-8 ç¼–ç çš„字节数。 + */ + size_t u8decode(char const *str, ucs4_t *des, size_t n, int *illegal); + + /* + * å°† unicode 字符 uc ç¼–ç ä¸º UTF-8 ç¼–ç ï¼Œæ”¾åˆ°é•¿åº¦ä¸º *left 的字符串 *des 中。 + * + * 如果 *des ä¸è¶³ä»¥å­˜æ”¾ uc 对应的 UTF-8 字符串,返回一个负值。 + * 如果æˆåŠŸï¼Œæ›´æ–° *des å’Œ *left 的值。 + */ + int putu8c(ucs4_t uc, char **des, size_t *left); + + /* + * 将以 0 结尾的 unicode 数组 us ç¼–ç ä¸º UTF-8 字符串,放到长度为 n 的字符串 des 中。 + * + * è´Ÿæ•°ä¸ºéžæ³•çš„ unicode 字符。 + * 如果 illegal ä¸ä¸º NULL,则 *illegal è¡¨ç¤ºéžæ³•çš„ unicode 字符数。 + */ + size_t u8encode(ucs4_t *us, char *des, size_t n, int *illegal); + + /* + * 判断是å¦ä¸ºå…¨è§’字符 + */ + int isufullwidth(ucs4_t uc); + + /* + * 判断是å¦ä¸ºå…¨è§’å­—æ¯ + */ + int isufullwidthalpha(ucs4_t uc); + + /* + * 判断是å¦ä¸ºå…¨è§’æ•°å­— + */ + int isufullwidthdigit(ucs4_t uc); + + /* + * 全角字符转åŠè§’字符。 + * 如果 uc 为全角字符,则返回对应的åŠè§’字符,å¦åˆ™è¿”回 uc 本身。 + */ + ucs4_t ufull2half(ucs4_t uc); + + /* + * åŠè§’字符转全角字符 + * 如果 uc 为åŠè§’字符,则返回对应的全角字符,å¦åˆ™è¿”回 uc 本身。 + */ + ucs4_t uhalf2full(ucs4_t uc); + + /* + * 判断是å¦ä¸ºæ±‰å­—å­—ç¬¦ï¼ˆä¸­æ—¥éŸ©è¶Šç»Ÿä¸€è¡¨æ„æ–‡å­—) + */ + int isuchiness(ucs4_t uc); + + /* + * 判断是å¦ä¸ºä¸­æ–‡æ ‡ç‚¹ + */ + int isuzhpunct(ucs4_t uc); + + /* + * 判断是å¦ä¸ºæ—¥æ–‡å¹³å‡å字符 + */ + int isuhiragana(ucs4_t uc); + + /* + * 判断是å¦ä¸ºæ—¥æ–‡ç‰‡å‡å字符 + */ + int isukatakana(ucs4_t uc); + + /* + * 判断是å¦ä¸ºéŸ©æ–‡å­—符 + */ + int isukorean(ucs4_t uc); + +} diff --git a/Client/Source/Graphics/Color.cpp b/Client/Source/Graphics/Color.cpp new file mode 100644 index 0000000..88b1ed8 --- /dev/null +++ b/Client/Source/Graphics/Color.cpp @@ -0,0 +1,4 @@ +#include "Color.h" + +const Color32 Color32::white = Color32(255, 255, 255, 255); + diff --git a/Client/Source/Graphics/Color.h b/Client/Source/Graphics/Color.h new file mode 100644 index 0000000..f7bb937 --- /dev/null +++ b/Client/Source/Graphics/Color.h @@ -0,0 +1,48 @@ +#pragma once + +struct Color +{ + Color(float r = 0, float g = 0, float b = 0, float a = 0) + { + this->r = r; + this->g = g; + this->b = b; + this->a = a; + } + void Set(float r = 0, float g = 0, float b = 0, float a = 0) + { + this->r = r; + this->g = g; + this->b = b; + this->a = a; + } + float r, g, b, a; +}; + +struct Color32 +{ + Color32(unsigned char r = 0, unsigned char g = 0, unsigned char b = 0, unsigned char a = 0) + { + this->r = r; + this->g = g; + this->b = b; + this->a = a; + } + void Set(unsigned char r = 0, unsigned char g = 0, unsigned char b = 0, unsigned char a = 0) + { + this->r = r; + this->g = g; + this->b = b; + this->a = a; + } + + bool operator !=(const Color32& col) + { + return !(r == col.r && g == col.g && b == col.b && a == col.a); + } + + unsigned char r, g, b, a; + + static const Color32 white; +}; + diff --git a/Client/Source/Graphics/CustomVertexLayout.cpp b/Client/Source/Graphics/CustomVertexLayout.cpp new file mode 100644 index 0000000..aa6be9b --- /dev/null +++ b/Client/Source/Graphics/CustomVertexLayout.cpp @@ -0,0 +1,23 @@ +#include "CustomVertexLayout.h" + +namespace VertexLayout +{ + + void SetupCustomVertexLayout(CustomVertexLayout& info) + { + glBindBuffer(GL_ARRAY_BUFFER, info.buffer); + for (int i = 0; i < info.attributes.size(); ++i) + { + VertexAttributeDescriptor& attr = info.attributes[i]; + glEnableVertexAttribArray(i); + int numCompo = attr.componentNum; + GLenum compoType = VertexAttribute::ConvertAttrFormatToGLFormat(attr.componentFormat); + bool normalized = attr.normalize; + uint stride = attr.stride; + const void* pointer = attr.pointer; + + glVertexAttribPointer(i, numCompo, compoType, normalized ? GL_TRUE : GL_FALSE, stride, pointer); + } + } + +} diff --git a/Client/Source/Graphics/CustomVertexLayout.h b/Client/Source/Graphics/CustomVertexLayout.h new file mode 100644 index 0000000..3b54039 --- /dev/null +++ b/Client/Source/Graphics/CustomVertexLayout.h @@ -0,0 +1,33 @@ +#pragma once + +#include +#include "OpenGL.h" +#include "GPUDataBuffer.h" +#include "VertexAttribute.h" + +struct CustomVertexLayout +{ + GLuint buffer; // ´´½¨Ê±Áô¿Õ + std::vector attributes; + + CustomVertexLayout() + { + int n = buffer; + } + + // ÖØÖÃpointer£¨startOffset£©Îª0 + void RestorePointer() + { + for (int i = 0; i < attributes.size(); ++i) + { + attributes[i].pointer = 0; + } + } +}; + +namespace VertexLayout +{ + + extern void SetupCustomVertexLayout(CustomVertexLayout& layout); + +} diff --git a/Client/Source/Graphics/DefaultVertexLayout.cpp b/Client/Source/Graphics/DefaultVertexLayout.cpp new file mode 100644 index 0000000..a468100 --- /dev/null +++ b/Client/Source/Graphics/DefaultVertexLayout.cpp @@ -0,0 +1,119 @@ +#include "DefaultVertexLayout.h" + +namespace VertexLayout +{ + // ĬÈÏvertex layout + static const int kVertexAttrSize[VertexAttr_Count] = { + 3 * sizeof(float), // position + 3 * sizeof(float), // normal + 4 * sizeof(float), // tangent + 4 * sizeof(byte), // color + 2 * sizeof(float), // uv + 2 * sizeof(float), // uv2 + 2 * sizeof(float), // uv3 + 2 * sizeof(float), // uv4 + }; + + static const int kVertexAttrDimension[VertexAttr_Count] = { + 3, // position + 3, // normal + 4, // tangent + 4, // color + 2, // uv + 2, // uv2 + 2, // uv3 + 2, // uv4 + }; + + bool IsGLVertexAttrNeedNormalized(uint attr/*, uint format*/) + { + if (attr == VertexAttr_Color) + return true; + /* + if (format == VertexAttrFormat_Color || format == VertexAttrFormat_Byte) + return true; + */ + return false; + } + + uint GetDefaultShaderChannelFormat(uint attr) + { + return attr == VertexAttr_Color ? VertexAttrFormat_Color : VertexAttrFormat_Float; + } + + uint32 GetDefaultVertexAttrSize(int attr) + { + return kVertexAttrSize[attr]; + } + + uint GetDefaultVertexAttrDimension(uint attr) + { + return kVertexAttrDimension[attr]; + } + + uint GetDefaultShaderChannelDimension(uint attr) + { + return attr == VertexAttr_Color ? 4 : GetDefaultVertexAttrDimension(attr); + } + + GLenum GetDefaultVertexAttrcomponentFormat(uint attr) + { + uint componentFormat = GetDefaultShaderChannelFormat(attr); + return VertexAttribute::ConvertAttrFormatToGLFormat(componentFormat); + } + + uint32 GetDynamicChunkStride(uint32 vertexAttrMask) + { + uint32 stride = 0; + for (int i = 0; i < vertexAttrMask; ++i) + { + if (vertexAttrMask & Mask(i)) + stride += VertexLayout::GetDefaultVertexAttrSize(i); + } + return stride; + } + + static uint32 sEnabledArrays = 0; + + void SetupDefaultVertexLayout(const DefaultVertexLayout& info) + { + glBindBuffer(GL_ARRAY_BUFFER, info.buffer); + + for (int attrIdx = 0; attrIdx < VertexAttr_Count; ++attrIdx) + { + if (info.enableMask & Mask(attrIdx)) + { + if (!sEnabledArrays & Mask(attrIdx)) + glEnableVertexAttribArray(attrIdx); + int numCompo = info.attributes[attrIdx].componentNum; + GLenum compoType = VertexLayout::GetDefaultVertexAttrcomponentFormat(attrIdx); + bool normalized = VertexLayout::IsGLVertexAttrNeedNormalized(attrIdx); + uint stride = info.attributes[attrIdx].stride; + const void* pointer = info.attributes[attrIdx].pointer; + + glVertexAttribPointer(attrIdx, numCompo, compoType, normalized ? GL_TRUE : GL_FALSE, stride, pointer); + } + else if (sEnabledArrays & Mask(attrIdx)) + glDisableVertexAttribArray(attrIdx); + } + sEnabledArrays = info.enableMask; + } + + void InvalidateVertexInputCache() + { + sEnabledArrays = 0; + for (int attrIdx = 0; attrIdx < VertexAttr_Count; ++attrIdx) + glDisableVertexAttribArray(attrIdx); + } + + // Ë÷Òý±£´æÎª unsgined short (GL_UNSIGNED_SHORT) + uint GetDefaultIndexSize() + { + return sizeof(uint16); + } + GLenum GetDefaultIndexFormat() + { + return GL_UNSIGNED_SHORT; + } + +} diff --git a/Client/Source/Graphics/DefaultVertexLayout.h b/Client/Source/Graphics/DefaultVertexLayout.h new file mode 100644 index 0000000..2222ff1 --- /dev/null +++ b/Client/Source/Graphics/DefaultVertexLayout.h @@ -0,0 +1,55 @@ +#pragma once + +#include + +#include "../Utilities/Type.h" +#include "../Utilities/UtilMacros.h" + +#include "OpenGL.h" +#include "GPUDataBuffer.h" +#include "VertexAttribute.h" + +// ĬÈϵĶ¥µã²¼¾Ö£¬ÊÊÓÃÓÚMeshµ¼ÈëµÄ½á¹û£¬ÒÔ±£³ÖshaderµÄÒ»ÖÂÐÔ +// Èç¹ûÐèÒªÐ޸IJ¼¾Ö,±ÈÈç±à¼­Æ÷UIÖУ¬ÓÃCustomVertexLayout + +// ĬÈϵĶ¥µãÊôÐÔÒÔ¼°Ë³Ðò +enum EVertexAttr +{ + VertexAttr_Position = 0, + VertexAttr_Normal, + VertexAttr_Tangent, + VertexAttr_Color, + VertexAttr_UV, + VertexAttr_UV2, + VertexAttr_UV3, + VertexAttr_UV4, + + VertexAttr_Count +}; + +// GPU²àµÄĬÈ϶¥µãÊôÐÔ +struct DefaultVertexLayout +{ + uint32 enableMask; + GLuint buffer; // vbo»òÕß0(pinned memory) + VertexAttributeDescriptor attributes[VertexAttr_Count]; +}; + +namespace VertexLayout +{ + // iboÎÞÂÛÊÇdefault»¹ÊÇcustom²¼¾Ö¶¼ÊÇshort + uint GetDefaultIndexSize(); + GLenum GetDefaultIndexFormat(); + + uint32 GetDynamicChunkStride(uint32 vertexAttrMask); + bool IsGLVertexAttrNeedNormalized(uint attr); + uint GetDefaultShaderChannelFormat(uint attr); + uint32 GetDefaultVertexAttrSize(int attr); + uint GetDefaultVertexAttrDimension(uint attr); + uint GetDefaultShaderChannelDimension(uint attr); + GLenum GetDefaultVertexAttrComponentType(uint attr); + + void SetupDefaultVertexLayout(const DefaultVertexLayout& info); + void InvalidateVertexInputCache(); + +} diff --git a/Client/Source/Graphics/DeviceDefine.h b/Client/Source/Graphics/DeviceDefine.h new file mode 100644 index 0000000..db1c138 --- /dev/null +++ b/Client/Source/Graphics/DeviceDefine.h @@ -0,0 +1,69 @@ +#ifndef DEVICE_DEFINE_H +#define DEVICE_DEFINE_H + +enum EDeviceEnable +{ + Enable_DepthTest = 1, + Enable_DepthWrite = 1 << 1, + Enable_StencilTest = 1 << 2, + Enable_StencilWrite = 1 << 3, + Enable_Cull = 1 << 4, + Enable_Blend = 1 << 5, + Enable_AntiAliasing = 1 << 6, +}; + +enum EDepthTest +{ + DepthTest_Greater = 1, + DepthTest_GreaterEqual, + DepthTest_Less, + DepthTest_LessEqual, + DepthTest_Equal, + DepthTest_NotEqual, + DepthTest_Always, +}; + +enum EStencilTest { + StencilTest_Always, + StencilTest_Never, + StencilTest_Less, + StencilTest_Equal, + StencilTest_NotEqual, + StencilTest_LessEqual, + StencilTest_Greater, + StencilTest_GreaterEqual, +}; + +enum EStencilOp { + StencilOp_Keep, + StencilOp_Zero, + StencilOp_Replace, + StencilOp_Incr, + StencilOp_IncrWrap, + StencilOp_Decr, + StencilOp_DecrWrap, + StencilOp_Invert, +}; + +enum EDeviceClear +{ + Clear_DepthBuffer = 1, + Clear_StencilBuffer = 1 << 1, + Clear_ColorBuffer = 1 << 2, +}; + +enum ECullFace +{ + Cull_Front = 1, + Cull_Back = 2, + Cull_None = 3, + Cull_All = 4, +}; + +enum EBlendMode +{ + Blend_Additive = 1, + Blend_Substract = 1, +}; + +#endif \ No newline at end of file diff --git a/Client/Source/Graphics/DynamicMesh.h b/Client/Source/Graphics/DynamicMesh.h new file mode 100644 index 0000000..94fef4d --- /dev/null +++ b/Client/Source/Graphics/DynamicMesh.h @@ -0,0 +1,13 @@ +#pragma once +#include "../Utilities/StaticInitiator.h" + +// Ìî³äg_SharedVBOµÄ¶¯Ì¬mesh +class DynamicMesh +{ +public: + DynamicMesh() {}; + virtual ~DynamicMesh() {}; + + virtual void Draw() = 0; + +}; diff --git a/Client/Source/Graphics/DynamicVertexBuffer.cpp b/Client/Source/Graphics/DynamicVertexBuffer.cpp new file mode 100644 index 0000000..8041e30 --- /dev/null +++ b/Client/Source/Graphics/DynamicVertexBuffer.cpp @@ -0,0 +1,260 @@ +#include "DynamicVertexBuffer.h" +#include "CustomVertexLayout.h" + +DynamicVertexBuffer::DynamicVertexBuffer() +{ +} + +DynamicVertexBuffer::~DynamicVertexBuffer() +{ +} + +//------------------------------------------------------------------------------------------------------------ +// Defualt Vertex Layout + +//GetChunk +//-> ReleaseChunk +//-> DrawChunk + +void DynamicVertexBuffer::GetChunk(uint attrsMask, int maxVerts, int maxIndices, EPrimitive primitive, void **out_vb, void **out_ib) +{ + Assert(out_vb && out_ib); + + uint stride = VertexLayout::GetDynamicChunkStride(attrsMask); // data size of single vertex + GetChunk(stride, maxVerts, VertexLayout::GetDefaultIndexSize(), maxIndices, primitive, out_vb, out_ib); + + // default layout + m_CurAttrMask = attrsMask; + m_CurStride = stride; +} + +void DynamicVertexBuffer::DrawChunk() +{ + DefaultVertexLayout vertexArray; + FillDefaultVertexLayout(vertexArray); + + // bind vertex attributes data + VertexLayout::SetupDefaultVertexLayout(vertexArray); + + const void* indexPtr = m_CurIB ? 0 : (m_CurIBData.empty() ? 0 : &m_CurIBData[0]); + + if (m_CurIB) + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_CurIB->GetHandle()); + + GLenum indexFormat = VertexLayout::GetDefaultIndexFormat(); + + switch (m_CurPrimitive) + { + case Primitive_Triangle: + glDrawElements(GL_TRIANGLES, m_CurIndexCount, indexFormat, indexPtr); + break; + case Primitive_Line: + glDrawElements(GL_LINE, m_CurIndexCount, indexFormat, indexPtr); + break; + case Primitive_Point: + glDrawElements(GL_POINT, m_CurIndexCount, indexFormat, indexPtr); + break; + } + + if (m_CurIB) + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + + // End draw + Clean(); +} + +void DynamicVertexBuffer::FillDefaultVertexLayout(DefaultVertexLayout& dst) +{ + const byte* basepointer = m_CurVB ? 0 : &m_CurVBData[0]; + const GLuint buffer = m_CurVB ? m_CurVB->GetHandle() : 0; + + int attrOffsets[VertexAttr_Count] = { 0 }; + { + uint32 curOffset = 0; + for (uint idx = 0; idx < VertexAttr_Count; ++idx) + { + if (m_CurAttrMask & Mask(idx)) + { + attrOffsets[idx] = curOffset; + curOffset += VertexLayout::GetDefaultVertexAttrSize(idx); + } + } + } + + dst.buffer = buffer; + + for (uint32 attrIdx = 0; attrIdx < VertexAttr_Count; ++attrIdx) + { + if (m_CurAttrMask & Mask(attrIdx)) + { + dst.attributes[attrIdx].pointer = basepointer + attrOffsets[attrIdx]; + dst.attributes[attrIdx].componentFormat = VertexLayout::GetDefaultShaderChannelFormat(attrIdx); + dst.attributes[attrIdx].componentNum = VertexLayout::GetDefaultShaderChannelDimension(attrIdx); + dst.attributes[attrIdx].stride = m_CurStride; + + dst.enableMask |= Mask(attrIdx); + } + } +} + +//------------------------------------------------------------------------------------------------------------ +// Custom Vertex Layout + +// ÓÃbuffersizeΪÒÀ¾Ý¾ö¶¨ÓÃvbo»òÕßpinned memory +void DynamicVertexBuffer::GetChunk(uint sizePerVert, uint sizePerIndex, int maxVerts, int maxIndices, EPrimitive primitive, void **out_vb, void **out_ib) +{ + Assert(out_vb && out_ib); + + m_CurStride = sizePerVert; + uint vbufferSize = sizePerVert * maxVerts; + uint ibufferSize = sizePerIndex * maxIndices; + + const bool mapVertexBuffer = vbufferSize >= kDataBufferThreshold; + const bool mapIndexBuffer = ibufferSize >= kDataBufferThreshold; + + GLenum usage = GL_STREAM_DRAW; + + GPU::DataBuffer* vertexBuffer = mapVertexBuffer ? GPU::ClaimBuffer(vbufferSize, usage) : 0; + GPU::DataBuffer* indexBuffer = mapIndexBuffer ? GPU::ClaimBuffer(ibufferSize, usage) : 0; + + if (vertexBuffer && vertexBuffer->GetSize() < vbufferSize) + vertexBuffer->Restore(vbufferSize, usage); + + if (indexBuffer && indexBuffer->GetSize() < ibufferSize) + indexBuffer->Restore(ibufferSize, usage); + + if (!mapVertexBuffer && m_CurVBData.size() < vbufferSize) + m_CurVBData.resize(vbufferSize); + + if (!mapIndexBuffer && m_CurIBData.size() < ibufferSize) + m_CurIBData.resize(ibufferSize); + + const GLenum access = GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT | GL_MAP_FLUSH_EXPLICIT_BIT; + + if (vertexBuffer) + *out_vb = vertexBuffer->MapRange(0, vbufferSize, access); + else + *out_vb = &m_CurVBData[0]; + + if (indexBuffer) + *out_ib = indexBuffer->MapRange(0, ibufferSize, access); + else + *out_ib = &m_CurIBData[0]; + + m_CurVB = vertexBuffer; + m_CurIB = indexBuffer; + + m_CurPrimitive = primitive; +} + +void DynamicVertexBuffer::FillCustomVertexLayout(CustomVertexLayout& dst) +{ + const byte* basepointer = m_CurVB ? 0 : &m_CurVBData[0]; + const GLuint buffer = m_CurVB ? m_CurVB->GetHandle() : 0; + + dst.buffer = buffer; + + for (int i = 0; i < dst.attributes.size(); ++i) + { + int offset = dst.attributes[i].startOffset; + dst.attributes[i].pointer = basepointer + offset; + } +} + +void DynamicVertexBuffer::DrawChunk(CustomVertexLayout& layout) +{ + const byte* basepointer = m_CurVB ? 0 : &m_CurVBData[0]; + const GLuint buffer = m_CurVB ? m_CurVB->GetHandle() : 0; + + FillCustomVertexLayout(layout); + + VertexLayout::SetupCustomVertexLayout(layout); + + layout.RestorePointer(); + + const void* indexPtr = m_CurIB ? 0 : (m_CurIBData.empty() ? 0 : &m_CurIBData[0]); + + if (m_CurIB) + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_CurIB->GetHandle()); + + GLenum indexFormat = VertexLayout::GetDefaultIndexFormat(); + + switch (m_CurPrimitive) + { + case Primitive_Triangle: + glDrawElements(GL_TRIANGLES, m_CurIndexCount, indexFormat, indexPtr); + break; + case Primitive_Line: + glDrawElements(GL_LINES, m_CurIndexCount, indexFormat, indexPtr); + break; + case Primitive_Point: + glDrawElements(GL_POINTS, m_CurIndexCount, indexFormat, indexPtr); + break; + } + + if (m_CurIB) + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + + // End draw + Clean(); +} + +//------------------------------------------------------------------------------------------------------------ +// Both Default and Custom Vertex Layout + +void DynamicVertexBuffer::ReleaseChunk(int actualVerts, int actualIndices) +{ + int actualVBufferSize = m_CurStride * actualVerts; + int actualIBufferSize = VertexLayout::GetDefaultIndexSize() * actualIndices; + + const GLenum usage = GL_STREAM_DRAW; + + if (m_CurVB) + { + m_CurVB->FlushMapedRange(0, actualVBufferSize); + m_CurVB->UnMap(); + } + else if (actualVBufferSize >= kDataBufferThreshold) + { + m_CurVB = GPU::ClaimBuffer(actualVBufferSize, usage); + m_CurVB->RestoreWithData(actualVBufferSize, usage, &m_CurVBData[0]); + } + + if (m_CurIB) + { + m_CurIB->FlushMapedRange(0, actualIBufferSize); + m_CurIB->UnMap(); + } + else if (actualIBufferSize >= kDataBufferThreshold) + { + m_CurIB = GPU::ClaimBuffer(0, usage); + m_CurIB->RestoreWithData(0, usage, &m_CurIBData[0]); + } + + m_CurVertexCount = actualVerts; + m_CurIndexCount = actualIndices; +} + +void DynamicVertexBuffer::Clean() +{ + if (m_CurVB) + { + GPU::ReleaseBuffer(m_CurVB); + m_CurVB = 0; + } + + if (m_CurIB) + { + GPU::ReleaseBuffer(m_CurIB); + m_CurIB = 0; + } + + m_CurPrimitive = Primitive_Triangle; + m_CurAttrMask = 0; + m_CurStride = 0; + m_CurVertexCount = 0; + m_CurIndexCount = 0; + + m_CurVBData.clear(); + m_CurIBData.clear(); +} diff --git a/Client/Source/Graphics/DynamicVertexBuffer.h b/Client/Source/Graphics/DynamicVertexBuffer.h new file mode 100644 index 0000000..ad65d80 --- /dev/null +++ b/Client/Source/Graphics/DynamicVertexBuffer.h @@ -0,0 +1,54 @@ +#pragma once +#include + +#include "../Utilities/UtilMacros.h" + +#include "OpenGL.h" +#include "GPUDataBuffer.h" +#include "DefaultVertexLayout.h" +#include "CustomVertexLayout.h" +#include "Primitive.h" + +// ¶¯Ì¬Ìî³äµÄVBO +class DynamicVertexBuffer +{ +public: + DynamicVertexBuffer(); + ~DynamicVertexBuffer(); + + // default layout + void GetChunk(uint attrs, int maxVerts, int maxIndices, EPrimitive primitive, void **out_vb, void **out_ib); + void DrawChunk(); + + // custom layout + void GetChunk(uint sizePerVert, uint sizePerIndex, int maxVerts, int maxIndices, EPrimitive primitive, void **out_vb, void **out_ib); + void DrawChunk(CustomVertexLayout& layout); + + // common + void ReleaseChunk(int actualVerts, int actualIndices); + +private: + + void FillCustomVertexLayout(CustomVertexLayout& dst); + void FillDefaultVertexLayout(DefaultVertexLayout& dst); + + void Clean(); + + // Èç¹ûÊý¾Ý´óССÓÚÕâ¸öÏÞÖÆ£¬ÓÃÄÚ´æÊý¾Ý£¬¶ø²»ÊÇglBufferData + static const int kDataBufferThreshold = 1024; + + GPU::DataBuffer *m_CurVB; + GPU::DataBuffer *m_CurIB; + + std::vector m_CurVBData; + std::vector m_CurIBData; + + EPrimitive m_CurPrimitive; + + uint m_CurAttrMask; // default layout only + uint m_CurStride; // default layout only + + uint m_CurVertexCount; + uint m_CurIndexCount; + +}; \ No newline at end of file diff --git a/Client/Source/Graphics/FrameBuffer.cpp b/Client/Source/Graphics/FrameBuffer.cpp new file mode 100644 index 0000000..af4d831 --- /dev/null +++ b/Client/Source/Graphics/FrameBuffer.cpp @@ -0,0 +1,12 @@ +#include "FrameBuffer.h" + +// ÓÐЩ°æ±¾µÄOpenGL²»Ö§³Ö°ó¶¨¶à¸öRT +bool FrameBuffer::BindRenderTexture(RenderTexture* rt, int location /* = 0 */) +{ + return false; +} + +bool FrameBuffer::Blit(FrameBuffer* target) +{ + return false; +} diff --git a/Client/Source/Graphics/FrameBuffer.h b/Client/Source/Graphics/FrameBuffer.h new file mode 100644 index 0000000..4b9104b --- /dev/null +++ b/Client/Source/Graphics/FrameBuffer.h @@ -0,0 +1,35 @@ +#ifndef FRAME_BUFFER_H +#define FRAME_BUFFER_H + +#include "OpenGL.h" +#include "RenderTexture.h" + +// Fbo£¬ËùÓа󶨵ÄtextureºÍrenderbufferµÄtarget¶¼ÊǿɶÁдµÄGL_FRAMEBUFFER +class FrameBuffer +{ +public: + enum FrameBufferUsage + { + FrameBufferUsage_None = 0, + FrameBufferUsage_Depth = 1, + FrameBufferUsage_Stencil = 2, + FrameBufferUsage_DepthStencil = 3, + }; + + FrameBuffer(FrameBufferUsage usage, int width, int height); + ~FrameBuffer(); + + bool Blit(FrameBuffer* target); + + bool BindRenderTexture(RenderTexture* rt, int location = 0); + + GET(int, Width, m_Width); + GET(int, Height, m_Height); + +private: + int m_Width, m_Height; + FrameBufferUsage m_Usage; + +}; + +#endif \ No newline at end of file diff --git a/Client/Source/Graphics/GPUDataBuffer.cpp b/Client/Source/Graphics/GPUDataBuffer.cpp new file mode 100644 index 0000000..f5149d9 --- /dev/null +++ b/Client/Source/Graphics/GPUDataBuffer.cpp @@ -0,0 +1,207 @@ +#include + +#include "GPUDataBuffer.h" + +namespace GPU +{ + + // ÐÞ¸ÄbufferÊý¾ÝÒª°ó¶¨µ½Õâ¸öÄ¿±êÉÏ£¬ÆäËûÇé¿öÏÂÓÃGetHandle()°ó¶¨µ½ÆäËûÄ¿±ê + // GL_COPY_READ_BUFFER + static const GLenum kBufferTarget = GL_COPY_WRITE_BUFFER; + + DataBuffer::DataBuffer() + { + glGenBuffers(1, &m_Handle); + m_Size = 0; + } + + DataBuffer::~DataBuffer() + { + glDeleteBuffers(1, &m_Handle); + } + + void DataBuffer::Restore(int size, GLenum usage) + { + RestoreWithData(size, usage, 0); + } + + void DataBuffer::RestoreWithData(int size, GLenum usage, const void* data) + { + glBindBuffer(kBufferTarget, m_Handle); + glBufferData(kBufferTarget, size, data, usage); + glBindBuffer(kBufferTarget, 0); + m_Size = size; + m_Usage = usage; + } + + // glBufferSubData + // glMapBuffer + // glMapBufferRange (best one) + + void DataBuffer::Upload(int offset, int size, const void* data) + { + glBindBuffer(kBufferTarget, m_Handle); + glBufferSubData(kBufferTarget, offset, size, data); + glBindBuffer(kBufferTarget, 0); + } + + void* DataBuffer::Map(uint32 access) + { + glBindBuffer(kBufferTarget, m_Handle); + void* ptr = glMapBuffer(kBufferTarget, access); + glBindBuffer(kBufferTarget, 0); + return ptr; + } + + void* DataBuffer::MapRange(int offset, int size, uint32 access) + { + glBindBuffer(kBufferTarget, m_Handle); + void* ptr = glMapBufferRange(kBufferTarget, offset, size, access); + glBindBuffer(kBufferTarget, 0); + return ptr; + } + + void DataBuffer::FlushMapedRange(int offset, int size) + { + glBindBuffer(kBufferTarget, m_Handle); + glFlushMappedBufferRange(kBufferTarget, offset, size); + glBindBuffer(kBufferTarget, 0); + } + + void DataBuffer::UnMap() + { + glBindBuffer(kBufferTarget, m_Handle); + glUnmapBuffer(kBufferTarget); + glBindBuffer(kBufferTarget, 0); + } + + void DataBuffer::Orphan() + { + glBindBuffer(kBufferTarget, m_Handle); + glBufferData(kBufferTarget, 0, 0, GL_STREAM_DRAW); + glBindBuffer(kBufferTarget, 0); + } + +//--------------------------------------------------------------------------------------- + + static bool IsBufferPoolCreated = false; + + BufferPool::BufferPool() + :m_LiveBuffers() + { + Assert(!IsBufferPoolCreated); + IsBufferPoolCreated = true; + } + + BufferPool::~BufferPool() + { + } + + static const float kBufferAllocateWeight = 10.0f; //! Default weight for buffer allocation from scratch. + static const float kBufferSizeWeightFactor = 1.f / 8096.f; //!< Weight factor for size difference. + static const float kBufferUsageDiffWeight = 8.f; //!< Weight factor for usage difference. + + static int ComputeBufferWeight(DataBuffer* buffer, int desiredSize, GLenum desiredUsage) + { + const int bufferSize = buffer->GetSize(); + const GLenum bufferUsage = buffer->GetUsage(); + + if (bufferSize == 0) + return kBufferAllocateWeight; + + const int sizeDiff = std::abs(bufferSize - desiredSize); + + return float(sizeDiff)*kBufferSizeWeightFactor + ((bufferUsage != desiredUsage) ? kBufferUsageDiffWeight : 0.f); + } + + DataBuffer* BufferPool::ClaimBuffer(int size, GLenum usage) + { + const float maxWeight = kBufferAllocateWeight; + const int maxCandidates = 5; // Number of potential candidates to consider actually. + + const int sizeClass = GetSizeClass(size); + int numCandidates = 0; // Number of potential candidates considered + int bestBufferNdx = -1; + float bestWeight = std::numeric_limits::infinity(); + + for (int idx = 0; idx < m_LiveBuffers[sizeClass].size(); ++idx) + { + DataBuffer* buffer = m_LiveBuffers[sizeClass][idx]; + const float weight = ComputeBufferWeight(buffer, size, usage); + + if (weight < maxWeight && weight < bestWeight) + { + bestWeight = weight; + bestBufferNdx = idx; + ++numCandidates; + } + + if (numCandidates >= maxCandidates) + break; // Do not try other buffers, sorry. + } + + if (bestBufferNdx >= 0) + { + DataBuffer* selectedBuffer = m_LiveBuffers[sizeClass][bestBufferNdx]; + + if (bestBufferNdx + 1 != m_LiveBuffers[sizeClass].size()) + std::swap(m_LiveBuffers[sizeClass][bestBufferNdx], m_LiveBuffers[sizeClass].back()); + m_LiveBuffers[sizeClass].pop_back(); + + return selectedBuffer; + } + else + return new DataBuffer(); + + } + + void BufferPool::ReleaseBuffer(DataBuffer* buffer) + { + InsertToLive(buffer); + } + + void BufferPool::OnEndFrame() + { + UpdatePendingBuffersArray(); + } + + void BufferPool::UpdatePendingBuffersArray() + { + } + + void BufferPool::InsertToLive(DataBuffer* buffer) + { + const int bufferSize = buffer->GetSize(); + const int sizeClass = GetSizeClass(bufferSize); + + m_LiveBuffers[sizeClass].push_back(buffer); + } + + uint BufferPool::GetSizeClass(uint bufferSize) + { + for (int idx = 0; idx < kSizeClassCount; ++idx) + { + if (bufferSize < GetSizeClassLimit(idx)) + return idx; + } + Assert(false); + return 0; + } + + DataBuffer* ClaimBuffer(int size, GLenum usage) + { + return BufferPool::Instance()->ClaimBuffer(size, usage); + } + + void ReleaseBuffer(DataBuffer* buffer) + { + BufferPool::Instance()->ReleaseBuffer(buffer); + } + + int BufferPool::GetSizeClassLimit(int classNdx) + { + // (0, 2^10] 2^11 2^12 2^13 2^14 2^15 INT_MAX + return classNdx + 1 < kSizeClassCount ? (1 << (classNdx*kSizeClassStepLog2 + kSizeClassBaseLog2)) : INT_MAX; + } + +} diff --git a/Client/Source/Graphics/GPUDataBuffer.h b/Client/Source/Graphics/GPUDataBuffer.h new file mode 100644 index 0000000..3d24514 --- /dev/null +++ b/Client/Source/Graphics/GPUDataBuffer.h @@ -0,0 +1,75 @@ +#ifndef GPU_DATABUFFER_H +#define GPU_DATABUFFER_H + +#include + +#include "../Utilities/Type.h" +#include "../Utilities/Singleton.h" +#include "../Utilities/UtilMacros.h" +#include "../Utilities/Assert.h" +#include "OpenGL.h" + +namespace GPU +{ + + class DataBuffer + { + public: + DataBuffer(); + ~DataBuffer(); + + void Upload(int offset, int size, const void* data); + void* Map(uint32 access); + void* MapRange(int offset, int size, uint32 access); // ÐÔÄÜ×î¼Ñ + void FlushMapedRange(int offset, int size); + + void UnMap(); + + void Orphan(); + + void Restore(int size, GLenum usage); + void RestoreWithData(int size, GLenum usage, const void* data); + + GET(int, Size, m_Size); + GET(GLenum, Usage, m_Usage); + GET(GLuint, Handle, m_Handle); + + private: + friend class BufferPool; + + GLuint m_Handle; + int m_Size; + GLenum m_Usage; + }; + + class BufferPool : public Singleton + { + public: + BufferPool(); + ~BufferPool(); + + DataBuffer* ClaimBuffer(int size, GLenum usage); + void ReleaseBuffer(DataBuffer* buffer); + + void OnEndFrame(); + + private: + static const int kSizeClassBaseLog2 = 10; + static const int kSizeClassStepLog2 = 1; + static const int kSizeClassCount = 7; + + int GetSizeClassLimit(int classNdx); + void UpdatePendingBuffersArray(); + void InsertToLive(DataBuffer* buffer); + uint GetSizeClass(uint bufferSize); + + std::vector m_LiveBuffers[kSizeClassCount]; + + }; + + DataBuffer* ClaimBuffer(int size = 0, GLenum usage = GL_ARRAY_BUFFER); + void ReleaseBuffer(DataBuffer* buffer); + +} + +#endif \ No newline at end of file diff --git a/Client/Source/Graphics/GfxDevice.cpp b/Client/Source/Graphics/GfxDevice.cpp new file mode 100644 index 0000000..231ee71 --- /dev/null +++ b/Client/Source/Graphics/GfxDevice.cpp @@ -0,0 +1,169 @@ +#include +#include "GfxDevice.h" +#include "../Math/Math.h" + +static bool deviceInited = false; +// +//static const std::vector s_AvailableTextureUnitPreset = {0,1,2,3,4,5,6,7}; // ×î¶àÖ§³Ö8¸öÌùͼ +//static std::vector s_TextureUnitBucket = s_AvailableTextureUnitPreset; + +static const int kMaxAvailableTextureUnitCount = 8; // ×î¶àÖ§³Ö8¸öÌùͼ +static int s_CurAvailableTextureUnit = 0; + +static int ClaimTextureUnit() +{ + int unit = s_CurAvailableTextureUnit; + s_CurAvailableTextureUnit = (s_CurAvailableTextureUnit + 1) % kMaxAvailableTextureUnitCount; + return unit; +} + +GfxDevice g_GfxDevice; + +GfxDevice::GfxDevice() +{ + Assert(!deviceInited); + deviceInited = true; +} + +GfxDevice::~GfxDevice() +{ +} + +void GfxDevice::Initialize(GfxDeviceSetting setting) +{ +} + +void GfxDevice::Enable(EDeviceEnable enabled) +{ + +} + +void GfxDevice::Disable(EDeviceEnable enabled) +{ + +} + +void GfxDevice::IsEnable(uint flag) +{ + +} + +void GfxDevice::SetDepthTest(EDepthTest testing) +{ + +} + +void GfxDevice::SetCullFace(ECullFace face) +{ + +} + +void GfxDevice::SetStencilMask(byte stencilMask) +{ + +} + +void GfxDevice::SetStencilOp(EStencilOp op) +{ + +} + +void GfxDevice::SetAntiAliasing(int level /*= 0*/) +{ + +} + +void GfxDevice::Clear(int clearFlag) +{ + +} + +void GfxDevice::UseShader(Shader* shader, int idx) +{ + if (shader == NULL) + return; + + GLuint id = shader->GetID(); + if (id == 0) + return; + + glUseProgram(id); + + shader->ExecuteCommand(); + + m_Shader.shader = shader; +} + +void GfxDevice::UnuseShader() +{ + if (m_Shader) + { + m_Shader.shader = NULL; + } + glUseProgram(0); +} + +void GfxDevice::SetUniformVec2(const char* name, Vector2f vec2) +{ + if (!m_Shader) + return; + GLint loc = glGetUniformLocation(m_Shader.GetID(), name); + glUniform2f(loc, vec2.x, vec2.y); +} + +void GfxDevice::SetUniformVec3(const char* name, Vector3f vec3) +{ + if (!m_Shader) + return; + GLint loc = glGetUniformLocation(m_Shader.GetID(), name); + glUniform3f(loc, vec3.x, vec3.y, vec3.z); +} + +void GfxDevice::SetUniformVec4(const char* name, Vector4f vec4) +{ + if (!m_Shader) + return; + GLint loc = glGetUniformLocation(m_Shader.GetID(), name); + glUniform4f(loc, vec4.x, vec4.y, vec4.z, vec4.w); +} + +void GfxDevice::SetUniformMat4(const char* name, Matrix44 mat4) +{ + if (!m_Shader) + return; + GLint loc = glGetUniformLocation(m_Shader.GetID(), name); + glUniformMatrix4fv(loc, 1, GL_TRUE, &mat4.m[0][0]); +} + +void GfxDevice::SetUniformTexture(const char* name, Texture* texture) +{ + int texUnit = ClaimTextureUnit(); + glActiveTexture(GL_TEXTURE0 + texUnit); + glBindTexture(GL_TEXTURE_2D, texture->GetGpuID()); + + GLint loc = glGetUniformLocation(m_Shader.GetID(), name); + glUniform1i(loc, texUnit); +} + +void GfxDevice::BeginFrame() +{ + m_IsInsideFrame = true; + +} + +void GfxDevice::EndFrame() +{ + //GPU::BufferPool::Instance()->OnEndFrame(); + + m_IsInsideFrame = false; +} + +void GfxDevice::PresentFrame() +{ +// swap buffers +} + +bool GfxDevice::IsInsideFrame() +{ + return m_IsInsideFrame; +} diff --git a/Client/Source/Graphics/GfxDevice.h b/Client/Source/Graphics/GfxDevice.h new file mode 100644 index 0000000..d81d574 --- /dev/null +++ b/Client/Source/Graphics/GfxDevice.h @@ -0,0 +1,109 @@ +#ifndef DEVICE_H +#define DEVICE_H +#include "../Math/Math.h" + +#include "../Utilities/Type.h" +#include "../Utilities/Assert.h" +#include "../Graphics/Shader.h" +#include "../Math/Vector2.hpp" +#include "../Math/Vector3.hpp" +#include "../Math/Vector4.hpp" +#include "../Math/Matrix44.h" + +#include "Shader.h" +#include "Texture.h" +#include "DeviceDefine.h" +#include "VertexBuffer.h" +#include "DynamicVertexBuffer.h" +#include "Color.h" + +struct GfxDeviceSetting +{ + ETextureFilterMode filterMode; // ĬÈϵÄÌùͼ¹ýÂËģʽ + ETextureWrapMode wrapMode; // ĬÈϵÄÌùͼƽÆÌģʽ +}; + +// µ±Ç°°ó¶¨µÄshader +struct ShaderState +{ + Shader* shader; + operator bool() + { + return shader != NULL; + } + GLuint GetID() { + if (shader == nullptr) + return 0; + GLint id = shader->GetID(); + return id; + } +}; + +// ¶ÔäÖȾÏà¹ØAPIµÄ·â×° +class GfxDevice +{ +public: + GfxDevice(); + ~GfxDevice(); + + void Initialize(GfxDeviceSetting setting); + + void Enable(EDeviceEnable enabled); + void Disable(EDeviceEnable enabled); + void IsEnable(uint flag); + + void SetDepthTest(EDepthTest testing); + void SetCullFace(ECullFace face); + void SetStencilMask(byte stencilMask); + void SetStencilOp(EStencilOp op); + + void SetAntiAliasing(int level = 0); + + void Clear(int clearFlag); + + void UseShader(Shader* shader, int idx); + void UnuseShader(); + void SetUniformVec2(const char* name, Vector2f vec2); + void SetUniformVec3(const char* name, Vector3f vec3); + void SetUniformVec4(const char* name, Vector4f vec4); + void SetUniformMat4(const char* name, Matrix44 mat4); + void SetUniformTexture(const char* name, Texture* texture); + + void BeginFrame(); + void EndFrame(); + void PresentFrame(); + + bool IsInsideFrame(); + + DynamicVertexBuffer* GetSharedVBO() { return &m_DynamicVBO; } + + GET_SET(Color, ClearColor, m_ClearColor); + GET_SET(ETextureFilterMode, DefaultFilterMode, m_DefaultFilterMode); + GET_SET(ETextureWrapMode, DefaultWrapMode, m_DefaultWrapMode); + +private: + bool m_IsInsideFrame; + + // äÖȾ״̬ + uint m_EnableFlag; + Color m_ClearColor; + EDepthTest m_DepthTest; + EStencilTest m_StencilTest; + EStencilOp m_StencilOp; + byte m_StencilMask; + + ShaderState m_Shader; // µ±Ç°°ó¶¨µÄshader + + // ÌùͼĬÈÏÉèÖà + ETextureFilterMode m_DefaultFilterMode; + ETextureWrapMode m_DefaultWrapMode; + + DynamicVertexBuffer m_DynamicVBO; // ¹²ÏíµÄVBO£¬ÓÃÀ´×öÁ¢¼´äÖȾ + +}; + +extern GfxDevice g_GfxDevice; + +#define g_SharedVBO (*g_GfxDevice.GetSharedVBO()) + +#endif \ No newline at end of file diff --git a/Client/Source/Graphics/GlyphAtlas.cpp b/Client/Source/Graphics/GlyphAtlas.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Graphics/GlyphAtlas.h b/Client/Source/Graphics/GlyphAtlas.h new file mode 100644 index 0000000..b0ab858 --- /dev/null +++ b/Client/Source/Graphics/GlyphAtlas.h @@ -0,0 +1,6 @@ +#ifndef TEXT_ATLAS_H +#define TEXT_ATLAS_H + + + +#endif \ No newline at end of file diff --git a/Client/Source/Graphics/ImageData.cpp b/Client/Source/Graphics/ImageData.cpp new file mode 100644 index 0000000..8e2e4bf --- /dev/null +++ b/Client/Source/Graphics/ImageData.cpp @@ -0,0 +1,2 @@ +#include "ImageData.h" + diff --git a/Client/Source/Graphics/ImageData.h b/Client/Source/Graphics/ImageData.h new file mode 100644 index 0000000..9ebc738 --- /dev/null +++ b/Client/Source/Graphics/ImageData.h @@ -0,0 +1,39 @@ +#ifndef IMAGE_DATA_H +#define IMAGE_DATA_H + +#include + +enum EPixelFormat +{ + PixelFormat_RGBA, + PixelFormat_RGB, + PixelFormat_R, + PixelFormat_RG, + PixelFormat_BGR, + PixelFormat_BGRA +}; + +enum EPixelElementType +{ + PixelType_UNSIGNED_BYTE, + PixelType_UNSIGNED_INT, + PixelType_BYTE, + PixelType_INT, + PixelType_FLOAT, +}; + +// ͼƬÏñËØÊý¾Ý +class ImageData +{ +public: + ImageData() + { + } + + void* pixels; // ÏñËØÊý¾Ý£¬¸ñʽºÍÀàÐͲο¼ http://docs.gl/gl3/glTexImage2D pixel dataµÄformatºÍtype + EPixelFormat format; + EPixelElementType type; + int width, height; +}; + +#endif \ No newline at end of file diff --git a/Client/Source/Graphics/OpenGL.cpp b/Client/Source/Graphics/OpenGL.cpp new file mode 100644 index 0000000..9ed2e50 --- /dev/null +++ b/Client/Source/Graphics/OpenGL.cpp @@ -0,0 +1,7 @@ +#include "OpenGL.h" + +#pragma comment(lib, "opengl32.lib") + +std::string g_sharedGLErrorMsg = ""; + + diff --git a/Client/Source/Graphics/OpenGL.h b/Client/Source/Graphics/OpenGL.h new file mode 100644 index 0000000..d93fb5a --- /dev/null +++ b/Client/Source/Graphics/OpenGL.h @@ -0,0 +1,41 @@ +#ifndef OPENGL_H +#define OPENGL_H + +#include "glad/glad.h" +#include +#include + +//http://docs.gl/gl3/glClear + +#define CheckGLError(action)\ +if(true){ \ + GLenum error; \ + while ((error = glGetError()) != GL_NO_ERROR) { \ + action \ + } \ +} + +#define WipeGLError() \ +if(true){\ + GLenum error; \ + while ((error = glGetError()) != GL_NO_ERROR) { \ + throw GLException(error); \ + } \ +} + +extern std::string g_sharedGLErrorMsg; + +class GLException : public std::exception +{ +public: + GLException(const char* what) + : std::exception(what) + {} + GLException(int glError) + { + g_sharedGLErrorMsg = std::to_string(glError); + std::exception(g_sharedGLErrorMsg.c_str()); + } +}; + +#endif \ No newline at end of file diff --git a/Client/Source/Graphics/Point.cpp b/Client/Source/Graphics/Point.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Graphics/Point.h b/Client/Source/Graphics/Point.h new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Graphics/PolyLine.cpp b/Client/Source/Graphics/PolyLine.cpp new file mode 100644 index 0000000..911b3e5 --- /dev/null +++ b/Client/Source/Graphics/PolyLine.cpp @@ -0,0 +1,9 @@ +#include "PolyLine.h" +#include "Color.h" +#include "../Math/Math.h" + +struct PolyLineVBOLayout +{ + Vector3f position; + Color32 color; +}; diff --git a/Client/Source/Graphics/PolyLine.h b/Client/Source/Graphics/PolyLine.h new file mode 100644 index 0000000..816d18e --- /dev/null +++ b/Client/Source/Graphics/PolyLine.h @@ -0,0 +1,18 @@ +#ifndef POLY_LINE_H +#define POLY_LINE_H + +#include "../Math/Vector3.hpp" + +class PolyLine +{ +public: + PolyLine(); + ~PolyLine(); + + void Draw(); + +private: + +}; + +#endif \ No newline at end of file diff --git a/Client/Source/Graphics/Primitive.h b/Client/Source/Graphics/Primitive.h new file mode 100644 index 0000000..6636221 --- /dev/null +++ b/Client/Source/Graphics/Primitive.h @@ -0,0 +1,8 @@ +#pragma once + +enum EPrimitive +{ + Primitive_Triangle = 1, + Primitive_Line = 2, + Primitive_Point = 3, +}; diff --git a/Client/Source/Graphics/Quad.cpp b/Client/Source/Graphics/Quad.cpp new file mode 100644 index 0000000..40c896d --- /dev/null +++ b/Client/Source/Graphics/Quad.cpp @@ -0,0 +1,62 @@ +#include "../Graphics/GfxDevice.h" +#include "../Math/Math.h" +#include "../Math/Math.h" + +#include "Quad.h" + +struct QuadVBOLayout +{ + Vector3f position; + Vector2f uv; +}; + +static CustomVertexLayout layout; + +InitializeStaticVariables([]() { + VertexAttributeDescriptor POSITION = VertexAttributeDescriptor(0, 3, VertexAttrFormat_Float, sizeof(QuadVBOLayout)); + VertexAttributeDescriptor UV = VertexAttributeDescriptor(sizeof(Vector3f), 2, VertexAttrFormat_Float, sizeof(QuadVBOLayout)); + + layout.attributes.push_back(POSITION); + layout.attributes.push_back(UV); +}); + +void Quad::Draw() +{ + const int nVerts = 4; + const int nIndices = 6; + + float pos[] = { + m_Left, m_Bottom, 0, // left-bottom + m_Right, m_Bottom, 0, // right-bottom + m_Right, m_Top, 0, // right-top + m_Left, m_Top, 0, // top-left + }; + float uv[] = { + 0, 0, + 1, 0, + 1, 1, + 0, 1, + }; + int indices[] = { + 0, 1, 3, // right-top + 1, 2, 3, // left-bottom + }; + + uint8* vb; + uint16* ib; + + g_SharedVBO.GetChunk(sizeof(QuadVBOLayout), sizeof(uint16), 4, 6, Primitive_Triangle, (void**)&vb, (void**)&ib); + + QuadVBOLayout* dst = (QuadVBOLayout*)vb; + for (int i = 0; i < nVerts; ++i) + { + dst[i].position.Set(pos[3 * i], pos[3 * i + 1], pos[3 * i + 2]); + dst[i].uv.Set(uv[2 * i], uv[2 * i + 1]); + } + + for (int i = 0; i < nIndices; ++i) + ib[i] = indices[i]; + + g_SharedVBO.ReleaseChunk(4, 6); + g_SharedVBO.DrawChunk(layout); +} diff --git a/Client/Source/Graphics/Quad.h b/Client/Source/Graphics/Quad.h new file mode 100644 index 0000000..ee6c5be --- /dev/null +++ b/Client/Source/Graphics/Quad.h @@ -0,0 +1,26 @@ +#ifndef QUAD_H +#define QUAD_H + +#include "../Utilities/UtilMacros.h" +#include "DynamicMesh.h" + +class Quad : public DynamicMesh +{ +public: + Quad(float l, float r, float t, float b); + + void Set(float l, float r, float t, float b); + + GET_SET(float, Left, m_Left); + GET_SET(float, Right, m_Right); + GET_SET(float, Top, m_Top); + GET_SET(float, Bottom, m_Bottom); + + void Draw() override; + +private: + float m_Left, m_Right, m_Top, m_Bottom; + +}; + +#endif \ No newline at end of file diff --git a/Client/Source/Graphics/RenderCommands.cpp b/Client/Source/Graphics/RenderCommands.cpp new file mode 100644 index 0000000..336bf20 --- /dev/null +++ b/Client/Source/Graphics/RenderCommands.cpp @@ -0,0 +1,9 @@ +#include "RenderCommands.h" + +void ReleaseRenderCommandGroup(RenderCommandGroup& group) +{ + for (int i = 0; i < group.size(); ++i) + { + delete group[i]; + } +} diff --git a/Client/Source/Graphics/RenderCommands.h b/Client/Source/Graphics/RenderCommands.h new file mode 100644 index 0000000..f66b4e2 --- /dev/null +++ b/Client/Source/Graphics/RenderCommands.h @@ -0,0 +1,164 @@ +#pragma once +#include "OpenGL.h" +#include + +struct RenderCommand +{ + virtual void Execute() = 0; +}; + +typedef std::vector RenderCommandGroup; +void ReleaseRenderCommandGroup(RenderCommandGroup& group); + +// Cull Off|Front|Back|Both +struct Cmd_Cull : RenderCommand +{ + enum ECullFace { + Cull_Disable, + Cull_Front, + Cull_Back, + Cull_Both, + }; + + ECullFace cull; + + void Execute() override + { + if (cull == ECullFace::Cull_Disable) + { + glDisable(GL_CULL_FACE); + return; + } + glEnable(GL_CULL_FACE); + switch (cull) + { + case ECullFace::Cull_Front: glCullFace(GL_FRONT); break; + case ECullFace::Cull_Back: glCullFace(GL_BACK); break; + case ECullFace::Cull_Both: glCullFace(GL_FRONT_AND_BACK); break; + } + } +}; + +// Blend Off +// Blend +struct Cmd_Blend : RenderCommand +{ + enum EBlend + { + Blend_Zero, // 0 + Blend_One, // 1 + Blend_Src_Color, // æºé¢œè‰²å‘é‡C¯source + Blend_One_Minus_Src_Color, // 1−C¯source + Blend_Dst_Color, // 目标颜色å‘é‡C¯destination + Blend_One_Minus_Dst_Color, // 1−C¯destination + Blend_Src_Alpha, // C¯sourceçš„alpha值 + Blend_One_Minus_Src_Alpha, // 1− C¯sourceçš„alpha值 + Blend_Dst_Alpha, // C¯destinationçš„alpha值 + Blend_One_Minus_Dst_Alpha, // 1− C¯destinationçš„alpha值 + Blend_Constant_Color, // 常颜色å‘é‡C¯constant + Blend_One_Minus_Constant_Color, // 1−C¯constant + Blend_Constant_Alpha, // C¯constantçš„alpha值 + Blend_One_Minus_Constant_Alpha, // 1− C¯constantçš„alpha值 + }; + + bool enable; + EBlend srcFac; + EBlend dstFac; + + void Execute() override + { + if (!enable) + glDisable(GL_BLEND); + glEnable(GL_BLEND); + glBlendEquationSeparate(GL_FUNC_ADD, GL_FUNC_ADD); + GLenum src, dst; + switch (srcFac) + { + case EBlend::Blend_Zero: src = GL_ZERO; break; + case EBlend::Blend_One: src = GL_ONE; break; + case EBlend::Blend_Src_Color: src = GL_SRC_COLOR; break; + case EBlend::Blend_One_Minus_Src_Color: src = GL_ONE_MINUS_SRC_COLOR; break; + case EBlend::Blend_Dst_Color: src = GL_DST_COLOR; break; + case EBlend::Blend_One_Minus_Dst_Color: src = GL_ONE_MINUS_DST_COLOR; break; + case EBlend::Blend_Src_Alpha: src = GL_SRC_ALPHA; break; + case EBlend::Blend_One_Minus_Src_Alpha: src = GL_ONE_MINUS_SRC_ALPHA; break; + case EBlend::Blend_Dst_Alpha: src = GL_DST_ALPHA; break; + case EBlend::Blend_One_Minus_Dst_Alpha: src = GL_ONE_MINUS_DST_ALPHA; break; + case EBlend::Blend_Constant_Color: src = GL_CONSTANT_COLOR; break; + case EBlend::Blend_One_Minus_Constant_Color: src = GL_ONE_MINUS_CONSTANT_COLOR; break; + case EBlend::Blend_Constant_Alpha: src = GL_CONSTANT_ALPHA; break; + case EBlend::Blend_One_Minus_Constant_Alpha: src = GL_ONE_MINUS_CONSTANT_ALPHA; break; + } + switch (dstFac) + { + case EBlend::Blend_Zero: dst = GL_ZERO; break; + case EBlend::Blend_One: dst = GL_ONE; break; + case EBlend::Blend_Src_Color: dst = GL_SRC_COLOR; break; + case EBlend::Blend_One_Minus_Src_Color: dst = GL_ONE_MINUS_SRC_COLOR; break; + case EBlend::Blend_Dst_Color: dst = GL_DST_COLOR; break; + case EBlend::Blend_One_Minus_Dst_Color: dst = GL_ONE_MINUS_DST_COLOR; break; + case EBlend::Blend_Src_Alpha: dst = GL_SRC_ALPHA; break; + case EBlend::Blend_One_Minus_Src_Alpha: dst = GL_ONE_MINUS_SRC_ALPHA; break; + case EBlend::Blend_Dst_Alpha: dst = GL_DST_ALPHA; break; + case EBlend::Blend_One_Minus_Dst_Alpha: dst = GL_ONE_MINUS_DST_ALPHA; break; + case EBlend::Blend_Constant_Color: dst = GL_CONSTANT_COLOR; break; + case EBlend::Blend_One_Minus_Constant_Color: dst = GL_ONE_MINUS_CONSTANT_COLOR; break; + case EBlend::Blend_Constant_Alpha: dst = GL_CONSTANT_ALPHA; break; + case EBlend::Blend_One_Minus_Constant_Alpha: dst = GL_ONE_MINUS_CONSTANT_ALPHA; break; + } + glBlendFunc(src, dst); + } +}; + +// DepthTest Off| +struct Cmd_DepthTest : RenderCommand +{ + enum EDepthTest + { + DepthTest_Off, // ä¸è¿›è¡Œæ·±åº¦æµ‹è¯• + DepthTest_Always, // 永远通过测试 + DepthTest_Never, // 永远ä¸é€šè¿‡æµ‹è¯• + DepthTest_Less, // 在片段深度值å°äºŽç¼“冲区的深度时通过测试 + DepthTest_Equal, // 在片段深度值等于缓冲区的深度时通过测试 + DepthTest_Lequal, // 在片段深度值å°äºŽç­‰äºŽç¼“冲区的深度时通过测试 + DepthTest_Greater, // 在片段深度值大于缓冲区的深度时通过测试 + DepthTest_Notequal, // 在片段深度值ä¸ç­‰äºŽç¼“冲区的深度时通过测试 + DepthTest_Gequal, // 在片段深度值大于等于缓冲区的深度时通过测试 + }; + + EDepthTest test; + + void Execute() override + { + if (test == EDepthTest::DepthTest_Off) + { + glDisable(GL_DEPTH_TEST); + return; + } + glEnable(GL_DEPTH_TEST); + switch (test) + { + case EDepthTest::DepthTest_Always: glDepthFunc(GL_ALWAYS); break; + case EDepthTest::DepthTest_Never: glDepthFunc(GL_NEVER); break; + case EDepthTest::DepthTest_Less: glDepthFunc(GL_LESS); break; + case EDepthTest::DepthTest_Equal: glDepthFunc(GL_EQUAL); break; + case EDepthTest::DepthTest_Lequal: glDepthFunc(GL_LEQUAL); break; + case EDepthTest::DepthTest_Greater: glDepthFunc(GL_GREATER); break; + case EDepthTest::DepthTest_Notequal: glDepthFunc(GL_NOTEQUAL); break; + case EDepthTest::DepthTest_Gequal: glDepthFunc(GL_GEQUAL); break; + } + } +}; + +// DepthWrite Off|On +struct Cmd_DepthWrite : RenderCommand +{ + bool write; + void Execute() override + { + if(write) + glDepthMask(GL_TRUE); + else + glDepthMask(GL_FALSE); + } +}; diff --git a/Client/Source/Graphics/RenderTexture.cpp b/Client/Source/Graphics/RenderTexture.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Graphics/RenderTexture.h b/Client/Source/Graphics/RenderTexture.h new file mode 100644 index 0000000..a501f50 --- /dev/null +++ b/Client/Source/Graphics/RenderTexture.h @@ -0,0 +1,16 @@ +#ifndef RENDER_TEXTURE_H +#define RENDER_TEXTURE_H + +#include "Texture.h" + +// ÀëÆÁäÖȾ +class RenderTexture : public Texture +{ +public: + RenderTexture(ETextureFormat format); + +}; + +RenderTexture* CreateRenderTexture(int width, int height, ETextureFormat format); + +#endif \ No newline at end of file diff --git a/Client/Source/Graphics/Shader.cpp b/Client/Source/Graphics/Shader.cpp new file mode 100644 index 0000000..899578b --- /dev/null +++ b/Client/Source/Graphics/Shader.cpp @@ -0,0 +1,154 @@ +#include + +#include "../Debug/log.h" +#include "Shader.h" +#include "OpenGL.h" +#include "ShaderCompiler.h" + +using namespace std; + +std::string shaderError = ""; +void checkCompileshaderErrorors(GLuint shader, std::string type) +{ + GLint success; + GLchar infoLog[1024]; + if (type != "PROGRAM") + { + glGetShaderiv(shader, GL_COMPILE_STATUS, &success); + if (!success) + { + glGetShaderInfoLog(shader, 1024, NULL, infoLog); + shaderError = "ERROR::SHADER_COMPILATION_ERROR of type: " + type + "\n" + infoLog; + } + } + else + { + glGetProgramiv(shader, GL_LINK_STATUS, &success); + if (!success) + { + glGetProgramInfoLog(shader, 1024, NULL, infoLog); + shaderError = "ERROR::SHADER_COMPILATION_ERROR of type: " + type + "\n" + infoLog; + } + } + if (!success) + { + throw ShaderCompileExecption(shaderError.c_str()); + } +} + +Shader::Shader() +{ +} + +Shader::Shader(std::string& glsllShader) +{ + // stlµÄstring»áÔÚ´óС³¬¹ýãÐÖµµÄÇé¿öÏÂÔÚÕ»Àï·ÖÅ䣬²¢ÓÃRAII±£Ö¤ÊÍ·Å + std::string vsh ; + std::string fsh ; + try + { + GLSLCompiler::Compile(glsllShader, vsh, fsh, m_Commands); + } + catch (GLSLCompileException& e) + { + ReleaseRenderCommandGroup(m_Commands); + throw ShaderCompileExecption(e.what()); + } + CompileProgram(vsh.c_str(), fsh.c_str()); +} + +Shader::Shader(const char* vert, const char* frag) +{ + CompileProgram(vert, frag); +} + +void Shader::CompileProgram(const char* vert, const char* frag, bool keepSrc) +{ + const char* vertCode = vert; + const char* fragCode = frag; + // vertex shader + m_VertID = glCreateShader(GL_VERTEX_SHADER); + glShaderSource(m_VertID, 1, &vertCode, NULL);//ΪÁËÖ§³ÖÖÐÎÄ×¢ÊÍ£¬³¤¶È´«NULL + glCompileShader(m_VertID); + checkCompileshaderErrorors(m_VertID, "VERTEX"); + // fragment Shader + m_FragID = glCreateShader(GL_FRAGMENT_SHADER); + glShaderSource(m_FragID, 1, &fragCode, NULL); + glCompileShader(m_FragID); + checkCompileshaderErrorors(m_FragID, "FRAGMENT"); + // create program + m_ProgramID = glCreateProgram(); + glAttachShader(m_ProgramID, m_VertID); + glAttachShader(m_ProgramID, m_FragID); + glLinkProgram(m_ProgramID); + checkCompileshaderErrorors(m_ProgramID, "PROGRAM"); +} + +Shader::~Shader() +{ + glDeleteProgram(m_ProgramID); + glDeleteShader(m_VertID); + glDeleteShader(m_FragID); +} + +void Shader::ReCompile(std::string& vert, std::string frag) +{ + const char* vertCode = vert.c_str(); + const char* fragCode = frag.c_str(); + // vertex shader + glShaderSource(m_VertID, 1, &vertCode, NULL); + glCompileShader(m_VertID); + checkCompileshaderErrorors(m_VertID, "VERTEX"); + // fragment Shader + glShaderSource(m_FragID, 1, &fragCode, NULL); + glCompileShader(m_FragID); + checkCompileshaderErrorors(m_FragID, "FRAGMENT"); + // create program + glAttachShader(m_ProgramID, m_VertID); + glAttachShader(m_ProgramID, m_FragID); + glLinkProgram(m_ProgramID); + checkCompileshaderErrorors(m_FragID, "PROGRAM"); +} + +void Shader::ReCompileVert(std::string& vert) +{ + glDeleteShader(m_VertID); + const char* vertCode = vert.c_str(); + // vertex shader + glShaderSource(m_VertID, 1, &vertCode, NULL); + glCompileShader(m_VertID); + checkCompileshaderErrorors(m_VertID, "VERTEX"); + // create program + glAttachShader(m_ProgramID, m_VertID); + glAttachShader(m_ProgramID, m_FragID); + glLinkProgram(m_ProgramID); + checkCompileshaderErrorors(m_FragID, "PROGRAM"); +} + +void Shader::ReCompileFrag(std::string frag) +{ + glDeleteShader(m_FragID); + const char* fragCode = frag.c_str(); + // fragment Shader + glShaderSource(m_FragID, 1, &fragCode, NULL); + glCompileShader(m_FragID); + checkCompileshaderErrorors(m_FragID, "FRAGMENT"); + // create program + glAttachShader(m_ProgramID, m_VertID); + glAttachShader(m_ProgramID, m_FragID); + glLinkProgram(m_ProgramID); + checkCompileshaderErrorors(m_FragID, "PROGRAM"); +} + +bool Shader::IsValid() +{ + return m_ProgramID != 0; +} + +void Shader::ExecuteCommand() +{ + for (int i = 0; i < m_Commands.size(); ++i) + { + m_Commands[i]->Execute(); + } +} \ No newline at end of file diff --git a/Client/Source/Graphics/Shader.h b/Client/Source/Graphics/Shader.h new file mode 100644 index 0000000..8d5fc0e --- /dev/null +++ b/Client/Source/Graphics/Shader.h @@ -0,0 +1,47 @@ +#pragma once +#include +#include +#include "OpenGL.h" +#include "../Utilities/UtilMacros.h" +#include "../Utilities/Assert.h" +#include "../Debug/Log.h" +#include "RenderCommands.h" + +// ×ÅÉ«Æ÷³ÌÐò +class Shader +{ +public: + Shader()/*throw(ShaderCompileExecption)*/; + Shader(std::string& glsllShader)/*throw(ShaderCompileExecption)*/; + Shader(const char* vert, const char* frag)/*throw(ShaderCompileExecption)*/; + ~Shader(); + + void ReCompile(std::string& vert, std::string frag)/*throw(ShaderCompileExecption)*/; + void ReCompileVert(std::string& vert)/*throw(ShaderCompileExecption)*/; + void ReCompileFrag(std::string frag)/*throw(ShaderCompileExecption)*/; + + bool IsValid(); + + void ExecuteCommand(); + + GET(GLint, ID, m_ProgramID); + +private: + void CompileProgram(const char* vert, const char* frag, bool keepSrc = false); + + RenderCommandGroup m_Commands; // äÖȾǰµÄ״̬ÉèÖà + + GLint m_ProgramID; + GLint m_FragID; + GLint m_VertID; + +}; + +class ShaderCompileExecption : public std::exception +{ +public: + ShaderCompileExecption(const char* what) + : std::exception(what) + { + } +}; diff --git a/Client/Source/Graphics/ShaderCompiler.cpp b/Client/Source/Graphics/ShaderCompiler.cpp new file mode 100644 index 0000000..362b28e --- /dev/null +++ b/Client/Source/Graphics/ShaderCompiler.cpp @@ -0,0 +1,347 @@ +#include "ShaderCompiler.h" +#include +#include + +using namespace std; + +static const char* VSH_BEGIN = "VSH_BEGIN"; +static const char* VSH_END = "VSH_END"; +static const char* FSH_BEGIN = "FSH_BEGIN"; +static const char* FSH_END = "FSH_END"; +static const char* CMD_BEGIN = "CMD_BEGIN"; +static const char* CMD_END = "CMD_END"; + +std::string s_CompileError = ""; + +// GLSL·ÖΪËIJ¿·Ö +// * CMD_BEGIN ºÍ CMD_END Ö®¼äµÄÃüÁî +// * VERTEX_SHADER_BEGIN ºÍ VERTEX_SHADER_ENDÖ®¼äµÄ¶¥µã×ÅÉ«Æ÷ +// * FRAGMENT_SHADER_BEGIN ºÍ FRAGMENT_SHADER_ENDÖ®¼äµÄƬ¶Î×ÅÉ«Æ÷ +// * ÈýÕßÖ®ÍâµÄ¹«¹²²¿·Ö +void GLSLCompiler::Compile(std::string& src, std::string& vsh, std::string& fsh, RenderCommandGroup& group)/*throw GLSLCompileException*/ +{ +#define CheckLabel(label) {\ + int pos = src.find(label);\ + if(pos == string::npos || !IsLabelActive(src, label)) {\ + s_CompileError = std::string("Compile Shader Error: No ") + #label + " label";\ + throw GLSLCompileException(s_CompileError.c_str());\ + }} + + CheckLabel(VSH_BEGIN); + CheckLabel(VSH_END); + CheckLabel(FSH_BEGIN); + CheckLabel(FSH_END); + + vsh = GetContent(src, VSH_BEGIN, VSH_END); + fsh = GetContent(src, FSH_BEGIN, FSH_END); + + bool hasCmd = IsLabelActive(src, CMD_BEGIN) && IsLabelActive(src, CMD_END); + if (hasCmd) + { + string cmd = GetContent(src, CMD_BEGIN, CMD_END); + if (cmd.size() > 0) + { + ParseCmd(cmd, group); + } + else + { + hasCmd = false; + } + } + + string common; + common = TrimContent(src, VSH_BEGIN, VSH_END); + common = TrimContent(common, FSH_BEGIN, FSH_END); + if (hasCmd) + common = TrimContent(common, CMD_BEGIN, CMD_END); + + vsh = common + vsh; + fsh = common + fsh; +} + +std::string GLSLCompiler::GetContent(std::string& src, const char* from, const char* to) +{ + int begin = src.find(from); + int end = src.find(to); + if (begin == string::npos || end == string::npos) + { + return ""; + } + std::string content = src.substr(begin + strlen(from), end - begin - strlen(from)); + return content; +} + +std::string GLSLCompiler::TrimContent(std::string& src, const char* from, const char* to) +{ + int begin = src.find(from); + int end = src.find(to); + string result = src.erase(begin, end + strlen(to) - begin); + return result; +} + +bool GLSLCompiler::IsLabelActive(std::string& src, const char* label) +{ + int pos = src.find(label); + if (pos == string::npos) + return false; + for (int i = pos - 1; i >= 0; --i) + { + int second = i; + int first = i - 1; + if (first < 0) + break; + if (src[second] == '\n' || src[first] == '\r') + break; + if (src[first] == '/' && src[second] == '/') + return false; + } + return true; +} + +bool GLSLCompiler::IsCommandActive(std::string& src, const char* label) +{ + int pos = src.find(label); + if (pos == string::npos) + return false; + for (int i = pos - 1; i >= 0; --i) + { + int second = i; + int first = i - 1; + if (first < 0) + break; + if (src[second] == '\n' || src[first] == '\r') + break; + if (src[first] == '/' && src[second] == '/') + return false; + } + return true; +} + +void GLSLCompiler::ParseCmd(std::string& cmds, RenderCommandGroup& group) +{ + istringstream ss = istringstream(cmds); + string line; + while (getline(ss, line)) + { + if(line.find('\r') != string::npos) + line.erase(std::remove(line.begin(), line.end(), '\r'), line.end()); + if (IsLineCommentd(line)) + continue; + int cb, ce; // cmd begin, end + if (!FindCmdPos(line, &cb, &ce)) + continue; + string cmdName = line.substr(cb, ce - cb + 1); + string cmdValue = line.substr(ce + 1, line.size() - ce - 1); + if (cmdName == "Cull") CommandCull(cmdValue, group); + else if (cmdName == "Blend") CommandBlend(cmdValue, group); + else if (cmdName == "DepthTest") CommandDepthTest(cmdValue, group); + else if (cmdName == "DepthWrite") CommandDepthWrite(cmdValue, group); + else + { + s_CompileError = string("Unknown command " + cmdName); + throw GLSLCompileException(s_CompileError.c_str()); + } + } +} + +#define IsSeperator(c) (c == ' ' || c == '\r' || c == '\n' || c == /*tab*/9) + +// ÕÒµ½ÐÐÄڵĵÚÒ»¸öµ¥´Ê£¬×÷ΪÃüÁîÃû +bool GLSLCompiler::FindCmdPos(std::string& line, int* start, int* end) +{ + for (int i = 0; i < line.size(); ++i) + { + if (IsSeperator(line[i])) + continue; + *start = i; + for (int j = i + 1; j < line.size(); ++j) + { + if (IsSeperator(line[j])) + { + *end = j - 1; + return true; + } + } + } + return false; +} + +bool GLSLCompiler::IsLineCommentd(std::string& line) +{ + for (int i = 0; i < line.size(); ++i) + { + if (IsSeperator(line[i])) + continue; + int first = i; + int second = i + 1; + if (second == line.size()) + return false; + if (line[first] == '/' && line[second] == '/') + return true; + return false; + } + return false; +} + +#define MAX_PARAM 2 + +void GLSLCompiler::CommandCull(std::string& p, RenderCommandGroup& group) +{ + std::string params[1]; + GetParams("Cull", p, params, 1); + + Cmd_Cull* pCull = new Cmd_Cull(); + Cmd_Cull& cull = *pCull; + if (params[0] == "Off") cull.cull = Cmd_Cull::Cull_Disable; + else if (params[0] == "Front") cull.cull = Cmd_Cull::Cull_Front; + else if (params[0] == "Back") cull.cull = Cmd_Cull::Cull_Back; + else if (params[0] == "Both") cull.cull = Cmd_Cull::Cull_Both; + else + { + delete pCull; + s_CompileError = string("Compile Shader Error: Invalid parameter of Cull: " + params[0]); + throw GLSLCompileException(s_CompileError.c_str()); + } + group.push_back(pCull); +} + +void GLSLCompiler::CommandBlend(std::string& p, RenderCommandGroup& group) +{ + std::string params[2]; + GetParams("Blend", p, params, 2); + + Cmd_Blend* pblend = new Cmd_Blend(); + Cmd_Blend& blend = *pblend; + if (params[0] == "Off") + { + blend.enable = false; + group.push_back(pblend); + return; + } + + blend.enable = true; + + if (params[0] == "Zero") blend.srcFac = Cmd_Blend::Blend_Zero; + else if (params[0] == "One") blend.srcFac = Cmd_Blend::Blend_One; + else if (params[0] == "SrcColor") blend.srcFac = Cmd_Blend::Blend_Src_Color; + else if (params[0] == "OneMinusSrcColor") blend.srcFac = Cmd_Blend::Blend_One_Minus_Src_Color; + else if (params[0] == "DstColor") blend.srcFac = Cmd_Blend::Blend_Dst_Color; + else if (params[0] == "OneMinusDstColor") blend.srcFac = Cmd_Blend::Blend_One_Minus_Dst_Color; + else if (params[0] == "SrcAlpha") blend.srcFac = Cmd_Blend::Blend_Src_Alpha; + else if (params[0] == "OneMinusSrcAlpha") blend.srcFac = Cmd_Blend::Blend_One_Minus_Src_Alpha; + else if (params[0] == "DstAlpha") blend.srcFac = Cmd_Blend::Blend_Dst_Alpha; + else if (params[0] == "OneMinusDstAlpha") blend.srcFac = Cmd_Blend::Blend_One_Minus_Dst_Alpha; + else if (params[0] == "ConstantColor") blend.srcFac = Cmd_Blend::Blend_Constant_Color; + else if (params[0] == "OneMinusConstantColor") blend.srcFac = Cmd_Blend::Blend_One_Minus_Constant_Color; + else if (params[0] == "ConstantAlpha") blend.srcFac = Cmd_Blend::Blend_Constant_Alpha; + else if (params[0] == "OneMinusConstantAlpha") blend.srcFac = Cmd_Blend::Blend_One_Minus_Constant_Alpha; + else + { + delete pblend; + s_CompileError = string("Compile Shader Error: Invalid parameter of Blend: " + params[0]); + throw GLSLCompileException(s_CompileError.c_str()); + } + + if (params[1] == "Zero") blend.dstFac = Cmd_Blend::Blend_Zero; + else if (params[1] == "One") blend.dstFac = Cmd_Blend::Blend_One; + else if (params[1] == "SrcColor") blend.dstFac = Cmd_Blend::Blend_Src_Color; + else if (params[1] == "OneMinusSrcColor") blend.dstFac = Cmd_Blend::Blend_One_Minus_Src_Color; + else if (params[1] == "DstColor") blend.dstFac = Cmd_Blend::Blend_Dst_Color; + else if (params[1] == "OneMinusDstColor") blend.dstFac = Cmd_Blend::Blend_One_Minus_Dst_Color; + else if (params[1] == "SrcAlpha") blend.dstFac = Cmd_Blend::Blend_Src_Alpha; + else if (params[1] == "OneMinusSrcAlpha") blend.dstFac = Cmd_Blend::Blend_One_Minus_Src_Alpha; + else if (params[1] == "DstAlpha") blend.dstFac = Cmd_Blend::Blend_Dst_Alpha; + else if (params[1] == "OneMinusDstAlpha") blend.dstFac = Cmd_Blend::Blend_One_Minus_Dst_Alpha; + else if (params[1] == "ConstantColor") blend.dstFac = Cmd_Blend::Blend_Constant_Color; + else if (params[1] == "OneMinusConstantColor") blend.dstFac = Cmd_Blend::Blend_One_Minus_Constant_Color; + else if (params[1] == "ConstantAlpha") blend.dstFac = Cmd_Blend::Blend_Constant_Alpha; + else if (params[1] == "OneMinusConstantAlpha") blend.dstFac = Cmd_Blend::Blend_One_Minus_Constant_Alpha; + else + { + delete pblend; + s_CompileError = string("Compile Shader Error: Invalid parameter of Blend: " + params[1]); + throw GLSLCompileException(s_CompileError.c_str()); + } + + group.push_back(pblend); +} + +void GLSLCompiler::CommandDepthTest(std::string& p, RenderCommandGroup& group) +{ + std::string params[1]; + GetParams("DepthTest", p, params, 1); + + Cmd_DepthTest* pTest = new Cmd_DepthTest(); + Cmd_DepthTest& test = *pTest; + if (params[0] == "Off") test.test = Cmd_DepthTest::DepthTest_Off; + else if (params[0] == "Always") test.test = Cmd_DepthTest::DepthTest_Always; + else if (params[0] == "Never") test.test = Cmd_DepthTest::DepthTest_Never; + else if (params[0] == "Less") test.test = Cmd_DepthTest::DepthTest_Less; + else if (params[0] == "Equal") test.test = Cmd_DepthTest::DepthTest_Equal; + else if (params[0] == "LEqual") test.test = Cmd_DepthTest::DepthTest_Lequal; + else if (params[0] == "Greater") test.test = Cmd_DepthTest::DepthTest_Greater; + else if (params[0] == "NotEqual") test.test = Cmd_DepthTest::DepthTest_Notequal; + else if (params[0] == "GEqual") test.test = Cmd_DepthTest::DepthTest_Gequal; + else + { + delete pTest; + s_CompileError = string("Compile Shader Error: Invalid parameter of DepthTest: " + params[0]); + throw GLSLCompileException(s_CompileError.c_str()); + } + group.push_back(pTest); +} + +void GLSLCompiler::CommandDepthWrite(std::string& p, RenderCommandGroup& group) +{ + std::string params[1]; + GetParams("DepthWrite", p, params, 1); + + Cmd_DepthWrite* pwrite = new Cmd_DepthWrite(); + Cmd_DepthWrite& write = *pwrite; + if (params[0] == "Off") write.write = false; + else if (params[0] == "On") write.write = true; + else + { + delete pwrite; + s_CompileError = string("Compile Shader Error: Invalid parameter of DepthWrite: " + params[0]); + throw GLSLCompileException(s_CompileError.c_str()); + } + group.push_back(pwrite); +} + +void GLSLCompiler::GetParams(const char* cmdName, std::string& params, std::string* out, int n) +{ + int index = 0; + for (int i = 0; i < params.size(); ++i) + { + if (IsSeperator(params[i])) + continue; + int j = i + 1; + for (; j < params.size(); ++j) + { + if (j == params.size() - 1) + { + if (index >= n) + { + s_CompileError = string("Compile Shader Error: Invalid parameter count of ") + cmdName +" : " + params; + throw GLSLCompileException(s_CompileError.c_str()); + } + if(!IsSeperator(params[j])) + out[index++] = params.substr(i, j - i + 1); + else + out[index++] = params.substr(i, j - i); + return; + } + if (!IsSeperator(params[j])) + continue; + if (index >= n) + { + s_CompileError = string("Compile Shader Error: Invalid parameter count of ") + cmdName + " : " + params; + throw GLSLCompileException(s_CompileError.c_str()); + } + out[index++] = params.substr(i, j - i); + break; + } + i = j; + } +} diff --git a/Client/Source/Graphics/ShaderCompiler.h b/Client/Source/Graphics/ShaderCompiler.h new file mode 100644 index 0000000..f374567 --- /dev/null +++ b/Client/Source/Graphics/ShaderCompiler.h @@ -0,0 +1,55 @@ +#pragma once + +#include +#include +#include "../Threading/Mutex.h" +#include "../Threading/Job.h" +#include "../Graphics/RenderCommands.h" + +// ±àÒëGLSL(GameLab Shader) + +// in: .glsl path +// out: vsh & fsh +class CompileGLSLJob : public Job +{ + +}; + +// in: glsl shader +// out: vsh & fsh +class CompileGLSLShaderJob : public Job +{ + +}; + +class GLSLCompileException : public std::exception +{ +public: + GLSLCompileException(const char* what) + : std::exception(what) + { + } + +}; + +class GLSLCompiler +{ +public: + static void Compile(std::string& src, std::string& vsh, std::string& fsh, RenderCommandGroup& cmd)/*throw GLSLCompileException*/; + +private: + static std::string GetContent(std::string& src, const char* from, const char* to); + static std::string TrimContent(std::string& src, const char* from, const char* to); + static bool IsLabelActive(std::string& src, const char* label); + + static void ParseCmd(std::string& cmd, RenderCommandGroup& group); + static bool IsCommandActive(std::string& src, const char* label); + static bool FindCmdPos(std::string& line, int* start, int* end); + static bool IsLineCommentd(std::string& line); + static void CommandCull(std::string& params, RenderCommandGroup& group); + static void CommandBlend(std::string& params, RenderCommandGroup& group); + static void CommandDepthTest(std::string& params, RenderCommandGroup& group); + static void CommandDepthWrite(std::string& params, RenderCommandGroup& group); + static void GetParams(const char* cmdName, std::string& params, std::string* out, int n); + +}; diff --git a/Client/Source/Graphics/Texture.cpp b/Client/Source/Graphics/Texture.cpp new file mode 100644 index 0000000..79dd5ea --- /dev/null +++ b/Client/Source/Graphics/Texture.cpp @@ -0,0 +1,230 @@ +#include "../Math/Math.h" + +#include "ImageData.h" +#include "Texture.h" + +Texture::Texture(TextureSetting setting, ImageData* imgData) +{ + Init(setting, imgData); + // force not keep imgData + m_KeepPixelData = false; +} + +void Texture::Init(TextureSetting setting, ImageData* imgData) +{ + m_Width = imgData->width; + m_Height = imgData->height; + m_Type = setting.type; + m_Format = setting.format; + m_WrapMode = setting.wrapMode; + m_FilterMode = setting.filterMode; + m_KeepPixelData = setting.keepImageData; + + glGenTextures(1, &m_GPUID); + glBindTexture(GL_TEXTURE_2D, m_GPUID); + + CheckGLError( + glDeleteTextures(1, &m_GPUID); + glBindTexture(GL_TEXTURE_2D, 0); + throw TextureException(error); + ); + + switch (m_WrapMode) { + case ETextureWrapMode::Clamp: + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + break; + case ETextureWrapMode::Repeat: + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + break; + case ETextureWrapMode::Mirror: + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT); + break; + default: + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + break; + } + + CheckGLError( + glDeleteTextures(1, &m_GPUID); + glBindTexture(GL_TEXTURE_2D, 0); + throw TextureException(error); + ); + + switch (m_FilterMode) { + case ETextureFilterMode::Linear: + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + break; + case ETextureFilterMode::Nearest: + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + break; + default: + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + break; + } + + GLint srcFormat = GL_RGB; + switch (imgData->format) + { + case PixelFormat_R: srcFormat = GL_RED; break; + case PixelFormat_RGB: srcFormat = GL_RGB; break; + case PixelFormat_RGBA: srcFormat = GL_RGBA; break; + default: Assert(false); + } + GLint srcType = GL_UNSIGNED_BYTE; + switch (imgData->type) + { + case PixelType_UNSIGNED_BYTE: srcType = GL_UNSIGNED_BYTE; break; + default: Assert(false); + } + + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, imgData->width, imgData->height, 0, srcFormat, srcType, imgData->pixels); + + CheckGLError( + glDeleteTextures(1, &m_GPUID); + glBindTexture(GL_TEXTURE_2D, 0); + throw TextureException(error); + ); +} + +Texture::Texture(TextureSetting setting, int w, int h) +{ + m_KeepPixelData = false; + + m_Width = w; + m_Height = h; + m_Type = setting.type; + m_Format = setting.format; + m_WrapMode = setting.wrapMode; + m_FilterMode = setting.filterMode; + m_KeepPixelData = setting.keepImageData; + + WipeGLError(); + + glGenTextures(1, &m_GPUID); + glBindTexture(GL_TEXTURE_2D, m_GPUID); + + CheckGLError( + glDeleteTextures(1, &m_GPUID); + glBindTexture(GL_TEXTURE_2D, 0); + throw TextureException(error); + ); + + switch (m_WrapMode) { + case ETextureWrapMode::Clamp: + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + break; + case ETextureWrapMode::Repeat: + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + break; + case ETextureWrapMode::Mirror: + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT); + break; + default: + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + break; + } + + CheckGLError( + glDeleteTextures(1, &m_GPUID); + glBindTexture(GL_TEXTURE_2D, 0); + throw TextureException(error); + ); + + switch (m_FilterMode) { + case ETextureFilterMode::Linear: + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + break; + case ETextureFilterMode::Nearest: + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + break; + default: + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + break; + } + GLenum internalFormat = GL_RGB; + if (m_Format == ETextureFormat::R8) + { + internalFormat = GL_RED; + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + } + + glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, w, h, 0, GL_RED, GL_UNSIGNED_BYTE, NULL); + + glPixelStorei(GL_UNPACK_ALIGNMENT, 4); + + CheckGLError( + glDeleteTextures(1, &m_GPUID); + glBindTexture(GL_TEXTURE_2D, 0); + throw TextureException(error); + ); + + glBindTexture(GL_TEXTURE_2D, 0); +} + +Texture::~Texture() +{ + glDeleteTextures(1, &m_GPUID); +} + +void Texture::UpdateSubImage(Rect rect, int format, int type, const void* data) +{ + glBindTexture(GL_TEXTURE_2D, m_GPUID); + + CheckGLError( + glBindTexture(GL_TEXTURE_2D, 0); + throw TextureException(error); + ); + + int alignment = 4; + if (m_Format == ETextureFormat::R8) + { + alignment = 1; + } + + GLenum fmt = GL_RED; + switch (format) + { + case EPixelFormat::PixelFormat_BGR: fmt = GL_BGR; break; + case EPixelFormat::PixelFormat_BGRA:fmt = GL_BGRA; break; + case EPixelFormat::PixelFormat_R: fmt = GL_RED; break; + case EPixelFormat::PixelFormat_RG: fmt = GL_RG; break; + case EPixelFormat::PixelFormat_RGB: fmt = GL_RGB; break; + case EPixelFormat::PixelFormat_RGBA: fmt = GL_RGBA; break; + } + GLenum t = GL_UNSIGNED_BYTE; + switch (type) + { + case EPixelElementType::PixelType_UNSIGNED_BYTE: t = GL_UNSIGNED_BYTE; break; + case EPixelElementType::PixelType_UNSIGNED_INT: t = GL_UNSIGNED_INT; break; + case EPixelElementType::PixelType_BYTE: t = GL_BYTE; break; + case EPixelElementType::PixelType_INT: t = GL_INT; break; + case EPixelElementType::PixelType_FLOAT: t = GL_FLOAT; break; + } + + glPixelStorei(GL_UNPACK_ALIGNMENT, alignment); + + glTexSubImage2D(GL_TEXTURE_2D, 0, rect.x, rect.y, rect.width, rect.height, fmt, t, data); + + glPixelStorei(GL_UNPACK_ALIGNMENT, 4); + + CheckGLError( + glBindTexture(GL_TEXTURE_2D, 0); + throw TextureException(error); + ); + + glBindTexture(GL_TEXTURE_2D, 0); +} \ No newline at end of file diff --git a/Client/Source/Graphics/Texture.h b/Client/Source/Graphics/Texture.h new file mode 100644 index 0000000..cf423e1 --- /dev/null +++ b/Client/Source/Graphics/Texture.h @@ -0,0 +1,94 @@ +#pragma once +#include +#include + +#include "../Math/Math.h" +#include "../Utilities/UtilMacros.h" +#include "../Utilities/Assert.h" + +#include "OpenGL.h" + +class ImageData; + +enum ETextureType +{ + TEX_2D, + TEX_CUBE, +}; + +enum ETextureFormat +{ + RGBA32, + RGB24, + RGB16, + R8, + A8, +}; + +enum ETextureWrapMode +{ + Clamp, + Repeat, + Mirror, +}; + +enum ETextureFilterMode +{ + Nearest, + Linear, +}; + +// GPU²àµÄµ¼ÈëÉèÖà +struct TextureSetting +{ + bool keepImageData; // ÊÇ·ñ±£´æÍ¼Æ¬Êý¾Ý + int type; // ͼƬÀàÐÍ + int format; // ÄÚ²¿¸ñʽ + int wrapMode; // °üΧ + int filterMode; // Â˲¨ +}; + +class TextureException : public std::exception +{ +public: + TextureException(const char* what) + : std::exception(what) + {} + TextureException(int glError) + { + g_sharedGLErrorMsg = std::to_string(glError); + std::exception(g_sharedGLErrorMsg.c_str()); + } +}; + +class Texture +{ +public: + Texture(TextureSetting setting, int width, int height)/*throw TextureException*/; // ¿ÕÌùͼ + Texture(TextureSetting setting, ImageData* imgData)/*throw TextureException*/; + ~Texture(); + + void UpdateSubImage(Rect rect, int format, int type, const void* data); + + GET(int, Width, m_Width); + GET(int, Height, m_Height); + + GET(GLuint, GpuID, m_GPUID); + +private: + void Init(TextureSetting setting, ImageData* imgData); + + //------------------------------------------------------------------------------ + + GLuint m_GPUID; + + int m_Width, m_Height; + + int m_Type; + int m_Format; + int m_FilterMode; + int m_WrapMode; + + bool m_KeepPixelData; // ÊÇ·ñ±£´æÍ¼ÏñÏñËØÊý¾Ý£¬Ä¬Èϵ¼Èëºó²»±£´æ + +}; \ No newline at end of file diff --git a/Client/Source/Graphics/VertexAttribute.cpp b/Client/Source/Graphics/VertexAttribute.cpp new file mode 100644 index 0000000..e5f2ea7 --- /dev/null +++ b/Client/Source/Graphics/VertexAttribute.cpp @@ -0,0 +1,20 @@ +#include "VertexAttribute.h" + +namespace VertexAttribute +{ + + // map VertexAttrFormat to OpenGL type + static GLenum kGLVertexAttrFormat[VertexAttrFormat_Count] = { + GL_FLOAT, // VertexAttrFormat_Float + GL_HALF_FLOAT, // VertexAttrFormat_Float16 + GL_UNSIGNED_BYTE, // VertexAttrFormat_Color + GL_BYTE, // VertexAttrFormat_Byte + GL_UNSIGNED_BYTE, // VertexAttrFormat_Unsigned_Byte + }; + + GLenum ConvertAttrFormatToGLFormat(uint fmt) + { + return kGLVertexAttrFormat[fmt]; + } + +} \ No newline at end of file diff --git a/Client/Source/Graphics/VertexAttribute.h b/Client/Source/Graphics/VertexAttribute.h new file mode 100644 index 0000000..8f7bc82 --- /dev/null +++ b/Client/Source/Graphics/VertexAttribute.h @@ -0,0 +1,52 @@ +#pragma once + +#include + +#include "../Utilities/UtilMacros.h" + +#include "OpenGL.h" +#include "GPUDataBuffer.h" + +// component format +enum VertexAttrFormat +{ + VertexAttrFormat_Float = 0, // position\normal\tangent\uv\uv2\uv3\uv4 + VertexAttrFormat_Float16, + VertexAttrFormat_Color, // color + VertexAttrFormat_Byte, + VertexAttrFormat_Unsigned_Byte, + + VertexAttrFormat_Count +}; + +struct VertexAttributeDescriptor +{ + //union { + const void* pointer; // ÄÚ´æµØÖ·£¬¸Õ´´½¨Ê±Áô¿Õ + int startOffset; // ÏÔ´æÖÐÏà¶ÔVBOµÄÆ«ÒÆÖµ + //}; + uint componentNum; // ÏòÁ¿Î¬¶È1,2,3,4 + uint componentFormat; // ÿ¸ö·ÖÁ¿µÄÀàÐÍ + uint16 stride; // ¼ä¸ô + bool normalize; // ÊÇ·ñ¹éÒ»»¯£¬Ö»ÓÃÓÚCustomVertexLayout + + // for default vertex layout + VertexAttributeDescriptor() {} + // for custom vertex layout + VertexAttributeDescriptor(int startOff, uint num, uint fmt, uint16 strd, bool normalized = false) + { + startOffset = startOff; + componentNum = num; + componentFormat = fmt; + stride = strd; + normalize = normalized; + } + +}; + +namespace VertexAttribute +{ + + extern GLenum ConvertAttrFormatToGLFormat(uint fmt); + +} diff --git a/Client/Source/Graphics/VertexBuffer.cpp b/Client/Source/Graphics/VertexBuffer.cpp new file mode 100644 index 0000000..d95bf58 --- /dev/null +++ b/Client/Source/Graphics/VertexBuffer.cpp @@ -0,0 +1,109 @@ +#include "VertexBuffer.h" + +VertexBuffer::VertexBuffer(int vbSize, int ibSize, VertexBufferType type) +{ + m_VB = GPU::ClaimBuffer(vbSize, GL_STATIC_DRAW); + m_IB = GPU::ClaimBuffer(ibSize, GL_STATIC_DRAW); +} + +VertexBuffer::~VertexBuffer() +{ + GPU::ReleaseBuffer(m_VB); + GPU::ReleaseBuffer(m_IB); +} +// GetChunk +// +// FlushChunk +// DrawChunk +void VertexBuffer::GetChunk(uint sizePerVert, uint sizePerIndex, int maxVerts, int maxIndices, EPrimitive primitive, void **out_vb, void **out_ib) +{ + m_SizePerVertex = sizePerVert; + + uint vbufferSize = sizePerVert * maxVerts; + uint ibufferSize = sizePerIndex * maxIndices; + + GLenum usage = GL_STATIC_DRAW; + m_VB->Restore(vbufferSize, usage); + m_IB->Restore(ibufferSize, usage); + + const GLenum access = GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT | GL_MAP_FLUSH_EXPLICIT_BIT; + + *out_vb = m_VB->MapRange(0, vbufferSize, access); + *out_ib = m_IB->MapRange(0, ibufferSize, access); + + m_Primitive = primitive; + + WipeGLError(); +} + +void VertexBuffer::FlushChunk(int actualVerts, int actualIndices) +{ + int actualVBufferSize = m_SizePerVertex * actualVerts; + int actualIBufferSize = VertexLayout::GetDefaultIndexSize() * actualIndices; + + m_CurIndexCount = actualIndices; + + m_VB->FlushMapedRange(0, actualVBufferSize); + m_IB->FlushMapedRange(0, actualIBufferSize); + + m_VB->UnMap(); + m_IB->UnMap(); + + WipeGLError(); +} + +void VertexBuffer::Draw(CustomVertexLayout& layout) +{ + const byte* basepointer = 0; + const GLuint buffer = m_VB->GetHandle(); + + FillCustomVertexLayout(layout); + + VertexLayout::SetupCustomVertexLayout(layout); + + layout.RestorePointer(); + + const void* indexPtr = 0; + + CheckGLError( + throw GLException(error); + ); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_IB->GetHandle()); + + CheckGLError( + throw GLException(error); + ); + GLenum indexFormat = VertexLayout::GetDefaultIndexFormat(); + + switch (m_Primitive) + { + case Primitive_Triangle: + glDrawElements(GL_TRIANGLES, m_CurIndexCount, indexFormat, indexPtr); + break; + case Primitive_Line: + glDrawElements(GL_LINE, m_CurIndexCount, indexFormat, indexPtr); + break; + case Primitive_Point: + glDrawElements(GL_POINT, m_CurIndexCount, indexFormat, indexPtr); + break; + } + + CheckGLError( + throw GLException(error); + ); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); +} + +void VertexBuffer::FillCustomVertexLayout(CustomVertexLayout& dst) +{ + const byte* basepointer = 0; + const GLuint buffer = m_VB->GetHandle(); + + dst.buffer = buffer; + + for (int i = 0; i < dst.attributes.size(); ++i) + { + int offset = dst.attributes[i].startOffset; + dst.attributes[i].pointer = basepointer + offset; + } +} \ No newline at end of file diff --git a/Client/Source/Graphics/VertexBuffer.h b/Client/Source/Graphics/VertexBuffer.h new file mode 100644 index 0000000..b907337 --- /dev/null +++ b/Client/Source/Graphics/VertexBuffer.h @@ -0,0 +1,52 @@ +#pragma once + +#include + +#include "../Utilities/UtilMacros.h" + +#include "OpenGL.h" +#include "GPUDataBuffer.h" +#include "DefaultVertexLayout.h" +#include "CustomVertexLayout.h" +#include "Primitive.h" + +// ʵ¼ÊʹÓùý³ÌÖУ¬Í¨³£ÊÇÒ»¸öVBOºÍÒ»¸öIBOÒ»Æð£¬submesh¶ÔÓ¦µÄÊÇIBOÖеIJ»Í¬µÄ¶Î£¬¶ø²»ÊDz»Í¬µÄIBO + +class VertexBuffer +{ +public: + enum VertexBufferType + { + VertexBufferType_Static, // device + VertexBufferType_Stream, // pinned (best performance) + VertexBufferType_Dynamic,// device + }; + + VertexBuffer(int vbSize, int ibSize, VertexBufferType type); + ~VertexBuffer(); + + // Ìî³äÊý¾Ý + void GetChunk(uint sizePerVert, uint sizePerIndex, int maxVerts, int maxIndices, EPrimitive primitive, void **out_vb, void **out_ib); + // Ìá½»Êý¾Ý + void FlushChunk(int actualVerts, int actualIndices); + + GET(GPU::DataBuffer*, VB, m_VB); + GET(GPU::DataBuffer*, IB, m_IB); + + void Draw(CustomVertexLayout& layout); + +private: + void FillCustomVertexLayout(CustomVertexLayout& dst); + + VertexBufferType m_Type; + + GPU::DataBuffer* m_VB; + GPU::DataBuffer* m_IB; + + int m_SizePerVertex; + + int m_CurIndexCount; + + EPrimitive m_Primitive; + +}; diff --git a/Client/Source/Math/Functions.cpp b/Client/Source/Math/Functions.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Math/Functions.h b/Client/Source/Math/Functions.h new file mode 100644 index 0000000..3dd17dd --- /dev/null +++ b/Client/Source/Math/Functions.h @@ -0,0 +1,30 @@ +#pragma once + +namespace MathUtils +{ + template + inline T Max(T a, T b) + { + return a < b ? b : a; + } + + template + inline T Min(T a, T b) + { + return a < b ? a : b; + } + +} + +#define max(a, b)\ +((a)>(b)?(a):(b)) + +#define min(a, b)\ +(a)<(b)?(a):(b) + +#define clamp(v, lo, hi)\ +max((lo), min((v), (hi))) + +// ÆæÊý·µ»Ø1£¬·ñÔò0 +#define odd(n) \ +(((n)&1)?1:0) diff --git a/Client/Source/Math/Math.h b/Client/Source/Math/Math.h new file mode 100644 index 0000000..0cd7d84 --- /dev/null +++ b/Client/Source/Math/Math.h @@ -0,0 +1,6 @@ +#include "Vector2.hpp" +#include "Matrix22.h" +#include "Matrix44.h" +#include "rect.h" +#include "Functions.h" + diff --git a/Client/Source/Math/Matrix22.h b/Client/Source/Math/Matrix22.h new file mode 100644 index 0000000..c777084 --- /dev/null +++ b/Client/Source/Math/Matrix22.h @@ -0,0 +1,10 @@ +#pragma once + +class Matrix22 +{ +public: + float m[2][2]; // row major + + + +}; diff --git a/Client/Source/Math/Matrix44.h b/Client/Source/Math/Matrix44.h new file mode 100644 index 0000000..562ac54 --- /dev/null +++ b/Client/Source/Math/Matrix44.h @@ -0,0 +1,8 @@ +#pragma once + +class Matrix44 +{ +public: + float m[4][4]; // row major + +}; diff --git a/Client/Source/Math/Rect.h b/Client/Source/Math/Rect.h new file mode 100644 index 0000000..63c6aa1 --- /dev/null +++ b/Client/Source/Math/Rect.h @@ -0,0 +1,13 @@ +#pragma once + +struct Rect +{ + Rect(float x = 0, float y = 0, float w = 0, float h = 0) + { + this->x = x; + this->y = y; + this->width = w; + this->height = h; + } + float x, y, width, height; +}; diff --git a/Client/Source/Math/Vector2.hpp b/Client/Source/Math/Vector2.hpp new file mode 100644 index 0000000..65f2c10 --- /dev/null +++ b/Client/Source/Math/Vector2.hpp @@ -0,0 +1,67 @@ +#pragma once + +#include "../Utilities/Assert.h" +#include "../Math/Functions.h" + +template +class Vector2Template +{ +public: + Vector2Template(T x = 0, T y = 0) + { + this->x = x; + this->y = y; + } + inline void Set(T x, T y) + { + this->x = x; + this->y = y; + } + + Vector2Template Clamp(T xmin, T xmax, T ymin, T ymax) + { + Vector2Template v; + v.x = clamp(x, xmin, xmax); + v.y = clamp(y, ymin, ymax); + return v; + } + + T operator[](int i) + { + if (i == 0) return x; + else if (i == 1) return y; + Assert(false); + } + + bool operator == (const Vector2Template& v) const + { + return v.x == x && v.y == y; + } + + bool operator != (const Vector2Template& v) const + { + return v.x != x || v.y != y; + } + + Vector2Template operator - (const Vector2Template& v) const + { + Vector2Template res = Vector2Template(x - v.x, y - v.y); + return res; + } + + + float x, y; + + static Vector2Template zero; + static Vector2Template one ; + +}; + +using Vector2f = Vector2Template; +using Vector2i = Vector2Template; + + +template +Vector2Template Vector2Template::zero = Vector2Template(0, 0); +template +Vector2Template Vector2Template::one = Vector2Template(1, 1); diff --git a/Client/Source/Math/Vector3.hpp b/Client/Source/Math/Vector3.hpp new file mode 100644 index 0000000..eee913b --- /dev/null +++ b/Client/Source/Math/Vector3.hpp @@ -0,0 +1,32 @@ +#pragma once + +template +struct Vector3Template +{ + T x, y, z; + Vector3Template(T x = 0, T y = 0, T z = 0) + { + this->x = x; + this->y = y; + this->z = z; + } + inline void Set(T x, T y, T z) + { + this->x = x; + this->y = y; + this->z = z; + } + + + static Vector3Template zero; + static Vector3Template one; + +}; + +template +Vector3Template Vector3Template::zero = Vector3Template(0, 0, 0); +template +Vector3Template Vector3Template::one = Vector3Template(1, 1, 1); + +using Vector3f = Vector3Template; + diff --git a/Client/Source/Math/Vector4.hpp b/Client/Source/Math/Vector4.hpp new file mode 100644 index 0000000..8fbf7e6 --- /dev/null +++ b/Client/Source/Math/Vector4.hpp @@ -0,0 +1,33 @@ +#pragma once + +template +struct Vector4Template +{ + T x, y, z, w; + + Vector4Template(T x = 0, T y = 0, T z = 0, T w = 0) + { + this->x = x; + this->y = y; + this->z = z; + this->w = w; + } + + inline void Set(T x, T y, T z, T w) + { + this->x = x; + this->y = y; + this->z = z; + this->w = w; + } + + static Vector4Template zero; + static Vector4Template one; +}; + +template +Vector4Template Vector4Template::zero = Vector4Template(0, 0, 0, 0); +template +Vector4Template Vector4Template::one = Vector4Template(1, 1, 1, 1); + +using Vector4f = Vector4Template; \ No newline at end of file diff --git a/Client/Source/RagdollMain.cpp b/Client/Source/RagdollMain.cpp new file mode 100644 index 0000000..acf70c8 --- /dev/null +++ b/Client/Source/RagdollMain.cpp @@ -0,0 +1,89 @@ +// python -m glad --out-path=build --api="gl=2.1" --extensions="" --generator="c" +// g++ example/c++/sdl.cpp build/src/glad.c -Ibuild/include -lSDL2 -ldl + +#include + +#include +#include + +int main(int argc, char **argv) { + + if (SDL_Init(SDL_INIT_VIDEO) != 0) { + std::cerr << "SDL2 video subsystem couldn't be initialized. Error: " + << SDL_GetError() + << std::endl; + exit(1); + } + + SDL_Window* window = SDL_CreateWindow("Glad Sample", + SDL_WINDOWPOS_CENTERED, + SDL_WINDOWPOS_CENTERED, + 800, 600, SDL_WINDOW_SHOWN | + SDL_WINDOW_OPENGL); + + SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, + SDL_RENDERER_ACCELERATED); + + if (renderer == nullptr) { + std::cerr << "SDL2 Renderer couldn't be created. Error: " + << SDL_GetError() + << std::endl; + exit(1); + } + + // Create a OpenGL context on SDL2 + SDL_GLContext gl_context = SDL_GL_CreateContext(window); + + // Load GL extensions using glad + if (!gladLoadGLLoader((GLADloadproc)SDL_GL_GetProcAddress)) { + std::cerr << "Failed to initialize the OpenGL context." << std::endl; + exit(1); + } + + // Loaded OpenGL successfully. + std::cout << "OpenGL version loaded: " << GLVersion.major << "." + << GLVersion.minor << std::endl; + + // Create an event handler + SDL_Event event; + // Loop condition + bool running = true; + + while (running) { + SDL_PollEvent(&event); + + switch (event.type) { + case SDL_QUIT: + running = false; + break; + + case SDL_KEYDOWN: + switch (event.key.keysym.sym) { + case SDLK_ESCAPE: + running = false; + break; + } + } + + glClearColor(0, 0, 0, 1); + + // You'd want to use modern OpenGL here + glColor3d(0, 1, 0); + glBegin(GL_TRIANGLES); + glVertex2f(.2, 0); + glVertex2f(.01, .2); + glVertex2f(-.2, 0); + glEnd(); + + SDL_GL_SwapWindow(window); + } + + // Destroy everything to not leak memory. + SDL_GL_DeleteContext(gl_context); + SDL_DestroyRenderer(renderer); + SDL_DestroyWindow(window); + + SDL_Quit(); + + return 0; +} diff --git a/Client/Source/Threading/Job.cpp b/Client/Source/Threading/Job.cpp new file mode 100644 index 0000000..3bfdb4d --- /dev/null +++ b/Client/Source/Threading/Job.cpp @@ -0,0 +1,13 @@ +#include "Job.h" +#include "../Utilities/UIDGenerator.h" + +static UIDGenerator s_JobIDGenerator; + +Job::Job() + : m_ID(s_JobIDGenerator.GenUID()) +{ +} + +Job::~Job() +{ +} diff --git a/Client/Source/Threading/Job.h b/Client/Source/Threading/Job.h new file mode 100644 index 0000000..db89feb --- /dev/null +++ b/Client/Source/Threading/Job.h @@ -0,0 +1,17 @@ +#pragma once + +// ÈÎÎñµÄ³éÏó»ùÀà +class Job +{ +public: + Job(); + virtual ~Job(); + + virtual void Process() = 0; + virtual bool IsFinished() = 0; + virtual void Dispacth(void* param) = 0; // call in main thread + +protected: + int m_ID; // Job ID + +}; \ No newline at end of file diff --git a/Client/Source/Threading/JobSystem.cpp b/Client/Source/Threading/JobSystem.cpp new file mode 100644 index 0000000..378d74f --- /dev/null +++ b/Client/Source/Threading/JobSystem.cpp @@ -0,0 +1,56 @@ +#include "JobSystem.h" +#include "../Debug/Log.h" + +JobSystem::JobSystem() + : m_Initialized(false) +{ + +} + +JobSystem::~JobSystem() +{ + +} + +void JobSystem::Initilize(int workThreadCount) +{ + if (m_Initialized) + { + log_error("JobSystem has already initialized."); + return; + } + + if (workThreadCount <= 0) + return; + + m_ThreadCount = workThreadCount; + m_Cur = 0; + + for (int i = 0; i < workThreadCount; ++i) + { + WorkThread* thread = new WorkThread(); + thread->Resume(); + m_Threads.push_back(thread); + } + + m_Initialized = true; +} + +void JobSystem::Dispatch(void* param) +{ + for (int i = 0; i < m_Threads.size(); ++i) + { + m_Threads[i]->Dispatch(param); + } +} + +void JobSystem::AddJobAtEnd(Job* job) +{ + WorkThread* thread = SelectThread(); + thread->AddJobAtEnd(job); +} + +WorkThread* JobSystem::SelectThread() +{ + return m_Threads[(++m_Cur)% m_ThreadCount]; +} \ No newline at end of file diff --git a/Client/Source/Threading/JobSystem.h b/Client/Source/Threading/JobSystem.h new file mode 100644 index 0000000..ded4370 --- /dev/null +++ b/Client/Source/Threading/JobSystem.h @@ -0,0 +1,25 @@ +#pragma once +#include "../Utilities/Singleton.h" +#include "../Threading/Thread.h" +#include + +class JobSystem : public Singleton +{ +public: + JobSystem(); + ~JobSystem(); + + void AddJobAtEnd(Job* job); + + void Initilize(int workThreadCount = 1); + void Dispatch(void* param); + +private: + WorkThread* SelectThread(); + + bool m_Initialized; + std::vector m_Threads; + int m_Cur; + int m_ThreadCount; + +}; \ No newline at end of file diff --git a/Client/Source/Threading/Mutex.cpp b/Client/Source/Threading/Mutex.cpp new file mode 100644 index 0000000..cda7e89 --- /dev/null +++ b/Client/Source/Threading/Mutex.cpp @@ -0,0 +1,27 @@ +#include "Thread.h" +#include "Mutex.h" + +#include "../Utilities/Type.h" + +Mutex::Mutex() +{ + m_Handle = ::CreateMutex(NULL, FALSE, NULL); + if (!m_Handle) + throw ThreadException("Cant use win32 mutex."); +} + +Mutex::~Mutex() +{ + ::CloseHandle(m_Handle); + m_Handle = NULL; +} + +void Mutex::LockSelf() +{ + ::WaitForSingleObject(m_Handle, (~(uint32)0)); +} + +void Mutex::UnlockSelf() +{ + ::ReleaseMutex(m_Handle); +} \ No newline at end of file diff --git a/Client/Source/Threading/Mutex.h b/Client/Source/Threading/Mutex.h new file mode 100644 index 0000000..eed69aa --- /dev/null +++ b/Client/Source/Threading/Mutex.h @@ -0,0 +1,39 @@ +#pragma once +#include + +class Mutex +{ +public: + Mutex(); + ~Mutex(); + + void LockSelf(); + void UnlockSelf(); + +private: + HANDLE m_Handle; + +}; + + +class MutexLocker +{ +public: + MutexLocker(Mutex& mutex) + : m(mutex) + { + m.LockSelf(); + }; + ~MutexLocker() + { + m.UnlockSelf(); + } + operator bool() { return false; }; +private: + void* operator new(size_t); + Mutex& m; +}; + +#define Lock(m) \ +if(MutexLocker lock_##m = m){} else + diff --git a/Client/Source/Threading/Semaphore.cpp b/Client/Source/Threading/Semaphore.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Threading/Semaphore.h b/Client/Source/Threading/Semaphore.h new file mode 100644 index 0000000..e69de29 diff --git a/Client/Source/Threading/Thread.cpp b/Client/Source/Threading/Thread.cpp new file mode 100644 index 0000000..0bede98 --- /dev/null +++ b/Client/Source/Threading/Thread.cpp @@ -0,0 +1,70 @@ +#include +#include "Thread.h" +#include "../Utilities/Assert.h" +#include "../Utilities/Type.h" + +static std::string s_ThreadErr; + +static DWORD WINAPI ThreadMain(LPVOID param) +{ + Thread* thread = (Thread*)param; + thread->Run(); + return NULL; +} + +Thread::Thread(uint32 stacksize) +{ + m_Handle = ::CreateThread( + NULL + , stacksize + , ThreadMain + , this + , CREATE_SUSPENDED + , NULL); + if (m_Handle == 0) + { + s_ThreadErr = "Create Thread Failed. ErrorCode=" + std::to_string(GetLastError()); + throw ThreadException(s_ThreadErr.c_str()); + } +} + +Thread::~Thread() +{ + CloseHandle(m_Handle); +} + +void Thread::Resume() +{ + ::ResumeThread(m_Handle); +} + +bool Thread::IsRunning() +{ + if (m_Handle) { + DWORD exitCode = 0; + // https://blog.csdn.net/yuanmeng567/article/details/19485719 + ::GetExitCodeThread(m_Handle, &exitCode); + return exitCode == STILL_ACTIVE; + } + return false; +} + +void Thread::Join() +{ + ::WaitForSingleObject(m_Handle, INFINITE); +} + +void Thread::Kill() +{ + ::TerminateThread(m_Handle, FALSE); +} + +void Thread::Sleep(uint ms) +{ + ::Sleep(ms); +} + +bool Thread::IsCurrent() +{ + return m_Handle == ::GetCurrentThread(); +} diff --git a/Client/Source/Threading/Thread.h b/Client/Source/Threading/Thread.h new file mode 100644 index 0000000..77d8dff --- /dev/null +++ b/Client/Source/Threading/Thread.h @@ -0,0 +1,71 @@ +#pragma once +#include +#include +#include + +#include "../Utilities/Type.h" + +#include "Job.h" +#include "Mutex.h" + +class ThreadException : public std::exception +{ +public: + ThreadException(const char* what) + : std::exception(what) + { + } +}; + +class Thread +{ +public: + Thread(uint32 stacksize = 0)/*throw ThreadExeception*/; + virtual ~Thread(); + + virtual void Run() = 0; + + virtual void Resume(); + virtual void Join() ; + virtual void Kill() ; + + virtual void Sleep(uint ms) ; + + virtual bool IsRunning() ; + virtual bool IsCurrent() ; + +protected: + HANDLE m_Handle; + +}; + +// ÈÎÎñϵͳµÄÏß³Ì +class WorkThread : public Thread +{ +public: + void Run() override; + void Dispatch(void* param); // call in main thread + + void AddJobAtEnd(Job* job); + +private: + Mutex m_PendingMutex; + Mutex m_FinishedMutex; + + std::vector m_PendingJobs; + std::vector m_FinishedJobs; + +}; + +// Ö´ÐÐС¶Î´úÂëµÄÏß³Ì +class CodePieceThread : public Thread +{ +public: + typedef void(*CodePiece)(); + + void Run() override; + +private: + std::vector m_CodePieces; + +}; \ No newline at end of file diff --git a/Client/Source/Threading/WorkThread.cpp b/Client/Source/Threading/WorkThread.cpp new file mode 100644 index 0000000..4ea6262 --- /dev/null +++ b/Client/Source/Threading/WorkThread.cpp @@ -0,0 +1,50 @@ +#include "Thread.h" + +#include "../Debug/Log.h" + +void WorkThread::Run() +{ + while (true) + { + Lock(m_PendingMutex) + { + for (auto iter = m_PendingJobs.begin(); iter != m_PendingJobs.end();) + { + Job* job = *iter; + job->Process(); + if (job->IsFinished()) + { + Lock(m_FinishedMutex) { + m_FinishedJobs.push_back(job); + } + iter = m_PendingJobs.erase(iter); + continue; + } + ++iter; + } + if (m_PendingJobs.size() == 0) + ::Sleep(100); + } + } +} + +void WorkThread::Dispatch(void* param) +{ + Lock(m_FinishedMutex) + { + for (int i = 0; i < m_FinishedJobs.size(); ++i) + { + m_FinishedJobs[i]->Dispacth(param); + delete m_FinishedJobs[i]; + } + m_FinishedJobs.clear(); + } +} + +void WorkThread::AddJobAtEnd(Job* job) +{ + Lock(m_PendingMutex) + { + m_PendingJobs.push_back(job); + } +} \ No newline at end of file diff --git a/Client/Source/Utilities/Assert.h b/Client/Source/Utilities/Assert.h new file mode 100644 index 0000000..526ca32 --- /dev/null +++ b/Client/Source/Utilities/Assert.h @@ -0,0 +1,11 @@ +#ifndef ASSERT_H +#define ASSERT_H + +#include + +#define Assert(c) assert((c)) + +#define DebugAssertIf(c) assert(c) +#define AssertIf(c) assert(c) + +#endif \ No newline at end of file diff --git a/Client/Source/Utilities/AutoInvoke.h b/Client/Source/Utilities/AutoInvoke.h new file mode 100644 index 0000000..7d9bb83 --- /dev/null +++ b/Client/Source/Utilities/AutoInvoke.h @@ -0,0 +1,27 @@ +#pragma once + +typedef void(*AutoInvokeAction)(); + +// RAII auto call +class AutoInvokerWhenLeave +{ +public: + AutoInvokerWhenLeave(AutoInvokeAction func) + { + m_Func = func; + }; + ~AutoInvokerWhenLeave() + { + if (m_Func) + { + m_Func(); + } + } +private: + AutoInvokeAction m_Func; + +}; + +#define InvokeWhenLeave(func) \ +AutoInvokerWhenLeave auto_invoker = AutoInvokerWhenLeave(func); + diff --git a/Client/Source/Utilities/Exception.h b/Client/Source/Utilities/Exception.h new file mode 100644 index 0000000..3795bc6 --- /dev/null +++ b/Client/Source/Utilities/Exception.h @@ -0,0 +1,12 @@ +#pragma once +#include + +#define CustomException(Name) \ +class Name : public std::exception \ +{ \ +public: \ + Name(const char* what) \ + : std::exception(what) \ + { \ + } \ +} diff --git a/Client/Source/Utilities/Singleton.h b/Client/Source/Utilities/Singleton.h new file mode 100644 index 0000000..f864a42 --- /dev/null +++ b/Client/Source/Utilities/Singleton.h @@ -0,0 +1,43 @@ +#ifndef SINGLETON_H +#define SINGLETON_H + +template +class Singleton +{ +public: + + static T* Instance() + { + if (!instance) instance = new T; + return instance; + } + + static void Destroy() + { + delete instance; + instance = nullptr; + } + +protected: + + Singleton() + { + instance = static_cast(this); + }; + + virtual ~Singleton() {}; + + static T* instance; + +private: + + Singleton(const Singleton& singleton); + + Singleton& operator = (const Singleton& singleton); + +}; + +template +T* Singleton::instance = nullptr; + +#endif \ No newline at end of file diff --git a/Client/Source/Utilities/StaticInitiator.h b/Client/Source/Utilities/StaticInitiator.h new file mode 100644 index 0000000..af264af --- /dev/null +++ b/Client/Source/Utilities/StaticInitiator.h @@ -0,0 +1,30 @@ +#pragma once + +//https://stackoverflow.com/questions/1005685/c-static-initialization-order +//https://stackoverflow.com/questions/211237/static-variables-initialisation-order + +// ¾²Ì¬¹¹Ô캯Êý +#include "StaticConstructor/include/StaticConstructor.h" + +typedef void(*StaticFunc) (); + +// ×Ô¶¯³õʼ»¯¾²Ì¬Êý¾Ý +class StaticFuncInvoker +{ +public: + // Default Constructor: + StaticFuncInvoker(StaticFunc func) + { + if (func) + func(); + } +}; + +// µ÷ÓþßÃûµÄstaticº¯Êý +#define InvokeStaticFunc(func)\ + static StaticFuncInvoker staticInvokerOf_##func(func); + +// ÓÃÀ´³õʼ»¯µ±Ç°cppÀïµÄ¾²Ì¬±äÁ¿£¬ÐèҪעÒâstatic±äÁ¿³õʼ»¯Ë³Ðò£¨Static Initialization Order£© +#define InitializeStaticVariables(lambda)\ + static StaticFuncInvoker staticInvoker(lambda); + diff --git a/Client/Source/Utilities/Type.h b/Client/Source/Utilities/Type.h new file mode 100644 index 0000000..da6208d --- /dev/null +++ b/Client/Source/Utilities/Type.h @@ -0,0 +1,25 @@ +#ifndef TYPE_H +#define TYPE_H + +#include +#include + +typedef int8_t int8; +typedef uint8_t uint8; +typedef unsigned char byte; +typedef char sbyte; +typedef int16_t int16; +typedef uint16_t uint16; +typedef uint16_t UInt16; +typedef int32_t int32; +typedef uint32_t uint32; +typedef uint32_t UInt32; +typedef int64_t int64; +typedef uint64_t uint64; +typedef uint64_t UInt64; + +typedef uint32_t uint; +typedef int32_t sint; +typedef int32_t SInt32; + +#endif \ No newline at end of file diff --git a/Client/Source/Utilities/UIDGenerator.h b/Client/Source/Utilities/UIDGenerator.h new file mode 100644 index 0000000..81918f0 --- /dev/null +++ b/Client/Source/Utilities/UIDGenerator.h @@ -0,0 +1,20 @@ +#ifndef UID_GENERATOR_H +#define UID_GENERATOR_H + +class UIDGenerator +{ +public: + UIDGenerator(int from = 0) + : m_Index(from) + { + }; + ~UIDGenerator(){}; + + int GenUID(){return m_Index++;}; + +private: + int m_Index; + +}; + +#endif \ No newline at end of file diff --git a/Client/Source/Utilities/UtilMacros.h b/Client/Source/Utilities/UtilMacros.h new file mode 100644 index 0000000..29bb7b0 --- /dev/null +++ b/Client/Source/Utilities/UtilMacros.h @@ -0,0 +1,19 @@ +#ifndef UTIL_MACROS_H +#define UTIL_MACROS_H + +#define GET_SET(TYPE,PROP,VAR) \ + inline void Set##PROP (TYPE val) { VAR = val; } \ + inline TYPE Get##PROP () {return VAR; } + +#define GET(TYPE, PROP, VAR) \ + inline TYPE Get##PROP () {return VAR; } + +#define SET(TYPE, PROP, VAR) \ + inline void Set##PROP (TYPE val) { VAR = val; } \ + +#define Mask(v) (1 << v) + +#define cast(T, v) \ +((T)(v)) + +#endif \ No newline at end of file diff --git a/Client/ThirdParty/Box2D/.gitignore b/Client/ThirdParty/Box2D/.gitignore new file mode 100644 index 0000000..8b45738 --- /dev/null +++ b/Client/ThirdParty/Box2D/.gitignore @@ -0,0 +1,7 @@ +build/ +imgui.ini +settings.ini +.vscode/ +CMakeSettings.json +out/ +.vs/ diff --git a/Client/ThirdParty/Box2D/.travis.yml b/Client/ThirdParty/Box2D/.travis.yml new file mode 100644 index 0000000..6c67aec --- /dev/null +++ b/Client/ThirdParty/Box2D/.travis.yml @@ -0,0 +1,32 @@ +language: cpp + +dist: bionic + +# This is clang on macOS +compiler: gcc + +branches: + only: + - master + +addons: + apt: + packages: + - libxrandr-dev + - libxinerama-dev + - libxcursor-dev + - libxi-dev + +jobs: + include: + - os: linux + env: + - os: osx + env: + +script: + - mkdir build + - cd build + - cmake .. + - cmake --build . + - ./bin/unit_test diff --git a/Client/ThirdParty/Box2D/CHANGELOG.md b/Client/ThirdParty/Box2D/CHANGELOG.md new file mode 100644 index 0000000..c192fb9 --- /dev/null +++ b/Client/ThirdParty/Box2D/CHANGELOG.md @@ -0,0 +1,60 @@ +# Changes for version 2.4.1 + +## API Changes +- Extended distance joint to have a minimum and maximum limit. +- Removed rope joint. Use the distance joint instead. +- B2_USER_SETTINGS and b2_user_settings.h can control user data, length units, and maximum polygon vertices. +- Default user data is now uintptr_t instead of void* +- b2FixtureDef::restitutionThreshold lets you set the restitution velocity threshold per fixture. + +## BREAKING Changes +- BREAKING: distance joint 0 stiffness now means the spring is turned off rather than making the joint rigid. +- BREAKING: distance joint minimum and maximum must be set correctly to get old behavior. + +## Infrastructure +- Library installation function available in CMake. +- Shared library (DLL) option available. +- Bug fixes + +# Changes for version 2.4.0 + +## Infrastructure +- Documentation in Doxygen format +- CMake build system +- Unit test support +- Continuous integration testing using Travis CI +- Limited use of C++11 (nullptr and override) +- Restructured folders and renamed files to better match open-source standards +- MIT License +- Removed float32 and float64 +- Linked the Box2D project to GitHub Sponsors + +## Collision +- Chain and edge shape must now be one-sided to eliminate ghost collisions +- Broad-phase optimizations +- Added b2ShapeCast for linear shape casting + +## Dynamics +- Joint limits are now predictive and not stateful +- Experimental 2D cloth (rope) +- b2Body::SetActive -> b2Body::SetEnabled +- Better support for running multiple worlds +- Handle zero density better + - The body behaves like a static body + - The body is drawn with a red color +- Added translation limit to wheel joint +- World dump now writes to box2d_dump.inl +- Static bodies are never awake +- All joints with spring-dampers now use stiffness and damping +- Added utility functions to convert frequency and damping ratio to stiffness and damping + +## Testbed +- Testbed uses dear imgui +- glad OpenGL loader +- OpenGL 3.3 required + +# Changes for version 2.3.0 +- Polygon creation now computes the convex hull. Vertices no longer need to be ordered. +- The convex hull code will merge vertices closer than dm_linearSlop. This may lead to failure on very small polygons. +- Added b2MotorJoint. +- Bug fixes. diff --git a/Client/ThirdParty/Box2D/CMakeLists.txt b/Client/ThirdParty/Box2D/CMakeLists.txt new file mode 100644 index 0000000..c38243c --- /dev/null +++ b/Client/ThirdParty/Box2D/CMakeLists.txt @@ -0,0 +1,65 @@ +cmake_minimum_required(VERSION 3.8) + +# https://cmake.org/cmake/help/latest/command/project.html +project(box2d VERSION 2.4.1) + +# set(CMAKE_CONFIGURATION_TYPES "Debug;RelWithDebInfo" CACHE STRING "" FORCE) + +set(CMAKE_CXX_VISIBILITY_PRESET hidden) +set(CMAKE_VISIBILITY_INLINES_HIDDEN ON) + +option(BOX2D_BUILD_UNIT_TESTS "Build the Box2D unit tests" ON) +option(BOX2D_BUILD_TESTBED "Build the Box2D testbed" ON) +option(BOX2D_BUILD_DOCS "Build the Box2D documentation" OFF) +option(BOX2D_USER_SETTINGS "Override Box2D settings with b2UserSettings.h" OFF) + +option(BUILD_SHARED_LIBS "Build Box2D as a shared library" OFF) + +set(CMAKE_CXX_VISIBILITY_PRESET hidden) +set(CMAKE_VISIBILITY_INLINES_HIDDEN ON) + +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin") +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin") +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin") + +include(GNUInstallDirs) + +set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +if (BOX2D_USER_SETTINGS) + add_compile_definitions(B2_USER_SETTINGS) +endif() + +add_subdirectory(src) + +if (BOX2D_BUILD_DOCS) + set(DOXYGEN_SKIP_DOT TRUE) + find_package(Doxygen) +endif() + +if (DOXYGEN_FOUND AND BOX2D_BUILD_DOCS) + add_subdirectory(docs) +endif() + +if (BOX2D_BUILD_UNIT_TESTS) + add_subdirectory(unit-test) +endif() + +if (BOX2D_BUILD_TESTBED) + add_subdirectory(extern/glad) + add_subdirectory(extern/glfw) + add_subdirectory(extern/imgui) + add_subdirectory(extern/sajson) + add_subdirectory(testbed) + + # default startup project for Visual Studio + if (MSVC) + set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT testbed) + set_property(TARGET testbed PROPERTY VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/testbed") + endif() +endif() + +install( + DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/box2d" + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) diff --git a/Client/ThirdParty/Box2D/LICENSE b/Client/ThirdParty/Box2D/LICENSE new file mode 100644 index 0000000..3600714 --- /dev/null +++ b/Client/ThirdParty/Box2D/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Erin Catto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/Client/ThirdParty/Box2D/README.md b/Client/ThirdParty/Box2D/README.md new file mode 100644 index 0000000..e016563 --- /dev/null +++ b/Client/ThirdParty/Box2D/README.md @@ -0,0 +1,115 @@ +![Box2D Logo](https://box2d.org/images/logo.svg) + +# Build Status +[![Build Status](https://travis-ci.org/erincatto/box2d.svg?branch=master)](https://travis-ci.org/erincatto/box2d) + +# Box2D + +Box2D is a 2D physics engine for games. + +## Contributing + +Please do not submit pull requests with new features or core library changes. Instead, please file an issue first for discussion. For bugs, I prefer detailed bug reports over pull requests. + +## Features + +### Collision +- Continuous collision detection +- Contact callbacks: begin, end, pre-solve, post-solve +- Convex polygons and circles +- Multiple shapes per body +- One-shot contact manifolds +- Dynamic tree broadphase +- Efficient pair management +- Fast broadphase AABB queries +- Collision groups and categories + +### Physics +- Continuous physics with time of impact solver +- Persistent body-joint-contact graph +- Island solution and sleep management +- Contact, friction, and restitution +- Stable stacking with a linear-time solver +- Revolute, prismatic, distance, pulley, gear, mouse joint, and other joint types +- Joint limits, motors, and friction +- Momentum decoupled position correction +- Fairly accurate reaction forces/impulses + +### System +- Small block and stack allocators +- Centralized tuning parameters +- Highly portable C++ with no use of STL containers + +### Testbed +- OpenGL with GLFW +- Graphical user interface with imgui +- Extensible test framework +- Support for loading world dumps + +## Building +- Install [CMake](https://cmake.org/) +- Ensure CMake is in the user `PATH` +- Visual Studio: run `build.bat` from the command prompt +- Otherwise: run `build.sh` from a bash shell +- Results are in the build sub-folder +- On Windows you can open box2d.sln + +## Building Box2D - Using vcpkg +You can download and install Box2D using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager: + +- git clone https://github.com/Microsoft/vcpkg.git +- cd vcpkg +- ./bootstrap-vcpkg.sh +- ./vcpkg integrate install +- ./vcpkg install box2d + +The Box2D port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository. + +Note: vcpkg support is not provided by the Box2D project + +## Building for Xcode +- Install [CMake](https://cmake.org) +- Add Cmake to the path in .zprofile (the default Terminal shell is zsh) + - export PATH="/Applications/CMake.app/Contents/bin:$PATH" +- mkdir build +- cd build +- cmake -G Xcode .. +- open box2d.xcodeproj +- Select the testbed scheme +- Edit the scheme to set a custom working directory, make this be in box2d/testbed +- You can now build and run the testbed + +## Installing using CMake +You can use the CMake install feature to deploy the library to a central location that can +be accessed using: +``` +find_package(box2d REQUIRED) +target_link_libraries(mytarget PRIVATE box2d) +``` +You can build and install the library and docs using this command sequence (requires Doxygen): +``` +mkdir build +cd build +cmake -DBOX2D_BUILD_DOCS=ON .. +cmake --build . +cmake --build . --target INSTALL +``` +On Windows this tries to install in `Program Files` and thus requires admin privileges. Alternatively you can target another directory using something like this: +``` +mkdir build +cd build +cmake -DBOX2D_BUILD_DOCS=ON -DCMAKE_INSTALL_PREFIX="C:/packages" .. +cmake --build . +cmake --build . --target INSTALL +``` + +## Documentation +- [Manual](https://box2d.org/documentation/) +- [reddit](https://www.reddit.com/r/box2d/) +- [Discord](https://discord.gg/NKYgCBP) + +## License +Box2D is developed by Erin Catto, and uses the [MIT license](https://en.wikipedia.org/wiki/MIT_License). + +## Sponsorship +Support development of Box2D through [Github Sponsors](https://github.com/sponsors/erincatto) diff --git a/Client/ThirdParty/Box2D/build.bat b/Client/ThirdParty/Box2D/build.bat new file mode 100644 index 0000000..216561a --- /dev/null +++ b/Client/ThirdParty/Box2D/build.bat @@ -0,0 +1,7 @@ +rem Use this batch file to build box2d for Visual Studio +rmdir /s /q build +mkdir build +cd build +cmake .. +cmake --build . +start box2d.sln diff --git a/Client/ThirdParty/Box2D/build.sh b/Client/ThirdParty/Box2D/build.sh new file mode 100644 index 0000000..3433595 --- /dev/null +++ b/Client/ThirdParty/Box2D/build.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +# Use this to build box2d on any system with a bash shell +rm -rf build +mkdir build +cd build +cmake -DBOX2D_BUILD_DOCS=OFF .. +cmake --build . diff --git a/Client/ThirdParty/Box2D/build_docs.sh b/Client/ThirdParty/Box2D/build_docs.sh new file mode 100644 index 0000000..93e124d --- /dev/null +++ b/Client/ThirdParty/Box2D/build_docs.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +# Builds Box2D along with documentation +rm -rf build +mkdir build +cd build +cmake -DBOX2D_BUILD_DOCS=ON .. +cmake --build . diff --git a/Client/ThirdParty/Box2D/deploy_docs.sh b/Client/ThirdParty/Box2D/deploy_docs.sh new file mode 100644 index 0000000..1813f85 --- /dev/null +++ b/Client/ThirdParty/Box2D/deploy_docs.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +# Copies documentation to blog +cp -R build/docs/html/. ../blog/public/documentation/ diff --git a/Client/ThirdParty/Box2D/docs/CMakeLists.txt b/Client/ThirdParty/Box2D/docs/CMakeLists.txt new file mode 100644 index 0000000..edffb4e --- /dev/null +++ b/Client/ThirdParty/Box2D/docs/CMakeLists.txt @@ -0,0 +1,32 @@ + +# NOTE: The order of this list determines the order of items in the Guides +# (i.e. Pages) list in the generated documentation + +set(BOX2D_DOXYGEN_SOURCES + "include/box2d" + "docs/overview.md" + "docs/hello.md" + "docs/testbed.md" + "docs/common.md" + "docs/collision.md" + "docs/dynamics.md" + "docs/loose_ends.md" + "docs/references.md" + "docs/FAQ.md") + +# Format the source list into a Doxyfile INPUT value that Doxygen can parse +foreach(path IN LISTS BOX2D_DOXYGEN_SOURCES) + set(BOX2D_DOXYGEN_INPUT "${BOX2D_DOXYGEN_INPUT} \\\n\"${CMAKE_SOURCE_DIR}/${path}\"") +endforeach() + +# https://cmake.org/cmake/help/latest/command/configure_file.html +configure_file(Doxyfile.in Doxyfile @ONLY) + +add_custom_target(docs ALL "${DOXYGEN_EXECUTABLE}" + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/docs" + COMMENT "Generating HTML documentation" VERBATIM) + +install( + DIRECTORY "${CMAKE_BINARY_DIR}/docs/html" + DESTINATION "${CMAKE_INSTALL_DOCDIR}" +) diff --git a/Client/ThirdParty/Box2D/docs/Doxyfile.in b/Client/ThirdParty/Box2D/docs/Doxyfile.in new file mode 100644 index 0000000..523c925 --- /dev/null +++ b/Client/ThirdParty/Box2D/docs/Doxyfile.in @@ -0,0 +1,2578 @@ +# Doxyfile 1.8.17 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the configuration +# file that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# https://www.gnu.org/software/libiconv/ for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "Box2D" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = @CMAKE_PROJECT_VERSION@ + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "A 2D physics engine for games" + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = "@CMAKE_SOURCE_DIR@/docs/images/logo.svg" + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = "@CMAKE_BINARY_DIR@/docs" + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all generated output in the proper direction. +# Possible values are: None, LTR, RTL and Context. +# The default value is: None. + +OUTPUT_TEXT_DIRECTION = None + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line +# such as +# /*************** +# as being the beginning of a Javadoc-style comment "banner". If set to NO, the +# Javadoc-style will behave just like regular comments and it will not be +# interpreted by doxygen. +# The default value is: NO. + +JAVADOC_BANNER = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines (in the resulting output). You can put ^^ in the value part of an +# alias to insert a newline as if a physical newline was in the original file. +# When you need a literal { or } or , in the value part of an alias you have to +# escape them by means of a backslash (\), this can lead to conflicts with the +# commands \{ and \} for these it is advised to use the version @{ and @} or use +# a double escape (\\{ and \\}) + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice +# sources only. Doxygen will then generate output that is more tailored for that +# language. For instance, namespaces will be presented as modules, types will be +# separated into more groups, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_SLICE = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, JavaScript, +# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, +# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: +# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser +# tries to guess whether the code is fixed or free formatted code, this is the +# default for Fortran type files), VHDL, tcl. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is +# Fortran), use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See https://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 5. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 5 + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual +# methods of a class will be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIV_VIRTUAL = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# declarations. If set to NO, these declarations will be included in the +# documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# (including Cygwin) ands Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = NO + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. If +# EXTRACT_ALL is set to YES then this flag will automatically be disabled. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = "@BOX2D_BINARY_DIR@/docs/warnings.txt" + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = @BOX2D_DOXYGEN_INPUT@ + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: https://www.gnu.org/software/libiconv/) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment), +# *.doc (to be provided as doxygen C comment), *.txt (to be provided as doxygen +# C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f, *.for, *.tcl, *.vhd, +# *.vhdl, *.ucf, *.qsf and *.ice. + +FILE_PATTERNS = *.c \ + *.cc \ + *.cxx \ + *.cpp \ + *.c++ \ + *.java \ + *.ii \ + *.ixx \ + *.ipp \ + *.i++ \ + *.inl \ + *.idl \ + *.ddl \ + *.odl \ + *.h \ + *.hh \ + *.hxx \ + *.hpp \ + *.h++ \ + *.cs \ + *.d \ + *.php \ + *.php4 \ + *.php5 \ + *.phtml \ + *.inc \ + *.m \ + *.markdown \ + *.md \ + *.mm \ + *.dox \ + *.doc \ + *.txt \ + *.py \ + *.pyw \ + *.f90 \ + *.f95 \ + *.f03 \ + *.f08 \ + *.f \ + *.for \ + *.tcl \ + *.vhd \ + *.vhdl \ + *.ucf \ + *.qsf \ + *.ice + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = NO + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = "@CMAKE_SOURCE_DIR@/docs/images" + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = "@CMAKE_SOURCE_DIR@/docs/overview.md" + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# entity all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see https://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse_libclang=ON option for CMake. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + +# If clang assisted parsing is enabled you can provide the clang parser with the +# path to the compilation database (see: +# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files +# were built. This is equivalent to specifying the "-p" option to a clang tool, +# such as clang-check. These options will then be passed to the parser. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse_libclang=ON option for CMake. + +CLANG_DATABASE_PATH = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = YES + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = "@CMAKE_SOURCE_DIR@/docs/extra.css" + + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# https://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = NO + +# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML +# documentation will contain a main index with vertical navigation menus that +# are dynamically created via JavaScript. If disabled, the navigation index will +# consists of multiple levels of tabs that are statically embedded in every HTML +# page. Disable this option to support browsers that do not have JavaScript, +# like the Qt help browser. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_MENUS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: https://developer.apple.com/xcode/), introduced with OSX +# 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy +# genXcode/_index.html for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = YES + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANSPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands +# to create new LaTeX commands to be used in formulas as building blocks. See +# the section "Including formulas" for details. + +FORMULA_MACROFILE = + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# https://www.mathjax.org) which uses client side JavaScript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from https://www.mathjax.org before deployment. +# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/ + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /