mirror of
https://github.com/love2d/love.git
synced 2026-08-19 12:14:20 +02:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user