Add optional ‘readable’ boolean field to the table passed into love.graphics.newCanvas. Added new variant of love.graphics.getCanvasFormats which takes a ‘readable’ boolean.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-04-11 19:03:13 -03:00
parent c36a53fdcb
commit 43172bd3f6
8 changed files with 83 additions and 13 deletions
+8
View File
@@ -39,6 +39,13 @@ public:
struct Settings
{
// Defaults to true for color pixel formats, and false for depth/stencil.
struct Readable
{
bool set = false;
bool value = false;
};
int width = 1;
int height = 1;
int layers = 1; // depth for 3D textures
@@ -46,6 +53,7 @@ public:
TextureType type = TEXTURE_2D;
float pixeldensity = 1.0f;
int msaa = 0;
Readable readable;
};
Canvas(TextureType textype);