Added a built-in variable readable in shaders: ‘love_ScreenSize’. Its x and y components contain the width and height of the current viewport. Resolves issue #841.

This commit is contained in:
Alex Szpakowski
2014-01-27 02:58:34 -04:00
parent 3a24e73891
commit c5c788e976
5 changed files with 35 additions and 21 deletions
+5
View File
@@ -87,6 +87,11 @@ public:
Viewport(int _x, int _y, int _w, int _h)
: x(_x), y(_y), w(_w), h(_h)
{}
bool operator == (const Viewport &rhs) const
{
return x == rhs.x && y == rhs.y && w == rhs.w && h == rhs.h;
}
};
OpenGL();