From 790599b583e1b819b5023a35b13b707ec9de3439 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 20 Jul 2024 17:57:35 +0100 Subject: Apply StdTypeDefs for Texture --- game/network/network.h | 13 ++++++------- game/scenary/foliage.h | 4 ++-- game/scenary/illuminator.h | 4 ++-- game/terrain.h | 8 ++++---- game/vehicles/railVehicleClass.h | 5 ++--- game/water.h | 8 ++++---- 6 files changed, 20 insertions(+), 22 deletions(-) (limited to 'game') 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 -#include +#include "sorting.h" +#include "special_members.h" #include #include #include -#include -#include #include #include -#include -class Texture; class SceneShader; template class Ray; @@ -56,7 +55,7 @@ protected: using Nodes = std::set>; Nodes nodes; - std::shared_ptr texture; + Texture::Ptr texture; }; template 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 { Mesh::Ptr bodyMesh; - std::shared_ptr 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 { Mesh::Ptr bodyMesh; - std::shared_ptr texture; + Texture::Ptr texture; glVertexArray instanceVAO; std::optional 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 -#include +#include "gfx/models/mesh.h" +#include "gfx/models/texture.h" +#include "gfx/renderable.h" #include class SceneShader; -class Texture; class GeoData; class Terrain : public WorldObject, public Renderable { @@ -32,5 +32,5 @@ private: std::shared_ptr geoData; Collection, false> meshes; - std::shared_ptr 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 #include -#include class SceneShader; class ShadowMapper; -class Texture; class Location; class RailVehicleClass : public Renderable, public Asset { @@ -25,7 +24,7 @@ public: std::array bogies; Mesh::Ptr bodyMesh; - std::shared_ptr 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 -#include +#include "gfx/models/mesh.h" +#include "gfx/models/texture.h" +#include "gfx/renderable.h" #include class SceneShader; -class Texture; class GeoData; class Water : public WorldObject, public Renderable { @@ -30,5 +30,5 @@ private: std::shared_ptr geoData; Collection, false> meshes; - std::shared_ptr water; + Texture::Ptr water; }; -- cgit v1.2.3