mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Add some more graphics feature and limit queries (resolves issue #1234).
love.graphics.getSupported(): - Added “fullnpot” field, is true everywhere except on some older mobile devices. If false, mipmapping and wrap modes other than “clamp” can’t be used on non-power-of-two sized textures. - Added “pixelshaderhighp” field, is true everywhere except some older mobile devices. If false, “highp” precision can’t be used in pixel shaders and love will default to “mediump” instead. love.graphics.getSystemLimits(): - Added “anisotropy” field, gets the maximum amount of anisotropy you can specify in Texture:setFilter. love will clamp anisotropy arguments greater than this value. --HG-- branch : minor
This commit is contained in:
@@ -383,6 +383,7 @@ public:
|
||||
void setTextureWrap(const graphics::Texture::Wrap &w);
|
||||
|
||||
bool isClampZeroTextureWrapSupported() const;
|
||||
bool isPixelShaderHighpSupported() const;
|
||||
|
||||
/**
|
||||
* Returns the maximum supported width or height of a texture.
|
||||
@@ -409,6 +410,12 @@ public:
|
||||
**/
|
||||
float getMaxPointSize() const;
|
||||
|
||||
/**
|
||||
* Returns the maximum anisotropic filtering value that can be used for
|
||||
* Texture filtering.
|
||||
**/
|
||||
float getMaxAnisotropy() const;
|
||||
|
||||
|
||||
void updateTextureMemorySize(size_t oldsize, size_t newsize);
|
||||
|
||||
@@ -438,6 +445,7 @@ private:
|
||||
|
||||
bool contextInitialized;
|
||||
|
||||
bool pixelShaderHighpSupported;
|
||||
float maxAnisotropy;
|
||||
int maxTextureSize;
|
||||
int maxRenderTargets;
|
||||
|
||||
Reference in New Issue
Block a user