mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Add mipmapping support to Canvases.
- Added an optional mipmap index argument to the non-table variant of love.graphics.setCanvas, and an optional ‘mipmap’ field to the table variant. - Canvas:setMipmapFilter now works. - Added Canvas:generateMipmaps. - Added Canvas:getMipmapMode. - Added a new ‘mipmaps’ enum field to the table passed into love.graphics.newCanvas. Accepted values are “none” (default), “manual”, and “auto”. If a Canvas has the manual mipmap mode, you will either need to render to a mipmap level or call Canvas:generateMipmaps. If it has the auto mode, mipmaps will be automatically generated after rendering to that Canvas. Generating mipmaps is not free. --HG-- branch : minor
This commit is contained in:
@@ -53,18 +53,14 @@ public:
|
||||
void setDepthSampleMode(Optional<CompareMode> mode) override;
|
||||
ptrdiff_t getHandle() const override;
|
||||
|
||||
love::image::ImageData *newImageData(love::image::Image *module, int slice, int x, int y, int w, int h) override;
|
||||
love::image::ImageData *newImageData(love::image::Image *module, int slice, int mipmap, const Rect &rect) override;
|
||||
void generateMipmaps() override;
|
||||
|
||||
int getMSAA() const override
|
||||
{
|
||||
return actualSamples;
|
||||
}
|
||||
|
||||
int getRequestedMSAA() const override
|
||||
{
|
||||
return requestedSamples;
|
||||
}
|
||||
|
||||
ptrdiff_t getRenderTargetHandle() const override
|
||||
{
|
||||
return renderbuffer != 0 ? renderbuffer : texture;
|
||||
@@ -114,7 +110,6 @@ private:
|
||||
|
||||
GLenum status;
|
||||
|
||||
int requestedSamples;
|
||||
int actualSamples;
|
||||
|
||||
size_t textureMemory;
|
||||
|
||||
Reference in New Issue
Block a user