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:
@@ -59,7 +59,7 @@ public:
|
||||
// Built-in extern (uniform) variables.
|
||||
enum BuiltinExtern
|
||||
{
|
||||
BUILTIN_SCREEN_PARAMS,
|
||||
BUILTIN_SCREEN_SIZE,
|
||||
BUILTIN_MAX_ENUM
|
||||
};
|
||||
|
||||
@@ -216,6 +216,7 @@ private:
|
||||
|
||||
// Pointer to the active Canvas when the screen params were last checked.
|
||||
Canvas *lastCanvas;
|
||||
OpenGL::Viewport lastViewport;
|
||||
|
||||
// Max GPU texture units available for sent images
|
||||
static GLint maxTexUnits;
|
||||
|
||||
Reference in New Issue
Block a user