diff options
Diffstat (limited to 'game')
-rw-r--r-- | game/network/network.h | 13 | ||||
-rw-r--r-- | game/scenary/foliage.h | 4 | ||||
-rw-r--r-- | game/scenary/illuminator.h | 4 | ||||
-rw-r--r-- | game/terrain.h | 8 | ||||
-rw-r--r-- | game/vehicles/railVehicleClass.h | 5 | ||||
-rw-r--r-- | game/water.h | 8 |
6 files changed, 20 insertions, 22 deletions
diff --git a/game/network/network.h b/game/network/network.h index 5725360..ca17581 100644 --- a/game/network/network.h +++ b/game/network/network.h @@ -1,19 +1,18 @@ #pragma once +#include "collection.h" #include "gfx/gl/instanceVertices.h" +#include "gfx/models/texture.h" +#include "gfx/renderable.h" #include "link.h" -#include <collection.h> -#include <gfx/renderable.h> +#include "sorting.h" +#include "special_members.h" #include <glm/glm.hpp> #include <memory> #include <set> -#include <sorting.h> -#include <special_members.h> #include <string> #include <utility> -#include <variant> -class Texture; class SceneShader; template<typename> class Ray; @@ -56,7 +55,7 @@ protected: using Nodes = std::set<Node::Ptr, PtrMemberSorter<Node::Ptr, &Node::pos>>; Nodes nodes; - std::shared_ptr<Texture> texture; + Texture::Ptr texture; }; template<typename LinkType> class NetworkLinkHolder { diff --git a/game/scenary/foliage.h b/game/scenary/foliage.h index 3beda89..0a4261c 100644 --- a/game/scenary/foliage.h +++ b/game/scenary/foliage.h @@ -2,16 +2,16 @@ #include "assetFactory/asset.h" #include "gfx/gl/instanceVertices.h" +#include "gfx/models/texture.h" #include "gfx/renderable.h" class SceneShader; class ShadowMapper; class Location; -class Texture; class Foliage : public Asset, public Renderable, public StdTypeDefs<Foliage> { Mesh::Ptr bodyMesh; - std::shared_ptr<Texture> texture; + Texture::Ptr texture; glVertexArray instanceVAO; public: diff --git a/game/scenary/illuminator.h b/game/scenary/illuminator.h index cd6073c..44bd583 100644 --- a/game/scenary/illuminator.h +++ b/game/scenary/illuminator.h @@ -2,15 +2,15 @@ #include "assetFactory/asset.h" #include "gfx/gl/instanceVertices.h" +#include "gfx/models/texture.h" #include "gfx/renderable.h" class SceneShader; class Location; -class Texture; class Illuminator : public Asset, public Renderable, public StdTypeDefs<Illuminator> { Mesh::Ptr bodyMesh; - std::shared_ptr<Texture> texture; + Texture::Ptr texture; glVertexArray instanceVAO; std::optional<glVertexArray> instancesSpotLightVAO, instancesPointLightVAO; diff --git a/game/terrain.h b/game/terrain.h index d088f89..1c79d19 100644 --- a/game/terrain.h +++ b/game/terrain.h @@ -4,12 +4,12 @@ #include "collection.h" #include "config/types.h" #include "game/worldobject.h" -#include <gfx/models/mesh.h> -#include <gfx/renderable.h> +#include "gfx/models/mesh.h" +#include "gfx/models/texture.h" +#include "gfx/renderable.h" #include <memory> class SceneShader; -class Texture; class GeoData; class Terrain : public WorldObject, public Renderable { @@ -32,5 +32,5 @@ private: std::shared_ptr<GeoData> geoData; Collection<MeshT<Vertex>, false> meshes; - std::shared_ptr<Texture> grass; + Texture::Ptr grass; }; diff --git a/game/vehicles/railVehicleClass.h b/game/vehicles/railVehicleClass.h index 9d9d4c2..88f08c5 100644 --- a/game/vehicles/railVehicleClass.h +++ b/game/vehicles/railVehicleClass.h @@ -3,14 +3,13 @@ #include "assetFactory/asset.h" #include "gfx/gl/instanceVertices.h" #include "gfx/models/mesh.h" +#include "gfx/models/texture.h" #include "gfx/renderable.h" #include <array> #include <memory> -#include <string> class SceneShader; class ShadowMapper; -class Texture; class Location; class RailVehicleClass : public Renderable, public Asset { @@ -25,7 +24,7 @@ public: std::array<Mesh::Ptr, 2> bogies; Mesh::Ptr bodyMesh; - std::shared_ptr<Texture> texture; + Texture::Ptr texture; float wheelBase; float length; float maxSpeed; diff --git a/game/water.h b/game/water.h index ceb7bd2..ba46703 100644 --- a/game/water.h +++ b/game/water.h @@ -4,12 +4,12 @@ #include "collection.h" #include "config/types.h" #include "game/worldobject.h" -#include <gfx/models/mesh.h> -#include <gfx/renderable.h> +#include "gfx/models/mesh.h" +#include "gfx/models/texture.h" +#include "gfx/renderable.h" #include <memory> class SceneShader; -class Texture; class GeoData; class Water : public WorldObject, public Renderable { @@ -30,5 +30,5 @@ private: std::shared_ptr<GeoData> geoData; Collection<MeshT<Vertex>, false> meshes; - std::shared_ptr<Texture> water; + Texture::Ptr water; }; |