]> git.tdb.fi Git - libs/gl.git/commitdiff
Remove deprecated things related to vertex formats and arrays
authorMikko Rasa <tdb@tdb.fi>
Wed, 15 Sep 2021 10:55:08 +0000 (13:55 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 15 Sep 2021 15:08:04 +0000 (18:08 +0300)
source/builders/vertexbuilder.h
source/core/vertexarray.cpp
source/core/vertexarray.h
source/core/vertexformat.h

index 82827cb4e56bed2cb10c47d7562354f8812771a6..cfb4b31b46ba0d1ec003daac38ac6e57323d2175 100644 (file)
@@ -89,12 +89,6 @@ public:
        void tangent(const Vector3 &t)
        { attrib(get_attribute_semantic(TANGENT3), mtx*Vector4(t.x, t.y, t.z, 0)); }
 
        void tangent(const Vector3 &t)
        { attrib(get_attribute_semantic(TANGENT3), mtx*Vector4(t.x, t.y, t.z, 0)); }
 
-       DEPRECATED void binormal(float, float, float)
-       { }
-
-       DEPRECATED void binormal(const Vector3 &)
-       { }
-
        void texcoord(float s)
        { texcoord(s, 0, 0, 1); }
 
        void texcoord(float s)
        { texcoord(s, 0, 0, 1); }
 
index 2bb6a6677b9ef5e2099a1a5922b1d2990910708c..b3bcb48118b291a114024bd86f7d9016d22a26b0 100644 (file)
@@ -71,6 +71,7 @@ VertexArray::Loader::Loader(VertexArray &a):
        add("vertex", static_cast<void (Loader::*)(float, float, float)>(&Loader::vertex));
        add("vertex", static_cast<void (Loader::*)(float, float, float, float)>(&Loader::vertex));
        add("normal", static_cast<void (Loader::*)(float, float, float)>(&Loader::normal));
        add("vertex", static_cast<void (Loader::*)(float, float, float)>(&Loader::vertex));
        add("vertex", static_cast<void (Loader::*)(float, float, float, float)>(&Loader::vertex));
        add("normal", static_cast<void (Loader::*)(float, float, float)>(&Loader::normal));
+       add("tangent", static_cast<void (Loader::*)(float, float, float)>(&Loader::tangent));
        add("texcoord", static_cast<void (Loader::*)(float)>(&Loader::texcoord));
        add("texcoord", static_cast<void (Loader::*)(float, float)>(&Loader::texcoord));
        add("texcoord", static_cast<void (Loader::*)(float, float, float)>(&Loader::texcoord));
        add("texcoord", static_cast<void (Loader::*)(float)>(&Loader::texcoord));
        add("texcoord", static_cast<void (Loader::*)(float, float)>(&Loader::texcoord));
        add("texcoord", static_cast<void (Loader::*)(float, float, float)>(&Loader::texcoord));
@@ -93,33 +94,6 @@ VertexArray::Loader::Loader(VertexArray &a):
        add("weight", static_cast<void (Loader::*)(float, float)>(&Loader::weight));
        add("weight", static_cast<void (Loader::*)(float, float, float)>(&Loader::weight));
        add("weight", static_cast<void (Loader::*)(float, float, float, float)>(&Loader::weight));
        add("weight", static_cast<void (Loader::*)(float, float)>(&Loader::weight));
        add("weight", static_cast<void (Loader::*)(float, float, float)>(&Loader::weight));
        add("weight", static_cast<void (Loader::*)(float, float, float, float)>(&Loader::weight));
-
-       // Deprecated
-       add("vertex2",   static_cast<void (Loader::*)(float, float)>(&Loader::vertex));
-       add("vertex3",   static_cast<void (Loader::*)(float, float, float)>(&Loader::vertex));
-       add("vertex4",   static_cast<void (Loader::*)(float, float, float, float)>(&Loader::vertex));
-       add("normal3",   static_cast<void (Loader::*)(float, float, float)>(&Loader::normal));
-       add("texcoord1", static_cast<void (Loader::*)(float)>(&Loader::texcoord));
-       add("texcoord2", static_cast<void (Loader::*)(float, float)>(&Loader::texcoord));
-       add("texcoord3", static_cast<void (Loader::*)(float, float, float)>(&Loader::texcoord));
-       add("texcoord4", static_cast<void (Loader::*)(float, float, float, float)>(&Loader::texcoord));
-       add("multitexcoord1", static_cast<void (Loader::*)(unsigned, float)>(&Loader::multitexcoord));
-       add("multitexcoord2", static_cast<void (Loader::*)(unsigned, float, float)>(&Loader::multitexcoord));
-       add("multitexcoord3", static_cast<void (Loader::*)(unsigned, float, float, float)>(&Loader::multitexcoord));
-       add("multitexcoord4", static_cast<void (Loader::*)(unsigned, float, float, float, float)>(&Loader::multitexcoord));
-       add("color3",    static_cast<void (Loader::*)(float, float, float)>(&Loader::color));
-       add("color4",    static_cast<void (Loader::*)(float, float, float, float)>(&Loader::color));
-       add("generic1",  static_cast<void (Loader::*)(unsigned, float)>(&Loader::generic));
-       add("generic2",  static_cast<void (Loader::*)(unsigned, float, float)>(&Loader::generic));
-       add("generic3",  static_cast<void (Loader::*)(unsigned, float, float, float)>(&Loader::generic));
-       add("generic4",  static_cast<void (Loader::*)(unsigned, float, float, float, float)>(&Loader::generic));
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-       add("tangent3",  static_cast<void (Loader::*)(float, float, float)>(&Loader::tangent));
-       add("binormal3", static_cast<void (Loader::*)(float, float, float)>(&Loader::binormal));
-       add("tangent", static_cast<void (Loader::*)(float, float, float)>(&Loader::tangent));
-       add("binormal", static_cast<void (Loader::*)(float, float, float)>(&Loader::binormal));
-#pragma GCC diagnostic pop
 }
 
 } // namespace GL
 }
 
 } // namespace GL
