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:
Alex Szpakowski
2017-04-15 01:58:03 -03:00
parent a0ef2ac28b
commit 7161d600b7
16 changed files with 396 additions and 201 deletions
+6 -6
View File
@@ -124,18 +124,18 @@ public:
bool isReadable() const;
int getWidth() const;
int getHeight() const;
int getDepth() const;
int getWidth(int mip = 0) const;
int getHeight(int mip = 0) const;
int getDepth(int mip = 0) const;
int getLayerCount() const;
int getMipmapCount() const;
virtual int getPixelWidth() const;
virtual int getPixelHeight() const;
int getPixelWidth(int mip = 0) const;
int getPixelHeight(int mip = 0) const;
float getPixelDensity() const;
virtual void setFilter(const Filter &f) = 0;
virtual void setFilter(const Filter &f);
virtual const Filter &getFilter() const;
virtual bool setWrap(const Wrap &w) = 0;