mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-25 17:53:47 +00:00
only update VBO if texcoords actually change
This commit is contained in:
parent
4623702743
commit
03eeb7f4e9
2 changed files with 14 additions and 2 deletions
|
@ -132,8 +132,11 @@ void RenderGrid::setDrawOrder(GridDrawOrder ord, bool force)
|
|||
|
||||
void RenderGrid::setTexCoords(const TexCoordBox& tc)
|
||||
{
|
||||
this->tc = tc;
|
||||
needVBOUpdate = true;
|
||||
if(this->tc != tc)
|
||||
{
|
||||
this->tc = tc;
|
||||
needVBOUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -31,6 +31,15 @@ struct TexCoordBox
|
|||
|
||||
bool isStandard() const;
|
||||
void setStandard();
|
||||
|
||||
bool operator==(const TexCoordBox& o) const
|
||||
{
|
||||
return u1 == o.u1 && v1 == o.v1 && u2 == o.u2 && v2 == o.v2;
|
||||
}
|
||||
inline bool operator!=(const TexCoordBox& o) const
|
||||
{
|
||||
return !(*this == o);
|
||||
}
|
||||
};
|
||||
|
||||
enum TextureLoadResult
|
||||
|
|
Loading…
Reference in a new issue