diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f615081f..376d9d35 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -95,6 +95,7 @@ add_library(colobotbase STATIC graphics/core/material.h graphics/core/texture.h graphics/core/transparency.h + graphics/core/triangle.h graphics/core/type.cpp graphics/core/type.h graphics/core/renderers.h diff --git a/src/graphics/core/device.h b/src/graphics/core/device.h index 987b054f..272b692c 100644 --- a/src/graphics/core/device.h +++ b/src/graphics/core/device.h @@ -26,7 +26,6 @@ #include "graphics/core/color.h" #include "graphics/core/texture.h" -#include "graphics/core/transparency.h" #include "graphics/core/vertex.h" #include @@ -59,6 +58,7 @@ struct VertexCol; struct Vertex3D; enum class CullFace : unsigned char; +enum class TransparencyMode : unsigned char; /** * \struct DeviceConfig diff --git a/src/graphics/core/material.h b/src/graphics/core/material.h index 5d5b255e..bda24413 100644 --- a/src/graphics/core/material.h +++ b/src/graphics/core/material.h @@ -65,7 +65,7 @@ struct Material //! Normal map std::string normalTexture = ""; //! Alpha mode - AlphaMode alphaMode = AlphaMode::OPAQUE; + AlphaMode alphaMode = AlphaMode::NONE; //! Alpha threshold float alphaThreshold = 0.0; // Cull face diff --git a/src/graphics/core/renderers.h b/src/graphics/core/renderers.h index 28daa4ad..af55c1fd 100644 --- a/src/graphics/core/renderers.h +++ b/src/graphics/core/renderers.h @@ -24,7 +24,6 @@ #pragma once -#include "graphics/core/transparency.h" #include "graphics/core/vertex.h" #include @@ -36,6 +35,7 @@ namespace Gfx class CVertexBuffer; enum class CullFace : unsigned char; enum class PrimitiveType : unsigned char; +enum class TransparencyMode : unsigned char; struct Texture; struct ShadowParam diff --git a/src/graphics/core/transparency.h b/src/graphics/core/transparency.h index afc847c1..45b404ea 100644 --- a/src/graphics/core/transparency.h +++ b/src/graphics/core/transparency.h @@ -40,7 +40,7 @@ enum class TransparencyMode : unsigned char //! Alpha transparency mode enum class AlphaMode : unsigned char { - OPAQUE, // opaque material + NONE, // opaque material MASK, // alpha scissor with threshold BLEND, // alpha blending }; diff --git a/src/graphics/core/triangle.h b/src/graphics/core/triangle.h new file mode 100644 index 00000000..94823caf --- /dev/null +++ b/src/graphics/core/triangle.h @@ -0,0 +1,46 @@ +/* + * This file is part of the Colobot: Gold Edition source code + * Copyright (C) 2001-2021, Daniel Roux, EPSITEC SA & TerranovaTeam + * http://epsitec.ch; http://colobot.info; http://github.com/colobot + * + * 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://gnu.org/licenses + */ + + /** + * \file graphics/core/triangle.h + * \brief Triangle struct + */ + +#pragma once + +#include "graphics/core/material.h" +#include "graphics/core/vertex.h" + +// Graphics module namespace +namespace Gfx +{ + +/** + * \struct EngineTriangle + * \brief A triangle drawn by the graphics engine + */ +struct EngineTriangle +{ + //! Triangle vertices + Vertex3D triangle[3]; + //! Triangle material + Material material; +}; + +} // namespace Gfx diff --git a/src/graphics/engine/camera.cpp b/src/graphics/engine/camera.cpp index 11c66a9d..49ee1041 100644 --- a/src/graphics/engine/camera.cpp +++ b/src/graphics/engine/camera.cpp @@ -25,6 +25,8 @@ #include "common/event.h" +#include "graphics/core/transparency.h" + #include "graphics/engine/engine.h" #include "graphics/engine/terrain.h" #include "graphics/engine/water.h" @@ -582,7 +584,7 @@ void CCamera::FlushOver() { m_overType = CAM_OVER_EFFECT_NULL; m_overColorBase = Color(0.0f, 0.0f, 0.0f, 0.0f); // black - m_engine->SetOverColor(); // nothing + m_engine->SetOverColor(Color(), TransparencyMode::BLACK); // nothing } void CCamera::SetOverBaseColor(Color color) diff --git a/src/graphics/engine/camera.h b/src/graphics/engine/camera.h index cf655563..0388cd91 100644 --- a/src/graphics/engine/camera.h +++ b/src/graphics/engine/camera.h @@ -37,6 +37,7 @@ struct Event; namespace Gfx { +enum class TransparencyMode : unsigned char; /** \enum CameraType diff --git a/src/graphics/engine/cloud.cpp b/src/graphics/engine/cloud.cpp index c721fa0d..e1c15ffc 100644 --- a/src/graphics/engine/cloud.cpp +++ b/src/graphics/engine/cloud.cpp @@ -22,6 +22,7 @@ #include "graphics/core/device.h" #include "graphics/core/renderers.h" +#include "graphics/core/transparency.h" #include "graphics/engine/engine.h" #include "graphics/engine/terrain.h" diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp index 41e0f4bb..6593d5f5 100644 --- a/src/graphics/engine/engine.cpp +++ b/src/graphics/engine/engine.cpp @@ -34,7 +34,9 @@ #include "graphics/core/device.h" #include "graphics/core/framebuffer.h" +#include "graphics/core/material.h" #include "graphics/core/renderers.h" +#include "graphics/core/triangle.h" #include "graphics/engine/camera.h" #include "graphics/engine/cloud.h" @@ -70,6 +72,56 @@ using TimeUtils::TimeUnit; namespace Gfx { +/** + * \struct EngineBaseObjDataTier + * \brief Tier 3 of object tree (data) + */ +struct EngineBaseObjDataTier +{ + EngineTriangleType type = EngineTriangleType::TRIANGLES; + Material material = {}; + + std::vector vertices; + CVertexBuffer* buffer = nullptr; + bool updateStaticBuffer = false; + + Texture albedoTexture; + Texture emissiveTexture; + Texture materialTexture; + Texture normalTexture; + Texture detailTexture; + + glm::vec2 uvOffset = { 0.0f, 0.0f }; + glm::vec2 uvScale = { 1.0f, 1.0f }; +}; + +/** + * \struct BaseEngineObject + * \brief Base (template) object - geometry for engine objects + * + * This is also the tier 1 of base object tree. + */ +struct EngineBaseObject +{ + //! If true, base object is valid in objects vector + bool used = false; + //! Number of triangles + int totalTriangles = 0; + //! Bounding box min (origin 0,0,0 always included) + glm::vec3 bboxMin{ 0, 0, 0 }; + //! bounding box max (origin 0,0,0 always included) + glm::vec3 bboxMax{ 0, 0, 0 }; + //! A bounding sphere that contains all the vertices in this EngineBaseObject + Math::Sphere boundingSphere; + //! Next tier + std::vector next; + + inline void LoadDefault() + { + *this = EngineBaseObject(); + } +}; + /** * \struct EngineMouse * \brief Information about mouse cursor @@ -237,7 +289,6 @@ CEngine::CEngine(CApplication *app, CSystemUtils* systemUtils) Math::LoadTranslationMatrix(temp2, glm::vec3(1.0f, 1.0f, 1.0f)); m_shadowBias = temp1 * temp2; - m_lastState = -1; m_statisticTriangle = 0; m_fps = 0.0f; m_firstGroundSpot = false; @@ -2592,9 +2643,6 @@ void CEngine::Render() return; m_statisticTriangle = 0; - m_lastState = -1; - m_lastColor = Color(-1.0f); - m_lastMaterial = Material(); m_lightMan->UpdateLights(); @@ -2824,7 +2872,7 @@ void CEngine::Draw3DScene() continue; } - if (data.material.alphaMode != AlphaMode::OPAQUE) + if (data.material.alphaMode != AlphaMode::NONE) { objectRenderer->SetAlphaScissor(data.material.alphaThreshold); } @@ -3450,7 +3498,6 @@ void CEngine::DrawInterface() // Force new state to disable lighting m_interfaceMode = true; - m_lastState = -1; // Draw the entire interface Ui::CInterface* interface = CRobotMain::GetInstancePointer()->GetInterface(); @@ -3460,7 +3507,6 @@ void CEngine::DrawInterface() } m_interfaceMode = false; - m_lastState = -1; if (!m_screenshotMode && m_renderInterface) { diff --git a/src/graphics/engine/engine.h b/src/graphics/engine/engine.h index 330029fd..9a18df7b 100644 --- a/src/graphics/engine/engine.h +++ b/src/graphics/engine/engine.h @@ -28,7 +28,6 @@ #include "common/system/system.h" #include "graphics/core/color.h" -#include "graphics/core/material.h" #include "graphics/core/texture.h" #include "graphics/core/renderers.h" #include "graphics/core/vertex.h" @@ -69,9 +68,14 @@ class CTerrain; class CPyroManager; class CModelMesh; class CVertexBuffer; +struct EngineBaseObjDataTier; +struct EngineBaseObject; +struct EngineTriangle; +struct Material; struct ModelShadowSpot; struct ModelTriangle; +enum class TransparencyMode : unsigned char; /** * \enum EngineTriangleType @@ -85,18 +89,6 @@ enum class EngineTriangleType SURFACE = 2 }; -/** - * \struct EngineTriangle - * \brief A triangle drawn by the graphics engine - */ -struct EngineTriangle -{ - //! Triangle vertices - Vertex3D triangle[3]; - //! Triangle material - Material material; -}; - /** \enum EngineObjectType \brief Class of graphics engine object */ @@ -118,57 +110,6 @@ enum EngineObjectType ENG_OBJTYPE_METAL = 6 }; - -/** - * \struct EngineBaseObjDataTier - * \brief Tier 3 of object tree (data) - */ -struct EngineBaseObjDataTier -{ - EngineTriangleType type = EngineTriangleType::TRIANGLES; - Material material = {}; - - std::vector vertices; - CVertexBuffer* buffer = nullptr; - bool updateStaticBuffer = false; - - Texture albedoTexture; - Texture emissiveTexture; - Texture materialTexture; - Texture normalTexture; - Texture detailTexture; - - glm::vec2 uvOffset = { 0.0f, 0.0f }; - glm::vec2 uvScale = { 1.0f, 1.0f }; -}; - -/** - * \struct BaseEngineObject - * \brief Base (template) object - geometry for engine objects - * - * This is also the tier 1 of base object tree. - */ -struct EngineBaseObject -{ - //! If true, base object is valid in objects vector - bool used = false; - //! Number of triangles - int totalTriangles = 0; - //! Bounding box min (origin 0,0,0 always included) - glm::vec3 bboxMin{ 0, 0, 0 }; - //! bounding box max (origin 0,0,0 always included) - glm::vec3 bboxMax{ 0, 0, 0 }; - //! A bounding sphere that contains all the vertices in this EngineBaseObject - Math::Sphere boundingSphere; - //! Next tier - std::vector next; - - inline void LoadDefault() - { - *this = EngineBaseObject(); - } -}; - /** * \struct EngineObject * \brief Object drawn by the graphics engine @@ -875,7 +816,7 @@ public: //! Specifies whether to draw the foreground void SetOverFront(bool front); //! Sets the foreground overlay color - void SetOverColor(const Color& color = Color(), TransparencyMode mode = TransparencyMode::BLACK); + void SetOverColor(const Color& color, TransparencyMode mode); //@{ //! Management of the particle density @@ -1335,15 +1276,6 @@ protected: //! Type of mouse cursor EngineMouseType m_mouseType; - //! Last engine render state (-1 at the beginning of frame) - int m_lastState; - //! Last color set with render state - Color m_lastColor; - //! Last texture names for 2 used texture stages - std::string m_lastTexture[2]; - //! Last material - Material m_lastMaterial; - //! True when drawing 2D UI bool m_interfaceMode; diff --git a/src/graphics/engine/lightning.cpp b/src/graphics/engine/lightning.cpp index abfe4624..fb5e41b2 100644 --- a/src/graphics/engine/lightning.cpp +++ b/src/graphics/engine/lightning.cpp @@ -24,6 +24,7 @@ #include "common/logger.h" #include "graphics/core/device.h" +#include "graphics/core/transparency.h" #include "graphics/engine/camera.h" #include "graphics/engine/terrain.h" diff --git a/src/graphics/engine/particle.cpp b/src/graphics/engine/particle.cpp index b61eb0a9..b689b9e4 100644 --- a/src/graphics/engine/particle.cpp +++ b/src/graphics/engine/particle.cpp @@ -26,6 +26,7 @@ #include "graphics/core/device.h" #include "graphics/core/renderers.h" +#include "graphics/core/triangle.h" #include "graphics/engine/engine.h" #include "graphics/engine/terrain.h" @@ -73,7 +74,7 @@ static bool IsAlien(ObjectType type) } CParticle::CParticle(CEngine* engine) - : m_engine(engine) + : m_engine(engine), m_triangle(MAXPARTICULE) { std::fill_n(m_frameUpdate, SH_MAX, true); } diff --git a/src/graphics/engine/particle.h b/src/graphics/engine/particle.h index b0dfff6d..f0966346 100644 --- a/src/graphics/engine/particle.h +++ b/src/graphics/engine/particle.h @@ -31,6 +31,7 @@ #include "sound/sound_type.h" +#include class CRobotMain; class CObject; @@ -42,6 +43,7 @@ namespace Gfx { class CParticleRenderer; +struct EngineTriangle; const short MAXPARTICULE = 500; const short MAXPARTITYPE = 6; @@ -344,7 +346,7 @@ protected: CParticleRenderer* m_renderer = nullptr; Particle m_particle[MAXPARTICULE*MAXPARTITYPE]; - EngineTriangle m_triangle[MAXPARTICULE]; // triangle if PartiType == 0 + std::vector m_triangle; // triangle if PartiType == 0 Track m_track[MAXTRACK]; int m_wheelTraceTotal = 0; int m_wheelTraceIndex = 0; diff --git a/src/graphics/engine/planet.cpp b/src/graphics/engine/planet.cpp index 8f237df5..a2c78552 100644 --- a/src/graphics/engine/planet.cpp +++ b/src/graphics/engine/planet.cpp @@ -24,6 +24,7 @@ #include "graphics/core/device.h" #include "graphics/core/renderers.h" +#include "graphics/core/transparency.h" #include "graphics/engine/engine.h" diff --git a/src/graphics/engine/pyro.cpp b/src/graphics/engine/pyro.cpp index 55895f09..dc047c41 100644 --- a/src/graphics/engine/pyro.cpp +++ b/src/graphics/engine/pyro.cpp @@ -24,6 +24,8 @@ #include "common/logger.h" +#include "graphics/core/triangle.h" + #include "graphics/engine/lightman.h" #include "graphics/engine/particle.h" #include "graphics/engine/terrain.h" diff --git a/src/graphics/engine/terrain.cpp b/src/graphics/engine/terrain.cpp index 341e176b..ab1641a0 100644 --- a/src/graphics/engine/terrain.cpp +++ b/src/graphics/engine/terrain.cpp @@ -17,7 +17,6 @@ * along with this program. If not, see http://gnu.org/licenses */ - #include "graphics/engine/terrain.h" #include "app/app.h" @@ -25,6 +24,8 @@ #include "common/image.h" #include "common/logger.h" +#include "graphics/core/triangle.h" + #include "graphics/engine/engine.h" #include "graphics/engine/water.h" diff --git a/src/graphics/engine/text.cpp b/src/graphics/engine/text.cpp index 02bb3150..87c2d9ff 100644 --- a/src/graphics/engine/text.cpp +++ b/src/graphics/engine/text.cpp @@ -30,6 +30,7 @@ #include "common/resources/resourcemanager.h" #include "graphics/core/renderers.h" +#include "graphics/core/transparency.h" #include "graphics/engine/engine.h" diff --git a/src/graphics/engine/water.cpp b/src/graphics/engine/water.cpp index 14d4e887..70d85d58 100644 --- a/src/graphics/engine/water.cpp +++ b/src/graphics/engine/water.cpp @@ -25,6 +25,7 @@ #include "graphics/core/device.h" #include "graphics/core/renderers.h" +#include "graphics/core/transparency.h" #include "graphics/engine/engine.h" #include "graphics/engine/terrain.h" diff --git a/src/graphics/model/model_input.cpp b/src/graphics/model/model_input.cpp index 6bb0fcd1..a49324cf 100644 --- a/src/graphics/model/model_input.cpp +++ b/src/graphics/model/model_input.cpp @@ -402,7 +402,7 @@ CModelMesh ModelInput::ReadTextMesh(std::istream& stream) bool doubleSided = ReadLineString(stream, "dbl_side") == std::string("Y"); t.material.cullFace = doubleSided ? CullFace::NONE : CullFace::BACK; - if (t.material.alphaMode != AlphaMode::OPAQUE) + if (t.material.alphaMode != AlphaMode::NONE) t.material.alphaThreshold = 0.5f; mesh.AddTriangle(t); @@ -647,7 +647,7 @@ void ModelInput::ConvertFromOldRenderState(ModelTriangle& triangle, int state) triangle.material.alphaThreshold = 0.5f; } else - triangle.material.alphaMode = AlphaMode::OPAQUE; + triangle.material.alphaMode = AlphaMode::NONE; if ((state & static_cast(ModelRenderState::Part1)) != 0) triangle.material.tag = "tracker_right"; @@ -891,11 +891,11 @@ Math::Sphere ModelInput::ParseCameraCollisionSphere(const std::string& text) AlphaMode ModelInput::ParseTransparentMode(const std::string& text) { if (text == "none") - return AlphaMode::OPAQUE; + return AlphaMode::NONE; else if (text == "alpha") return AlphaMode::MASK; else - return AlphaMode::OPAQUE; + return AlphaMode::NONE; } std::string ModelInput::ParseSpecialMark(const std::string& text) diff --git a/src/graphics/opengl/gl33device.cpp b/src/graphics/opengl/gl33device.cpp index 7f6596d9..a2d14b2e 100644 --- a/src/graphics/opengl/gl33device.cpp +++ b/src/graphics/opengl/gl33device.cpp @@ -27,6 +27,8 @@ #include "common/make_unique.h" #include "graphics/core/light.h" +#include "graphics/core/material.h" +#include "graphics/core/transparency.h" #include "graphics/engine/engine.h" diff --git a/src/graphics/opengl/gl33device.h b/src/graphics/opengl/gl33device.h index 1db93197..7617e994 100644 --- a/src/graphics/opengl/gl33device.h +++ b/src/graphics/opengl/gl33device.h @@ -26,8 +26,6 @@ #include "graphics/core/device.h" -#include "graphics/core/material.h" - #include "graphics/opengl/glframebuffer.h" #include "graphics/opengl/glutil.h" @@ -43,6 +41,9 @@ namespace Gfx { +enum class CullFace : unsigned char; +enum class TransparencyMode : unsigned char; + //! Struct for dynamic buffers struct DynamicBuffer { @@ -196,9 +197,9 @@ private: //! Depth mask bool m_depthMask = true; //! Cull face mode - CullFace m_cullFace = CullFace::NONE; + CullFace m_cullFace = {}; //! Transparency mode - TransparencyMode m_transparency = TransparencyMode::NONE; + TransparencyMode m_transparency = {}; }; } // namespace Gfx diff --git a/src/graphics/opengl/gl33objectrenderer.cpp b/src/graphics/opengl/gl33objectrenderer.cpp index ee15a354..2986b30b 100644 --- a/src/graphics/opengl/gl33objectrenderer.cpp +++ b/src/graphics/opengl/gl33objectrenderer.cpp @@ -22,6 +22,8 @@ #include "graphics/opengl/gl33device.h" #include "graphics/opengl/glutil.h" +#include "graphics/core/material.h" +#include "graphics/core/transparency.h" #include "graphics/core/vertex.h" #include "common/logger.h" diff --git a/src/graphics/opengl/gl33particlerenderer.cpp b/src/graphics/opengl/gl33particlerenderer.cpp index d99435b8..06948879 100644 --- a/src/graphics/opengl/gl33particlerenderer.cpp +++ b/src/graphics/opengl/gl33particlerenderer.cpp @@ -3,6 +3,8 @@ #include "graphics/opengl/gl33device.h" #include "graphics/opengl/glutil.h" +#include "graphics/core/material.h" +#include "graphics/core/transparency.h" #include "graphics/core/vertex.h" #include "common/logger.h" diff --git a/src/graphics/opengl/gl33renderers.cpp b/src/graphics/opengl/gl33renderers.cpp index 21000128..5984b621 100644 --- a/src/graphics/opengl/gl33renderers.cpp +++ b/src/graphics/opengl/gl33renderers.cpp @@ -3,6 +3,8 @@ #include "graphics/opengl/gl33device.h" #include "graphics/opengl/glutil.h" +#include "graphics/core/material.h" +#include "graphics/core/transparency.h" #include "graphics/core/vertex.h" #include "common/logger.h" diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp index 9f53e79e..83393008 100644 --- a/src/level/robotmain.cpp +++ b/src/level/robotmain.cpp @@ -37,6 +37,8 @@ #include "common/resources/outputstream.h" #include "common/resources/resourcemanager.h" +#include "graphics/core/material.h" + #include "graphics/engine/camera.h" #include "graphics/engine/cloud.h" #include "graphics/engine/engine.h" @@ -446,7 +448,7 @@ void CRobotMain::ChangePhase(Phase phase) m_engine->SetBackground(""); m_engine->SetBackForce(false); m_engine->SetForegroundName(""); - m_engine->SetOverColor(); + m_engine->SetOverColor(Gfx::Color(), Gfx::TransparencyMode::BLACK); m_engine->DeleteGroundMark(0); SetSpeed(1.0f); m_terrain->SetWind(glm::vec3(0.0f, 0.0f, 0.0f)); diff --git a/src/ui/controls/button.cpp b/src/ui/controls/button.cpp index e6e4c371..0f188d51 100644 --- a/src/ui/controls/button.cpp +++ b/src/ui/controls/button.cpp @@ -26,6 +26,7 @@ #include "graphics/engine/engine.h" #include "graphics/core/device.h" #include "graphics/core/renderers.h" +#include "graphics/core/transparency.h" namespace Ui diff --git a/src/ui/controls/check.cpp b/src/ui/controls/check.cpp index a971a7e4..b4ffbc73 100644 --- a/src/ui/controls/check.cpp +++ b/src/ui/controls/check.cpp @@ -25,6 +25,8 @@ #include "graphics/core/device.h" #include "graphics/core/renderers.h" +#include "graphics/core/transparency.h" + #include "graphics/engine/engine.h" #include "graphics/engine/text.h" diff --git a/src/ui/controls/color.cpp b/src/ui/controls/color.cpp index a8352999..c70d8bf5 100644 --- a/src/ui/controls/color.cpp +++ b/src/ui/controls/color.cpp @@ -25,6 +25,7 @@ #include "graphics/core/device.h" #include "graphics/core/renderers.h" +#include "graphics/core/transparency.h" #include "graphics/engine/engine.h" diff --git a/src/ui/controls/control.cpp b/src/ui/controls/control.cpp index 8d3c857e..c2816116 100644 --- a/src/ui/controls/control.cpp +++ b/src/ui/controls/control.cpp @@ -29,6 +29,7 @@ #include "level/robotmain.h" #include "graphics/core/renderers.h" +#include "graphics/core/transparency.h" #include "math/func.h" diff --git a/src/ui/controls/edit.cpp b/src/ui/controls/edit.cpp index e1249295..9da4933d 100644 --- a/src/ui/controls/edit.cpp +++ b/src/ui/controls/edit.cpp @@ -32,6 +32,8 @@ #include "common/resources/outputstream.h" #include "graphics/core/renderers.h" +#include "graphics/core/transparency.h" + #include "graphics/engine/engine.h" #include "level/parser/parser.h" diff --git a/src/ui/controls/gauge.cpp b/src/ui/controls/gauge.cpp index 5ea066c9..7d51bfe4 100644 --- a/src/ui/controls/gauge.cpp +++ b/src/ui/controls/gauge.cpp @@ -21,8 +21,10 @@ #include "ui/controls/gauge.h" #include "graphics/engine/engine.h" + #include "graphics/core/device.h" #include "graphics/core/renderers.h" +#include "graphics/core/transparency.h" namespace Ui diff --git a/src/ui/controls/group.cpp b/src/ui/controls/group.cpp index ae47a371..7e5cf0cf 100644 --- a/src/ui/controls/group.cpp +++ b/src/ui/controls/group.cpp @@ -25,6 +25,8 @@ #include "graphics/core/device.h" #include "graphics/core/renderers.h" +#include "graphics/core/transparency.h" + #include "graphics/engine/engine.h" #include "math/func.h" diff --git a/src/ui/controls/image.cpp b/src/ui/controls/image.cpp index e7c2a4ae..7f768815 100644 --- a/src/ui/controls/image.cpp +++ b/src/ui/controls/image.cpp @@ -25,6 +25,8 @@ #include "graphics/core/device.h" #include "graphics/core/renderers.h" +#include "graphics/core/transparency.h" + #include "graphics/engine/engine.h" diff --git a/src/ui/controls/key.cpp b/src/ui/controls/key.cpp index 24305d95..ae8b7843 100644 --- a/src/ui/controls/key.cpp +++ b/src/ui/controls/key.cpp @@ -25,6 +25,8 @@ #include "graphics/core/device.h" #include "graphics/core/renderers.h" +#include "graphics/core/transparency.h" + #include "graphics/engine/engine.h" #include "sound/sound.h" diff --git a/src/ui/controls/map.cpp b/src/ui/controls/map.cpp index 29b21801..b319af54 100644 --- a/src/ui/controls/map.cpp +++ b/src/ui/controls/map.cpp @@ -24,6 +24,7 @@ #include "graphics/core/device.h" #include "graphics/core/renderers.h" +#include "graphics/core/transparency.h" #include "graphics/engine/terrain.h" #include "graphics/engine/water.h" diff --git a/src/ui/controls/scroll.cpp b/src/ui/controls/scroll.cpp index 407c4115..d2149e7e 100644 --- a/src/ui/controls/scroll.cpp +++ b/src/ui/controls/scroll.cpp @@ -25,6 +25,8 @@ #include "graphics/core/device.h" #include "graphics/core/renderers.h" +#include "graphics/core/transparency.h" + #include "graphics/engine/engine.h" #include "ui/controls/button.h" diff --git a/src/ui/controls/shortcut.cpp b/src/ui/controls/shortcut.cpp index c11491c8..2c1c2006 100644 --- a/src/ui/controls/shortcut.cpp +++ b/src/ui/controls/shortcut.cpp @@ -24,6 +24,7 @@ #include "graphics/core/device.h" #include "graphics/core/renderers.h" +#include "graphics/core/transparency.h" #include "graphics/engine/engine.h" diff --git a/src/ui/controls/slider.cpp b/src/ui/controls/slider.cpp index 6a79866a..8ef90415 100644 --- a/src/ui/controls/slider.cpp +++ b/src/ui/controls/slider.cpp @@ -25,6 +25,8 @@ #include "graphics/core/device.h" #include "graphics/core/renderers.h" +#include "graphics/core/transparency.h" + #include "graphics/engine/engine.h" #include "graphics/engine/text.h" diff --git a/src/ui/controls/window.cpp b/src/ui/controls/window.cpp index 21a852fa..48eda236 100644 --- a/src/ui/controls/window.cpp +++ b/src/ui/controls/window.cpp @@ -40,6 +40,7 @@ #include "graphics/core/device.h" #include "graphics/core/renderers.h" +#include "graphics/core/transparency.h" #include diff --git a/src/ui/mainui.cpp b/src/ui/mainui.cpp index 15d827c9..ded71b4f 100644 --- a/src/ui/mainui.cpp +++ b/src/ui/mainui.cpp @@ -61,6 +61,8 @@ #include "ui/screen/screen_setup_sound.h" #include "ui/screen/screen_welcome.h" +#include "graphics/core/transparency.h" + namespace Ui { diff --git a/src/ui/screen/screen_welcome.cpp b/src/ui/screen/screen_welcome.cpp index 01308173..8127b671 100644 --- a/src/ui/screen/screen_welcome.cpp +++ b/src/ui/screen/screen_welcome.cpp @@ -23,6 +23,8 @@ #include "common/stringutils.h" +#include "graphics/core/material.h" + #include "graphics/engine/engine.h" #include "level/robotmain.h"