mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +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:
@@ -56,20 +56,19 @@ public:
|
||||
|
||||
int getMSAA() const override
|
||||
{
|
||||
return actual_samples;
|
||||
return actualSamples;
|
||||
}
|
||||
|
||||
int getRequestedMSAA() const override
|
||||
{
|
||||
return settings.msaa;
|
||||
return requestedSamples;
|
||||
}
|
||||
|
||||
ptrdiff_t getMSAAHandle() const override
|
||||
ptrdiff_t getRenderTargetHandle() const override
|
||||
{
|
||||
return msaa_buffer;
|
||||
return renderbuffer != 0 ? renderbuffer : texture;
|
||||
}
|
||||
|
||||
|
||||
inline GLenum getStatus() const
|
||||
{
|
||||
return status;
|
||||
@@ -87,18 +86,17 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
Settings settings;
|
||||
|
||||
GLuint fbo;
|
||||
|
||||
GLuint texture;
|
||||
GLuint msaa_buffer;
|
||||
GLuint renderbuffer;
|
||||
|
||||
GLenum status;
|
||||
|
||||
int actual_samples;
|
||||
int requestedSamples;
|
||||
int actualSamples;
|
||||
|
||||
size_t texture_memory;
|
||||
size_t textureMemory;
|
||||
|
||||
static bool supportedFormats[PIXELFORMAT_MAX_ENUM];
|
||||
static bool checkedFormats[PIXELFORMAT_MAX_ENUM];
|
||||
|
||||
Reference in New Issue
Block a user