Remove const and inline attribures in Overlay

pull/607/head
Hleb Valoshka 2020-03-31 23:21:55 +03:00
parent e5d54df6bb
commit 64ac62d06d
2 changed files with 19 additions and 14 deletions

View File

@ -188,21 +188,31 @@ void Overlay::drawRectangle(const Rect& r)
renderer.drawRectangle(r);
}
void Overlay::setColor(float r, float g, float b, float a) const
void Overlay::setColor(float r, float g, float b, float a)
{
glColor4f(r, g, b, a);
}
void Overlay::setColor(const Color& c) const
void Overlay::setColor(const Color& c)
{
glColor4f(c.red(), c.green(), c.blue(), c.alpha());
}
void Overlay::moveBy(float dx, float dy, float dz) const
void Overlay::moveBy(float dx, float dy, float dz)
{
glTranslatef(dx, dy, dz);
}
void Overlay::savePos()
{
glPushMatrix();
}
void Overlay::restorePos()
{
glPopMatrix();
}
//
// OverlayStreamBuf implementation
//

View File

@ -60,18 +60,13 @@ class Overlay : public std::ostream
void setWindowSize(int, int);
void setFont(TextureFont*);
void setColor(float r, float g, float b, float a) const;
void setColor(const Color& c) const;
void setColor(float r, float g, float b, float a);
void setColor(const Color& c);
void moveBy(float dx, float dy, float dz = 0.0f);
void savePos();
void restorePos();
void moveBy(float dx, float dy, float dz = 0.0f) const;
void savePos() const
{
glPushMatrix();
};
void restorePos() const
{
glPopMatrix();
};
Renderer& getRenderer() const
{
return renderer;