mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Add a new “stencil8” pixel format for Canvases (resolves issue #1003).
Also fixed Canvas MSAA (resolves issue #1271). stencil-formatted Canvases can’t be drawn, and can only be used as the value for a new ‘depthstencil’ field to the table-argument variant of love.graphics.setCanvas. --HG-- branch : minor
This commit is contained in:
@@ -57,6 +57,9 @@ enum PixelFormat
|
||||
PIXELFORMAT_RGB10A2,
|
||||
PIXELFORMAT_RG11B10F,
|
||||
|
||||
// depth/stencil formats
|
||||
PIXELFORMAT_STENCIL8,
|
||||
|
||||
// compressed formats
|
||||
PIXELFORMAT_DXT1,
|
||||
PIXELFORMAT_DXT3,
|
||||
@@ -106,6 +109,11 @@ bool getConstant(const char *in, PixelFormat &out);
|
||||
**/
|
||||
bool isPixelFormatCompressed(PixelFormat format);
|
||||
|
||||
/**
|
||||
* Gets whether the specified pixel format is a depth/stencil type.
|
||||
**/
|
||||
bool isPixelFormatDepthStencil(PixelFormat format);
|
||||
|
||||
/**
|
||||
* Gets the size in bytes of the specified pixel format.
|
||||
* NOTE: Currently returns 0 for compressed formats.
|
||||
|
||||
Reference in New Issue
Block a user