Move MiniGLM to graphics engine folder

This commit is contained in:
Benau
2022-07-24 12:22:06 +08:00
parent da0cce6cd6
commit 593f78a230
27 changed files with 53 additions and 43 deletions

View File

@@ -271,8 +271,9 @@ if(NOT SERVER_ONLY)
endif()
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/graphics_engine")
include_directories(BEFORE "${PROJECT_SOURCE_DIR}/lib/graphics_engine/include")
endif()
# MiniGLM is there
include_directories(BEFORE "${PROJECT_SOURCE_DIR}/lib/graphics_engine/include")
if (NOT SERVER_ONLY)
# Add jpeg library

View File

@@ -171,6 +171,7 @@ LOCAL_SRC_FILES := $(wildcard ../lib/graphics_engine/src/*.c) \
LOCAL_CFLAGS := -I../lib/graphics_engine/include \
-I../lib/graphics_utils \
-I../lib/sdl2/include/ \
-I../lib/bullet/src/ \
-I../lib/irrlicht/include/
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_ARM_NEON := false

View File

@@ -1,6 +1,7 @@
include_directories("${PROJECT_SOURCE_DIR}/lib/graphics_engine/include")
include_directories("${PROJECT_SOURCE_DIR}/lib/graphics_utils")
include_directories("${PROJECT_SOURCE_DIR}/lib/irrlicht/include")
include_directories("${PROJECT_SOURCE_DIR}/lib/bullet/src")
find_path(SDL2_INCLUDEDIR NAMES SDL.h PATH_SUFFIXES SDL2 include/SDL2 include PATHS)
if (NOT SDL2_INCLUDEDIR)
message(FATAL_ERROR "SDL2 not found.")

View File

@@ -1,26 +1,33 @@
// SuperTuxKart - a fun racing game with go-kart
// Copyright (C) 2017 SuperTuxKart-Team
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 3
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/* ==========================================================================
* Copyright (c) 2022 SuperTuxKart-Team
*
* 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.
* ==========================================================================
*/
#ifndef HEADER_MINI_GLM_HPP
#define HEADER_MINI_GLM_HPP
#include "LinearMath/btQuaternion.h"
#include "LinearMath/btTransform.h"
#include "utils/vec3.hpp"
#include "LinearMath/btVector3.h"
#include <algorithm>
#include <array>
@@ -504,11 +511,11 @@ namespace MiniGLM
// ------------------------------------------------------------------------
inline core::quaternion getQuaternion(const core::matrix4& m)
{
Vec3 row[3];
btVector3 row[3];
memcpy(&row[0][0], &m[0], 12);
memcpy(&row[1][0], &m[4], 12);
memcpy(&row[2][0], &m[8], 12);
Vec3 q;
btVector3 q;
float root = row[0].x() + row[1].y() + row[2].z();
const float trace = root;
if (trace > 0.0f)

View File

@@ -11,7 +11,7 @@
#include "graphics/sp/sp_animation.hpp"
#include "graphics/sp/sp_mesh.hpp"
#include "graphics/sp/sp_mesh_buffer.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#include <IVideoDriver.h>
#include <IFileSystem.h>

View File

@@ -22,7 +22,7 @@
#include "graphics/gl_headers.hpp"
#include "utils/constants.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#include "utils/no_copy.hpp"
#include "utils/singleton.hpp"

View File

@@ -22,7 +22,7 @@
#include "graphics/sp/sp_shader_manager.hpp"
#include "graphics/sp/sp_dynamic_draw_call.hpp"
#include "physics/btKart.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#include "utils/vec3.hpp"
#ifndef SERVER_ONLY

View File

@@ -22,7 +22,7 @@
#include "graphics/material_manager.hpp"
#include "graphics/sp/sp_dynamic_draw_call.hpp"
#include "graphics/sp/sp_shader_manager.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#include "utils/vec3.hpp"
/** ShowCurve constructor. It just creates an empty dynamic draw call.

View File

@@ -33,7 +33,7 @@
#include "karts/skidding.hpp"
#include "modes/world.hpp"
#include "physics/btKart.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#ifndef SERVER_ONLY

View File

@@ -36,7 +36,7 @@
#include "network/rewind_manager.hpp"
#include "tracks/quad.hpp"
#include "utils/constants.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
/** Creates the slip stream object
* \param kart Pointer to the kart to which the slip stream

View File

@@ -21,7 +21,7 @@
#include "graphics/sp/sp_shader.hpp"
#include "graphics/sp/sp_texture.hpp"
#include "graphics/sp/sp_texture_manager.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#include "utils/string_utils.hpp"
namespace SP

View File

@@ -18,7 +18,7 @@
#ifndef HEADER_SP_INSTANCED_DATA_HPP
#define HEADER_SP_INSTANCED_DATA_HPP
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#include "utils/vec3.hpp"
#include <cassert>
#include <matrix4.h>

View File

@@ -19,7 +19,7 @@
#include "graphics/sp/sp_animation.hpp"
#include "graphics/sp/sp_mesh_buffer.hpp"
#include "graphics/material.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#include <algorithm>

View File

@@ -24,7 +24,7 @@
#include "graphics/sp/sp_shader_manager.hpp"
#include "graphics/sp/sp_texture_manager.hpp"
#include "race/race_manager.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#include "utils/string_utils.hpp"
#include <set>

View File

@@ -26,7 +26,7 @@
#include "graphics/mesh_tools.hpp"
#include "graphics/stk_tex_manager.hpp"
#include "utils/constants.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#include "utils/string_utils.hpp"
#include "../../lib/irrlicht/source/Irrlicht/CSkinnedMesh.h"

View File

@@ -32,7 +32,7 @@
#include "modes/world.hpp"
#include "physics/physics.hpp"
#include "race/race_manager.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#include "utils/string_utils.hpp"
/** RubberBand constructor. It creates a simple quad and attaches it to the

View File

@@ -29,7 +29,7 @@
#include "physics/physics.hpp"
#include "physics/triangle_mesh.hpp"
#include "tracks/track.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#include <limits>

View File

@@ -30,7 +30,7 @@
#include "tracks/check_cannon.hpp"
#include "tracks/check_manager.hpp"
#include "tracks/track.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#include "LinearMath/btTransform.h"

View File

@@ -30,7 +30,7 @@
#include "network/protocols/client_lobby.hpp"
#include "race/race_manager.hpp"
#include "tracks/track.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#include <cstring>

View File

@@ -26,7 +26,7 @@
#include "modes/follow_the_leader.hpp"
#include "modes/three_strikes_battle.hpp"
#include "network/network_string.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#include "ISceneNode.h"

View File

@@ -286,7 +286,7 @@ extern "C" {
#include "utils/crash_reporting.hpp"
#include "utils/leak_check.hpp"
#include "utils/log.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#include "utils/profiler.hpp"
#include "utils/stk_process.hpp"
#include "utils/string_utils.hpp"

View File

@@ -22,7 +22,7 @@
#include "karts/abstract_kart.hpp"
#include "modes/world.hpp"
#include "network/network_string.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#include "LinearMath/btQuaternion.h"

View File

@@ -20,7 +20,7 @@
#define HEADER_COMPRESS_NETWORK_BODY_HPP
#include "network/network_string.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#include "LinearMath/btMotionState.h"
#include "btBulletDynamicsCommon.h"

View File

@@ -35,7 +35,7 @@
#include "tracks/track.hpp"
#include "tracks/track_object.hpp"
#include "utils/constants.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#include "utils/string_utils.hpp"
#include <ISceneManager.h>

View File

@@ -18,7 +18,7 @@
#include "tracks/quad.hpp"
#include "tracks/graph.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#include "utils/log.hpp"
#include <algorithm>

View File

@@ -79,7 +79,7 @@
#include "tracks/track_object_manager.hpp"
#include "utils/constants.hpp"
#include "utils/log.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"

View File

@@ -17,7 +17,7 @@
#include "utils/constants.hpp"
#include "utils/log.hpp"
#include "utils/mini_glm.hpp"
#include "mini_glm.hpp"
namespace MiniGLM
{