diff --git a/include/ieclass.h b/include/ieclass.h index c3239cdbe6..61ba599ca2 100644 --- a/include/ieclass.h +++ b/include/ieclass.h @@ -9,7 +9,6 @@ #include "ModResource.h" #include "imodule.h" -#include "math/Vector3.h" #include "math/Vector4.h" #include @@ -159,16 +158,6 @@ class IEntityClass : // Overrides the colour defined in the .def files virtual void setColour(const Vector4& colour) = 0; - /// Get the shader used for rendering this entity class in wireframe mode. - //virtual const std::string& getWireShader() const = 0; - // - ///// Get the shader used for rendering this entity class in filled mode. - //virtual const std::string& getFillShader() const = 0; - // - //// Get the shader name used for rendering coloured primitives in both cam and ortho - //virtual const std::string& getColourShader() const = 0; - - /* ENTITY CLASS ATTRIBUTES */ /** diff --git a/radiantcore/eclass/EntityClass.cpp b/radiantcore/eclass/EntityClass.cpp index aa44225de0..2eb6529fb3 100644 --- a/radiantcore/eclass/EntityClass.cpp +++ b/radiantcore/eclass/EntityClass.cpp @@ -6,18 +6,18 @@ #include "string/convert.h" #include "string/predicate.h" -#include #include namespace eclass { -const std::string EntityClass::DefaultWireShader("<0.3 0.3 1>"); -const std::string EntityClass::DefaultFillShader("(0.3 0.3 1)"); -const std::string EntityClass::DefaultColourShader("{0.3 0.3 1}"); -const Vector3 EntityClass::DefaultEntityColour(0.3, 0.3, 1); +namespace +{ + const Vector3 DefaultEntityColour(0.3, 0.3, 1); + const Vector4 UndefinedColour(-1, -1, -1, -1); +} + const EntityClassAttribute EntityClass::_emptyAttribute("", "", ""); -const Vector4 UndefinedColour(-1, -1, -1, -1); EntityClass::EntityClass(const std::string& name, const vfs::FileInfo& fileInfo) : EntityClass(name, fileInfo, false) @@ -103,14 +103,6 @@ void EntityClass::setColour(const Vector4& colour) _colour = DefaultEntityColour; } - // Define fill and wire versions of the entity colour - _fillShader = _colourTransparent ? - fmt::format("[{0:f} {1:f} {2:f}]", _colour[0], _colour[1], _colour[2]) : - fmt::format("({0:f} {1:f} {2:f})", _colour[0], _colour[1], _colour[2]); - - _wireShader = fmt::format("<{0:f} {1:f} {2:f}>", _colour[0], _colour[1], _colour[2]); - _colourShader = fmt::format("{{{0:f} {1:f} {2:f}}}", _colour[0], _colour[1], _colour[2]); - emitChangedSignal(); } @@ -145,25 +137,7 @@ const Vector4& EntityClass::getColour() const { return _colour; } -#if 0 -const std::string& EntityClass::getWireShader() const -{ - // Use a fallback shader colour in case we don't have anything - return !_wireShader.empty() ? _wireShader : DefaultWireShader; -} - -const std::string& EntityClass::getFillShader() const -{ - // Use a fallback shader colour in case we don't have anything - return !_fillShader.empty() ? _fillShader : DefaultFillShader; -} -const std::string& EntityClass::getColourShader() const -{ - // Use a fallback shader colour in case we don't have anything - return !_colourShader.empty() ? _colourShader : DefaultColourShader; -} -#endif /* ATTRIBUTES */ /** diff --git a/radiantcore/eclass/EntityClass.h b/radiantcore/eclass/EntityClass.h index 31c911c8a2..9a6eee1944 100644 --- a/radiantcore/eclass/EntityClass.h +++ b/radiantcore/eclass/EntityClass.h @@ -49,17 +49,6 @@ class EntityClass Vector4 _colour; bool _colourTransparent; - // Default shader names, in case we don't get any from the parent or otherwise - static const std::string DefaultWireShader; - static const std::string DefaultFillShader; - static const std::string DefaultColourShader; - static const Vector3 DefaultEntityColour; - - // Shader versions of the colour - std::string _fillShader; - std::string _wireShader; - std::string _colourShader; - // Does this entity have a fixed size? bool _fixedSize; @@ -148,11 +137,6 @@ class EntityClass void setColour(const Vector4& colour) override; // Resets the colour to the value defined in the attributes void resetColour(); -#if 0 - const std::string& getWireShader() const override; - const std::string& getFillShader() const override; - const std::string& getColourShader() const override; -#endif EntityClassAttribute& getAttribute(const std::string&, bool includeInherited = true) override; const EntityClassAttribute& getAttribute(const std::string&, bool includeInherited = true) const override; const std::string& getAttributeType(const std::string& name) const override;