From: Mikko Rasa Date: Wed, 15 Sep 2021 10:55:08 +0000 (+0300) Subject: Remove deprecated things related to vertex formats and arrays X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=a3cc9f4469153396c7ad0868f3cbb2d2f698d710 Remove deprecated things related to vertex formats and arrays --- diff --git a/source/builders/vertexbuilder.h b/source/builders/vertexbuilder.h index 82827cb4..cfb4b31b 100644 --- a/source/builders/vertexbuilder.h +++ b/source/builders/vertexbuilder.h @@ -89,12 +89,6 @@ public: 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); } diff --git a/source/core/vertexarray.cpp b/source/core/vertexarray.cpp index 2bb6a667..b3bcb481 100644 --- a/source/core/vertexarray.cpp +++ b/source/core/vertexarray.cpp @@ -71,6 +71,7 @@ VertexArray::Loader::Loader(VertexArray &a): add("vertex", static_cast(&Loader::vertex)); add("vertex", static_cast(&Loader::vertex)); add("normal", static_cast(&Loader::normal)); + add("tangent", static_cast(&Loader::tangent)); add("texcoord", static_cast(&Loader::texcoord)); add("texcoord", static_cast(&Loader::texcoord)); add("texcoord", static_cast(&Loader::texcoord)); @@ -93,33 +94,6 @@ VertexArray::Loader::Loader(VertexArray &a): add("weight", static_cast(&Loader::weight)); add("weight", static_cast(&Loader::weight)); add("weight", static_cast(&Loader::weight)); - - // Deprecated - add("vertex2", static_cast(&Loader::vertex)); - add("vertex3", static_cast(&Loader::vertex)); - add("vertex4", static_cast(&Loader::vertex)); - add("normal3", static_cast(&Loader::normal)); - add("texcoord1", static_cast(&Loader::texcoord)); - add("texcoord2", static_cast(&Loader::texcoord)); - add("texcoord3", static_cast(&Loader::texcoord)); - add("texcoord4", static_cast(&Loader::texcoord)); - add("multitexcoord1", static_cast(&Loader::multitexcoord)); - add("multitexcoord2", static_cast(&Loader::multitexcoord)); - add("multitexcoord3", static_cast(&Loader::multitexcoord)); - add("multitexcoord4", static_cast(&Loader::multitexcoord)); - add("color3", static_cast(&Loader::color)); - add("color4", static_cast(&Loader::color)); - add("generic1", static_cast(&Loader::generic)); - add("generic2", static_cast(&Loader::generic)); - add("generic3", static_cast(&Loader::generic)); - add("generic4", static_cast(&Loader::generic)); -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - add("tangent3", static_cast(&Loader::tangent)); - add("binormal3", static_cast(&Loader::binormal)); - add("tangent", static_cast(&Loader::tangent)); - add("binormal", static_cast(&Loader::binormal)); -#pragma GCC diagnostic pop } } // namespace GL diff --git a/source/core/vertexarray.h b/source/core/vertexarray.h index 4c2a028f..107d1851 100644 --- a/source/core/vertexarray.h +++ b/source/core/vertexarray.h @@ -48,9 +48,6 @@ public: /// 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 &); diff --git a/source/core/vertexformat.h b/source/core/vertexformat.h index e3c12050..4c485b04 100644 --- a/source/core/vertexformat.h +++ b/source/core/vertexformat.h @@ -1,7 +1,6 @@ #ifndef MSP_GL_VERTEXFORMAT_H_ #define MSP_GL_VERTEXFORMAT_H_ -#include #include namespace Msp { @@ -48,8 +47,6 @@ enum VertexAttribute RAW_ATTRIB4 }; -DEPRECATED typedef VertexAttribute VertexComponent; - 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); } -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; } -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