mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +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:
@@ -97,7 +97,7 @@ public:
|
||||
|
||||
void setColor(Colorf c) override;
|
||||
|
||||
void setCanvas(const std::vector<RenderTarget> &rts) override;
|
||||
void setCanvas(const RenderTargets &rts) override;
|
||||
void setCanvas() override;
|
||||
|
||||
void setScissor(const Rect &rect) override;
|
||||
@@ -131,26 +131,17 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
struct CachedRenderbuffer
|
||||
{
|
||||
int w;
|
||||
int h;
|
||||
int samples;
|
||||
GLenum attachments[2];
|
||||
GLuint renderbuffer;
|
||||
};
|
||||
|
||||
love::graphics::StreamBuffer *newStreamBuffer(BufferType type, size_t size) override;
|
||||
|
||||
void endPass();
|
||||
void bindCachedFBO(const std::vector<RenderTarget> &targets);
|
||||
void bindCachedFBO(const RenderTargets &targets);
|
||||
void discard(OpenGL::FramebufferTarget target, const std::vector<bool> &colorbuffers, bool depthstencil);
|
||||
GLuint attachCachedStencilBuffer(int w, int h, int samples);
|
||||
love::graphics::Canvas *getCachedStencilBuffer(int w, int h, int samples);
|
||||
|
||||
void setDebug(bool enable);
|
||||
|
||||
std::unordered_map<uint32, GLuint> framebufferObjects;
|
||||
std::vector<CachedRenderbuffer> stencilBuffers;
|
||||
std::vector<love::graphics::Canvas *> stencilBuffers;
|
||||
|
||||
QuadIndices *quadIndices;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user