index 4c2a028f83b1439f0104cc275602160332e1757e..107d1851f8a70b99a2d5bb24533034a86cc1c883 100644 (file)
@@ -48,9 +48,6 @@ public:
        /// Construct a VertexArray and set its format.
        VertexArray(const VertexFormat &);
 
        /// Construct a VertexArray and set its format.
        VertexArray(const VertexFormat &);
 
-       /// Deprecated.  Use set_format.
-       DEPRECATED void reset(const VertexFormat &f) { set_format(f); }
-
        /// Sets the format of the VertexArray.
        void set_format(const VertexFormat &);
 
        /// Sets the format of the VertexArray.
        void set_format(const VertexFormat &);
 
index e3c1205058fe3e889e6deea55d2d401c42ab7f24..4c485b0423b9568a89b07b5ba164586b94dfa1fc 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef MSP_GL_VERTEXFORMAT_H_
 #define MSP_GL_VERTEXFORMAT_H_
 
 #ifndef MSP_GL_VERTEXFORMAT_H_
 #define MSP_GL_VERTEXFORMAT_H_
 
-#include <msp/core/attributes.h>
 #include <msp/strings/lexicalcast.h>
 
 namespace Msp {
 #include <msp/strings/lexicalcast.h>
 
 namespace Msp {
@@ -48,8 +47,6 @@ enum VertexAttribute
        RAW_ATTRIB4
 };
 
        RAW_ATTRIB4
 };
 
-DEPRECATED typedef VertexAttribute VertexComponent;
-
 class VertexFormat
 {
 private:
 class VertexFormat
 {
 private:
@@ -82,24 +79,12 @@ VertexAttribute make_indexed_attribute(VertexAttribute, unsigned);
 inline VertexAttribute operator,(VertexAttribute a, unsigned i)
 { return make_indexed_attribute(a, i); }
 
 inline VertexAttribute operator,(VertexAttribute a, unsigned i)
 { return make_indexed_attribute(a, i); }
 
-DEPRECATED inline VertexAttribute make_indexed_component(VertexAttribute a, unsigned i)
-{ return make_indexed_attribute(a, i); }
-
 inline unsigned get_attribute_semantic(unsigned char a)
 { return a>>3; }
 
 inline unsigned get_attribute_size(unsigned char a)
 { return (a&3)+1; }
 
 inline unsigned get_attribute_semantic(unsigned char a)
 { return a>>3; }
 
 inline unsigned get_attribute_size(unsigned char a)
 { return (a&3)+1; }
 
-DEPRECATED inline unsigned get_component_type(unsigned char c)
-{ return get_attribute_semantic(c); }
-
-DEPRECATED inline unsigned get_component_size(unsigned char c)
-{ return get_attribute_size(c); }
-
-DEPRECATED inline unsigned get_stride(const VertexFormat &f)
-{ return f.stride(); }
-
 void operator>>(const LexicalConverter &, VertexAttribute &);
 
 } // namespace GL
 void operator>>(const LexicalConverter &, VertexAttribute &);
 
 } // namespace GL