Skip to content
Snippets Groups Projects
Commit f70b339d authored by BATON Theau's avatar BATON Theau
Browse files

Add operator()(...) on buffers

parent 74c2c2dd
No related branches found
No related tags found
No related merge requests found
...@@ -70,6 +70,10 @@ namespace megu { ...@@ -70,6 +70,10 @@ namespace megu {
return this->_id <= ebo._id; return this->_id <= ebo._id;
} }
bool ElementBuffer::operator()(const ElementBuffer & ebo) const {
return *this < ebo;
}
std::strong_ordering ElementBuffer::operator<=>(const ElementBuffer & ebo) const { std::strong_ordering ElementBuffer::operator<=>(const ElementBuffer & ebo) const {
return this->_id <=> ebo._id; return this->_id <=> ebo._id;
} }
......
...@@ -26,6 +26,7 @@ namespace megu { ...@@ -26,6 +26,7 @@ namespace megu {
inline bool operator!=(const ElementBuffer &) const; inline bool operator!=(const ElementBuffer &) const;
inline bool operator<=(const ElementBuffer &) const; inline bool operator<=(const ElementBuffer &) const;
inline bool operator>=(const ElementBuffer &) const; inline bool operator>=(const ElementBuffer &) const;
inline bool operator()(const ElementBuffer &) const;
inline bool operator<(const ElementBuffer &) const; inline bool operator<(const ElementBuffer &) const;
inline bool operator>(const ElementBuffer &) const; inline bool operator>(const ElementBuffer &) const;
......
...@@ -45,6 +45,10 @@ namespace megu { ...@@ -45,6 +45,10 @@ namespace megu {
return this->_vao >= vao._vao; return this->_vao >= vao._vao;
} }
bool VertexArray::operator()(const VertexArray & vao) const {
return *this > vao;
}
bool VertexArray::operator<(const VertexArray & vao) const { bool VertexArray::operator<(const VertexArray & vao) const {
return this->_vao < vao._vao; return this->_vao < vao._vao;
} }
......
...@@ -21,6 +21,7 @@ namespace megu { ...@@ -21,6 +21,7 @@ namespace megu {
bool operator!=(const VertexArray &) const; bool operator!=(const VertexArray &) const;
bool operator<=(const VertexArray &) const; bool operator<=(const VertexArray &) const;
bool operator>=(const VertexArray &) const; bool operator>=(const VertexArray &) const;
bool operator()(const VertexArray &) const;
bool operator<(const VertexArray &) const; bool operator<(const VertexArray &) const;
bool operator>(const VertexArray &) const; bool operator>(const VertexArray &) const;
......
...@@ -90,6 +90,10 @@ namespace megu { ...@@ -90,6 +90,10 @@ namespace megu {
return this->_id <= vbo._id; return this->_id <= vbo._id;
} }
bool VerticeBuffer::operator()(const VerticeBuffer & vbo) const {
return *this < vbo;
}
std::strong_ordering VerticeBuffer::operator<=>(const VerticeBuffer & vbo) const { std::strong_ordering VerticeBuffer::operator<=>(const VerticeBuffer & vbo) const {
return this->_id <=> vbo._id; return this->_id <=> vbo._id;
} }
......
...@@ -35,6 +35,7 @@ namespace megu { ...@@ -35,6 +35,7 @@ namespace megu {
bool operator!=(const VerticeBuffer &) const; bool operator!=(const VerticeBuffer &) const;
bool operator<=(const VerticeBuffer &) const; bool operator<=(const VerticeBuffer &) const;
bool operator>=(const VerticeBuffer &) const; bool operator>=(const VerticeBuffer &) const;
bool operator()(const VerticeBuffer &) const;
bool operator<(const VerticeBuffer &) const; bool operator<(const VerticeBuffer &) const;
bool operator>(const VerticeBuffer &) const; bool operator>(const VerticeBuffer &) const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment