From 4ddcd9f810fa588ccf90442f7b4e5ddf385e85f2 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Thu, 26 Jul 2012 22:26:19 +0200 Subject: [PATCH] Change of paths in src/graphics - moved abstract core to src/graphics/core - moved proper graphics engine to src/graphics/engine --- src/CMakeLists.txt | 26 +++--- src/app/app.h | 4 +- src/graphics/common/README.txt | 5 - src/graphics/core/README.txt | 6 ++ src/graphics/{common => core}/color.cpp | 2 +- src/graphics/{common => core}/color.h | 0 src/graphics/{common => core}/device.h | 10 +- src/graphics/core/light.h | 91 +++++++++++++++++++ src/graphics/{common => core}/material.h | 2 +- src/graphics/{common => core}/texture.h | 0 src/graphics/{common => core}/vertex.h | 2 +- src/graphics/engine/README.txt | 8 ++ src/graphics/{common => engine}/camera.cpp | 2 +- src/graphics/{common => engine}/camera.h | 0 src/graphics/{common => engine}/cloud.cpp | 2 +- src/graphics/{common => engine}/cloud.h | 2 +- src/graphics/{common => engine}/engine.cpp | 4 +- src/graphics/{common => engine}/engine.h | 8 +- .../{common/light.cpp => engine/lightman.cpp} | 4 +- .../{common/light.h => engine/lightman.h} | 69 +------------- src/graphics/{common => engine}/lightning.cpp | 2 +- src/graphics/{common => engine}/lightning.h | 0 src/graphics/{common => engine}/modelfile.cpp | 2 +- src/graphics/{common => engine}/modelfile.h | 6 +- src/graphics/{common => engine}/particle.cpp | 2 +- src/graphics/{common => engine}/particle.h | 0 src/graphics/{common => engine}/planet.cpp | 2 +- src/graphics/{common => engine}/planet.h | 0 src/graphics/{common => engine}/pyro.cpp | 2 +- src/graphics/{common => engine}/pyro.h | 2 +- src/graphics/{common => engine}/terrain.cpp | 2 +- src/graphics/{common => engine}/terrain.h | 2 +- .../{common => engine}/test/CMakeLists.txt | 0 .../test/modelfile_test.cpp | 2 +- src/graphics/{common => engine}/text.cpp | 2 +- src/graphics/{common => engine}/text.h | 4 +- src/graphics/{common => engine}/water.cpp | 2 +- src/graphics/{common => engine}/water.h | 4 +- src/graphics/opengl/README.txt | 4 +- src/graphics/opengl/gldevice.h | 2 +- src/graphics/opengl/test/CMakeLists.txt | 4 +- src/graphics/opengl/test/model_test.cpp | 2 +- 42 files changed, 167 insertions(+), 128 deletions(-) delete mode 100644 src/graphics/common/README.txt create mode 100644 src/graphics/core/README.txt rename src/graphics/{common => core}/color.cpp (98%) rename src/graphics/{common => core}/color.h (100%) rename src/graphics/{common => core}/device.h (98%) create mode 100644 src/graphics/core/light.h rename src/graphics/{common => core}/material.h (97%) rename src/graphics/{common => core}/texture.h (100%) rename src/graphics/{common => core}/vertex.h (99%) create mode 100644 src/graphics/engine/README.txt rename src/graphics/{common => engine}/camera.cpp (96%) rename src/graphics/{common => engine}/camera.h (100%) rename src/graphics/{common => engine}/cloud.cpp (96%) rename src/graphics/{common => engine}/cloud.h (98%) rename src/graphics/{common => engine}/engine.cpp (99%) rename src/graphics/{common => engine}/engine.h (99%) rename src/graphics/{common/light.cpp => engine/lightman.cpp} (99%) rename src/graphics/{common/light.h => engine/lightman.h} (78%) rename src/graphics/{common => engine}/lightning.cpp (95%) rename src/graphics/{common => engine}/lightning.h (100%) rename src/graphics/{common => engine}/modelfile.cpp (99%) rename src/graphics/{common => engine}/modelfile.h (97%) rename src/graphics/{common => engine}/particle.cpp (96%) rename src/graphics/{common => engine}/particle.h (100%) rename src/graphics/{common => engine}/planet.cpp (96%) rename src/graphics/{common => engine}/planet.h (100%) rename src/graphics/{common => engine}/pyro.cpp (96%) rename src/graphics/{common => engine}/pyro.h (99%) rename src/graphics/{common => engine}/terrain.cpp (96%) rename src/graphics/{common => engine}/terrain.h (99%) rename src/graphics/{common => engine}/test/CMakeLists.txt (100%) rename src/graphics/{common => engine}/test/modelfile_test.cpp (96%) rename src/graphics/{common => engine}/text.cpp (96%) rename src/graphics/{common => engine}/text.h (98%) rename src/graphics/{common => engine}/water.cpp (96%) rename src/graphics/{common => engine}/water.h (98%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 06f59906..76a10e9d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -43,19 +43,19 @@ common/iman.cpp # common/profile.cpp # common/restext.cpp common/stringutils.cpp -graphics/common/camera.cpp -graphics/common/cloud.cpp -graphics/common/color.cpp -graphics/common/engine.cpp -graphics/common/light.cpp -graphics/common/lightning.cpp -graphics/common/modelfile.cpp -graphics/common/particle.cpp -graphics/common/planet.cpp -graphics/common/pyro.cpp -graphics/common/terrain.cpp -graphics/common/text.cpp -graphics/common/water.cpp +graphics/core/color.cpp +graphics/engine/camera.cpp +graphics/engine/cloud.cpp +graphics/engine/engine.cpp +graphics/engine/lightman.cpp +graphics/engine/lightning.cpp +graphics/engine/modelfile.cpp +graphics/engine/particle.cpp +graphics/engine/planet.cpp +graphics/engine/pyro.cpp +graphics/engine/terrain.cpp +graphics/engine/text.cpp +graphics/engine/water.cpp graphics/opengl/gldevice.cpp # object/auto/auto.cpp # object/auto/autobase.cpp diff --git a/src/app/app.h b/src/app/app.h index 576ed627..956eab83 100644 --- a/src/app/app.h +++ b/src/app/app.h @@ -22,8 +22,8 @@ #include "common/misc.h" #include "common/singleton.h" -#include "graphics/common/device.h" -#include "graphics/common/engine.h" +#include "graphics/core/device.h" +#include "graphics/engine/engine.h" #include #include diff --git a/src/graphics/common/README.txt b/src/graphics/common/README.txt deleted file mode 100644 index 495a453a..00000000 --- a/src/graphics/common/README.txt +++ /dev/null @@ -1,5 +0,0 @@ -src/graphics/common - -Universal structs and classes used in graphics engine - -Concrete implementation in OpenGL is in graphics/opengl directory. diff --git a/src/graphics/core/README.txt b/src/graphics/core/README.txt new file mode 100644 index 00000000..12beef92 --- /dev/null +++ b/src/graphics/core/README.txt @@ -0,0 +1,6 @@ +src/graphics/core + +Abstract core of graphics engine + +Core types, enums, structs and CDevice abstract class that define +the abstract graphics device used in graphics engine diff --git a/src/graphics/common/color.cpp b/src/graphics/core/color.cpp similarity index 98% rename from src/graphics/common/color.cpp rename to src/graphics/core/color.cpp index c1b7337e..8dec0e45 100644 --- a/src/graphics/common/color.cpp +++ b/src/graphics/core/color.cpp @@ -16,7 +16,7 @@ // color.cpp -#include "graphics/common/color.h" +#include "graphics/core/color.h" #include "math/func.h" diff --git a/src/graphics/common/color.h b/src/graphics/core/color.h similarity index 100% rename from src/graphics/common/color.h rename to src/graphics/core/color.h diff --git a/src/graphics/common/device.h b/src/graphics/core/device.h similarity index 98% rename from src/graphics/common/device.h rename to src/graphics/core/device.h index 7aa4ce3b..ae612b72 100644 --- a/src/graphics/common/device.h +++ b/src/graphics/core/device.h @@ -20,11 +20,11 @@ #pragma once -#include "graphics/common/color.h" -#include "graphics/common/light.h" -#include "graphics/common/material.h" -#include "graphics/common/texture.h" -#include "graphics/common/vertex.h" +#include "graphics/core/color.h" +#include "graphics/core/light.h" +#include "graphics/core/material.h" +#include "graphics/core/texture.h" +#include "graphics/core/vertex.h" #include "math/matrix.h" #include diff --git a/src/graphics/core/light.h b/src/graphics/core/light.h new file mode 100644 index 00000000..b787cb2c --- /dev/null +++ b/src/graphics/core/light.h @@ -0,0 +1,91 @@ +// * This file is part of the COLOBOT source code +// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch +// * Copyright (C) 2012, Polish Portal of Colobot (PPC) +// * +// * 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, see http://www.gnu.org/licenses/. + +// light.h + +#pragma once + + +#include "graphics/core/color.h" +#include "math/vector.h" + + +namespace Gfx { + +/** + \enum LightType + \brief Type of light in 3D scene */ +enum LightType +{ + LIGHT_POINT, + LIGHT_SPOT, + LIGHT_DIRECTIONAL +}; + +/** + \struct Light + \brief Properties of light in 3D scene + + This structure was created as analog to DirectX's D3DLIGHT. */ +struct Light +{ + //! Type of light source + Gfx::LightType type; + //! Color of ambient light + Gfx::Color ambient; + //! Color of diffuse light + Gfx::Color diffuse; + //! Color of specular light + Gfx::Color specular; + //! Position in world space (for point & spot lights) + Math::Vector position; + //! Direction in world space (for directional & spot lights) + Math::Vector direction; + //! Constant attenuation factor + float attenuation0; + //! Linear attenuation factor + float attenuation1; + //! Quadratic attenuation factor + float attenuation2; + //! Angle of spotlight cone (0-90 degrees) + float spotAngle; + //! Intensity of spotlight (0 = uniform; 128 = most intense) + float spotIntensity; + + //! Constructor; calls LoadDefault() + Light() + { + LoadDefault(); + } + + //! Loads default values + void LoadDefault() + { + type = LIGHT_POINT; + ambient = Gfx::Color(0.4f, 0.4f, 0.4f); + diffuse = Gfx::Color(0.8f, 0.8f, 0.8f); + specular = Gfx::Color(1.0f, 1.0f, 1.0f); + position = Math::Vector(0.0f, 0.0f, 0.0f); + direction = Math::Vector(0.0f, 0.0f, 1.0f); + attenuation0 = 1.0f; + attenuation1 = attenuation2 = 0.0f; + spotAngle = 90.0f; + spotIntensity = 0.0f; + } +}; + +}; // namespace Gfx diff --git a/src/graphics/common/material.h b/src/graphics/core/material.h similarity index 97% rename from src/graphics/common/material.h rename to src/graphics/core/material.h index c828d900..31b42f36 100644 --- a/src/graphics/common/material.h +++ b/src/graphics/core/material.h @@ -19,7 +19,7 @@ #pragma once -#include "graphics/common/color.h" +#include "graphics/core/color.h" namespace Gfx { diff --git a/src/graphics/common/texture.h b/src/graphics/core/texture.h similarity index 100% rename from src/graphics/common/texture.h rename to src/graphics/core/texture.h diff --git a/src/graphics/common/vertex.h b/src/graphics/core/vertex.h similarity index 99% rename from src/graphics/common/vertex.h rename to src/graphics/core/vertex.h index 0a745879..b7fab1ca 100644 --- a/src/graphics/common/vertex.h +++ b/src/graphics/core/vertex.h @@ -19,7 +19,7 @@ #pragma once -#include "graphics/common/color.h" +#include "graphics/core/color.h" #include "math/vector.h" #include "math/point.h" diff --git a/src/graphics/engine/README.txt b/src/graphics/engine/README.txt new file mode 100644 index 00000000..308b601b --- /dev/null +++ b/src/graphics/engine/README.txt @@ -0,0 +1,8 @@ +src/graphics/engine + +Graphics engine + +CEngine class and various other classes implementing the main features +of graphics engine from model loading to decorative particles + +Graphics operations are done on abstract interface from src/graphics/core diff --git a/src/graphics/common/camera.cpp b/src/graphics/engine/camera.cpp similarity index 96% rename from src/graphics/common/camera.cpp rename to src/graphics/engine/camera.cpp index 9990d01f..04bf868a 100644 --- a/src/graphics/common/camera.cpp +++ b/src/graphics/engine/camera.cpp @@ -17,7 +17,7 @@ // camera.cpp -#include "graphics/common/camera.h" +#include "graphics/engine/camera.h" // TODO implementation diff --git a/src/graphics/common/camera.h b/src/graphics/engine/camera.h similarity index 100% rename from src/graphics/common/camera.h rename to src/graphics/engine/camera.h diff --git a/src/graphics/common/cloud.cpp b/src/graphics/engine/cloud.cpp similarity index 96% rename from src/graphics/common/cloud.cpp rename to src/graphics/engine/cloud.cpp index 707f6411..d0e5ed80 100644 --- a/src/graphics/common/cloud.cpp +++ b/src/graphics/engine/cloud.cpp @@ -17,7 +17,7 @@ // cloud.cpp -#include "graphics/common/cloud.h" +#include "graphics/engine/cloud.h" // TODO implementation diff --git a/src/graphics/common/cloud.h b/src/graphics/engine/cloud.h similarity index 98% rename from src/graphics/common/cloud.h rename to src/graphics/engine/cloud.h index 19b689f6..d2d29d74 100644 --- a/src/graphics/common/cloud.h +++ b/src/graphics/engine/cloud.h @@ -20,7 +20,7 @@ #pragma once #include "common/event.h" -#include "graphics/common/color.h" +#include "graphics/core/color.h" #include "math/point.h" #include "math/vector.h" diff --git a/src/graphics/common/engine.cpp b/src/graphics/engine/engine.cpp similarity index 99% rename from src/graphics/common/engine.cpp rename to src/graphics/engine/engine.cpp index e6dcfc74..0914f9e2 100644 --- a/src/graphics/common/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -17,14 +17,14 @@ // engine.cpp -#include "graphics/common/engine.h" +#include "graphics/engine/engine.h" #include "app/app.h" #include "common/iman.h" #include "common/image.h" #include "common/key.h" #include "common/logger.h" -#include "graphics/common/device.h" +#include "graphics/core/device.h" #include "math/geometry.h" // Initial size of various vectors diff --git a/src/graphics/common/engine.h b/src/graphics/engine/engine.h similarity index 99% rename from src/graphics/common/engine.h rename to src/graphics/engine/engine.h index 9b6cc1fa..1348cddf 100644 --- a/src/graphics/common/engine.h +++ b/src/graphics/engine/engine.h @@ -21,10 +21,10 @@ #include "common/event.h" -#include "graphics/common/color.h" -#include "graphics/common/material.h" -#include "graphics/common/texture.h" -#include "graphics/common/vertex.h" +#include "graphics/core/color.h" +#include "graphics/core/material.h" +#include "graphics/core/texture.h" +#include "graphics/core/vertex.h" #include "math/intpoint.h" #include "math/matrix.h" #include "math/point.h" diff --git a/src/graphics/common/light.cpp b/src/graphics/engine/lightman.cpp similarity index 99% rename from src/graphics/common/light.cpp rename to src/graphics/engine/lightman.cpp index 3ca890ca..9e15b5ac 100644 --- a/src/graphics/common/light.cpp +++ b/src/graphics/engine/lightman.cpp @@ -17,10 +17,10 @@ // light.cpp -#include "graphics/common/light.h" +#include "graphics/engine/lightman.h" #include "common/iman.h" -#include "graphics/common/device.h" +#include "graphics/core/device.h" #include "math/geometry.h" #include diff --git a/src/graphics/common/light.h b/src/graphics/engine/lightman.h similarity index 78% rename from src/graphics/common/light.h rename to src/graphics/engine/lightman.h index 93e8c1be..82721250 100644 --- a/src/graphics/common/light.h +++ b/src/graphics/engine/lightman.h @@ -15,80 +15,19 @@ // * You should have received a copy of the GNU General Public License // * along with this program. If not, see http://www.gnu.org/licenses/. -// light.h +// lightman.h #pragma once -#include "graphics/common/engine.h" -#include "graphics/common/color.h" +#include "graphics/core/color.h" +#include "graphics/core/light.h" +#include "graphics/engine/engine.h" #include "math/vector.h" namespace Gfx { -/** - \enum LightType - \brief Type of light in 3D scene */ -enum LightType -{ - LIGHT_POINT, - LIGHT_SPOT, - LIGHT_DIRECTIONAL -}; - -/** - \struct Light - \brief Properties of light in 3D scene - - This structure was created as analog to DirectX's D3DLIGHT. */ -struct Light -{ - //! Type of light source - Gfx::LightType type; - //! Color of ambient light - Gfx::Color ambient; - //! Color of diffuse light - Gfx::Color diffuse; - //! Color of specular light - Gfx::Color specular; - //! Position in world space (for point & spot lights) - Math::Vector position; - //! Direction in world space (for directional & spot lights) - Math::Vector direction; - //! Constant attenuation factor - float attenuation0; - //! Linear attenuation factor - float attenuation1; - //! Quadratic attenuation factor - float attenuation2; - //! Angle of spotlight cone (0-90 degrees) - float spotAngle; - //! Intensity of spotlight (0 = uniform; 128 = most intense) - float spotIntensity; - - //! Constructor; calls LoadDefault() - Light() - { - LoadDefault(); - } - - //! Loads default values - void LoadDefault() - { - type = LIGHT_POINT; - ambient = Gfx::Color(0.4f, 0.4f, 0.4f); - diffuse = Gfx::Color(0.8f, 0.8f, 0.8f); - specular = Gfx::Color(1.0f, 1.0f, 1.0f); - position = Math::Vector(0.0f, 0.0f, 0.0f); - direction = Math::Vector(0.0f, 0.0f, 1.0f); - attenuation0 = 1.0f; - attenuation1 = attenuation2 = 0.0f; - spotAngle = 90.0f; - spotIntensity = 0.0f; - } -}; - /** \struct LightProgression \brief Describes the progression of light parameters change */ diff --git a/src/graphics/common/lightning.cpp b/src/graphics/engine/lightning.cpp similarity index 95% rename from src/graphics/common/lightning.cpp rename to src/graphics/engine/lightning.cpp index 076fcb4c..4db5511a 100644 --- a/src/graphics/common/lightning.cpp +++ b/src/graphics/engine/lightning.cpp @@ -17,7 +17,7 @@ // lightning.cpp (aka blitz.cpp) -#include "graphics/common/lightning.h" +#include "graphics/engine/lightning.h" // TODO implementation diff --git a/src/graphics/common/lightning.h b/src/graphics/engine/lightning.h similarity index 100% rename from src/graphics/common/lightning.h rename to src/graphics/engine/lightning.h diff --git a/src/graphics/common/modelfile.cpp b/src/graphics/engine/modelfile.cpp similarity index 99% rename from src/graphics/common/modelfile.cpp rename to src/graphics/engine/modelfile.cpp index 22801e81..537add43 100644 --- a/src/graphics/common/modelfile.cpp +++ b/src/graphics/engine/modelfile.cpp @@ -17,7 +17,7 @@ // modelfile.cpp (aka modfile.cpp) -#include "graphics/common/modelfile.h" +#include "graphics/engine/modelfile.h" #include "common/iman.h" #include "common/ioutils.h" diff --git a/src/graphics/common/modelfile.h b/src/graphics/engine/modelfile.h similarity index 97% rename from src/graphics/common/modelfile.h rename to src/graphics/engine/modelfile.h index f8cb0227..6a30487b 100644 --- a/src/graphics/common/modelfile.h +++ b/src/graphics/engine/modelfile.h @@ -17,9 +17,9 @@ // modelfile.h (aka modfile.h) -#include "graphics/common/engine.h" -#include "graphics/common/vertex.h" -#include "graphics/common/material.h" +#include "graphics/engine/engine.h" +#include "graphics/core/vertex.h" +#include "graphics/core/material.h" #include "math/vector.h" #include diff --git a/src/graphics/common/particle.cpp b/src/graphics/engine/particle.cpp similarity index 96% rename from src/graphics/common/particle.cpp rename to src/graphics/engine/particle.cpp index 322c2d03..84e2f9d7 100644 --- a/src/graphics/common/particle.cpp +++ b/src/graphics/engine/particle.cpp @@ -17,7 +17,7 @@ // particle.cpp (aka particule.cpp) -#include "graphics/common/particle.h" +#include "graphics/engine/particle.h" // TODO implementation diff --git a/src/graphics/common/particle.h b/src/graphics/engine/particle.h similarity index 100% rename from src/graphics/common/particle.h rename to src/graphics/engine/particle.h diff --git a/src/graphics/common/planet.cpp b/src/graphics/engine/planet.cpp similarity index 96% rename from src/graphics/common/planet.cpp rename to src/graphics/engine/planet.cpp index 4fa17a1f..4f1f6145 100644 --- a/src/graphics/common/planet.cpp +++ b/src/graphics/engine/planet.cpp @@ -17,7 +17,7 @@ // planet.cpp -#include "graphics/common/planet.h" +#include "graphics/engine/planet.h" // TODO implementation diff --git a/src/graphics/common/planet.h b/src/graphics/engine/planet.h similarity index 100% rename from src/graphics/common/planet.h rename to src/graphics/engine/planet.h diff --git a/src/graphics/common/pyro.cpp b/src/graphics/engine/pyro.cpp similarity index 96% rename from src/graphics/common/pyro.cpp rename to src/graphics/engine/pyro.cpp index 6b5b1afe..e699db2a 100644 --- a/src/graphics/common/pyro.cpp +++ b/src/graphics/engine/pyro.cpp @@ -17,7 +17,7 @@ // pyro.cpp -#include "graphics/common/pyro.h" +#include "graphics/engine/pyro.h" // TODO implementation diff --git a/src/graphics/common/pyro.h b/src/graphics/engine/pyro.h similarity index 99% rename from src/graphics/common/pyro.h rename to src/graphics/engine/pyro.h index fda74b3e..d663ca58 100644 --- a/src/graphics/common/pyro.h +++ b/src/graphics/engine/pyro.h @@ -20,7 +20,7 @@ #pragma once #include "common/misc.h" -#include "graphics/common/engine.h" +#include "graphics/engine/engine.h" //#include "object/object.h" // TEMPORARILY! enum ObjectType {}; diff --git a/src/graphics/common/terrain.cpp b/src/graphics/engine/terrain.cpp similarity index 96% rename from src/graphics/common/terrain.cpp rename to src/graphics/engine/terrain.cpp index 9b61dfc6..c489321a 100644 --- a/src/graphics/common/terrain.cpp +++ b/src/graphics/engine/terrain.cpp @@ -17,7 +17,7 @@ // terrain.cpp -#include "graphics/common/terrain.h" +#include "graphics/engine/terrain.h" // TODO implementation diff --git a/src/graphics/common/terrain.h b/src/graphics/engine/terrain.h similarity index 99% rename from src/graphics/common/terrain.h rename to src/graphics/engine/terrain.h index fd9a1a60..8d8b1658 100644 --- a/src/graphics/common/terrain.h +++ b/src/graphics/engine/terrain.h @@ -19,7 +19,7 @@ #pragma once -#include "graphics/common/engine.h" +#include "graphics/engine/engine.h" class CInstanceManager; diff --git a/src/graphics/common/test/CMakeLists.txt b/src/graphics/engine/test/CMakeLists.txt similarity index 100% rename from src/graphics/common/test/CMakeLists.txt rename to src/graphics/engine/test/CMakeLists.txt diff --git a/src/graphics/common/test/modelfile_test.cpp b/src/graphics/engine/test/modelfile_test.cpp similarity index 96% rename from src/graphics/common/test/modelfile_test.cpp rename to src/graphics/engine/test/modelfile_test.cpp index cc44f987..f7ed87f0 100644 --- a/src/graphics/common/test/modelfile_test.cpp +++ b/src/graphics/engine/test/modelfile_test.cpp @@ -1,4 +1,4 @@ -#include "graphics/common/modelfile.h" +#include "graphics/engine/modelfile.h" #include "common/iman.h" #include diff --git a/src/graphics/common/text.cpp b/src/graphics/engine/text.cpp similarity index 96% rename from src/graphics/common/text.cpp rename to src/graphics/engine/text.cpp index 0c5eb664..2a9543c6 100644 --- a/src/graphics/common/text.cpp +++ b/src/graphics/engine/text.cpp @@ -17,7 +17,7 @@ // text.cpp -#include "graphics/common/text.h" +#include "graphics/engine/text.h" // TODO implementation diff --git a/src/graphics/common/text.h b/src/graphics/engine/text.h similarity index 98% rename from src/graphics/common/text.h rename to src/graphics/engine/text.h index f96dc61c..c2de220f 100644 --- a/src/graphics/common/text.h +++ b/src/graphics/engine/text.h @@ -19,8 +19,8 @@ #pragma once -#include "graphics/common/engine.h" -#include "graphics/common/device.h" +#include "graphics/engine/engine.h" +#include "graphics/core/device.h" #include "math/point.h" diff --git a/src/graphics/common/water.cpp b/src/graphics/engine/water.cpp similarity index 96% rename from src/graphics/common/water.cpp rename to src/graphics/engine/water.cpp index 5172b9ff..a157e829 100644 --- a/src/graphics/common/water.cpp +++ b/src/graphics/engine/water.cpp @@ -17,7 +17,7 @@ // water.cpp -#include "graphics/common/water.h" +#include "graphics/engine/water.h" // TODO implementation diff --git a/src/graphics/common/water.h b/src/graphics/engine/water.h similarity index 98% rename from src/graphics/common/water.h rename to src/graphics/engine/water.h index f5224a4b..67be9dcd 100644 --- a/src/graphics/common/water.h +++ b/src/graphics/engine/water.h @@ -19,8 +19,8 @@ #pragma once -#include "graphics/common/engine.h" -#include "graphics/common/particle.h" +#include "graphics/engine/engine.h" +#include "graphics/engine/particle.h" #include "common/event.h" diff --git a/src/graphics/opengl/README.txt b/src/graphics/opengl/README.txt index 11aba8d0..0aba0ed8 100644 --- a/src/graphics/opengl/README.txt +++ b/src/graphics/opengl/README.txt @@ -2,5 +2,5 @@ src/graphics/opengl OpenGL engine implementation -Contains the concreate implementation using OpenGL of functions -of grahpics engine in graphics/common. +Contains the concrete implementation using OpenGL of abstract CDevice class +from src/graphics/core diff --git a/src/graphics/opengl/gldevice.h b/src/graphics/opengl/gldevice.h index b779123d..313ea02b 100644 --- a/src/graphics/opengl/gldevice.h +++ b/src/graphics/opengl/gldevice.h @@ -19,7 +19,7 @@ #pragma once -#include "graphics/common/device.h" +#include "graphics/core/device.h" #include #include diff --git a/src/graphics/opengl/test/CMakeLists.txt b/src/graphics/opengl/test/CMakeLists.txt index 793e8587..8ed73641 100644 --- a/src/graphics/opengl/test/CMakeLists.txt +++ b/src/graphics/opengl/test/CMakeLists.txt @@ -37,7 +37,7 @@ texture_test.cpp set(MODEL_SOURCES ../gldevice.cpp -../../common/modelfile.cpp +../../engine/modelfile.cpp ../../../common/logger.cpp ../../../common/image.cpp ../../../common/iman.cpp @@ -84,4 +84,4 @@ add_executable(transform_test ${TRANSFORM_SOURCES}) target_link_libraries(transform_test ${LIBS}) add_executable(light_test ${LIGHT_SOURCES}) -target_link_libraries(light_test ${LIBS}) \ No newline at end of file +target_link_libraries(light_test ${LIBS}) diff --git a/src/graphics/opengl/test/model_test.cpp b/src/graphics/opengl/test/model_test.cpp index 3e3d100b..3e8efe67 100644 --- a/src/graphics/opengl/test/model_test.cpp +++ b/src/graphics/opengl/test/model_test.cpp @@ -2,7 +2,7 @@ #include "common/logger.h" #include "common/image.h" #include "common/iman.h" -#include "graphics/common/modelfile.h" +#include "graphics/engine/modelfile.h" #include "graphics/opengl/gldevice.h" #include "math/geometry.h"