mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Auto-padded NPOT images' texture coordinates are now scaled at draw time via the texture matrix (fixes auto-padded images with Meshes.) Also fixed love.graphics.newQuad.
--HG-- branch : Mesh
This commit is contained in:
@@ -88,6 +88,14 @@ public:
|
||||
**/
|
||||
void drawq(Quad *quad, float x, float y, float angle, float sx, float sy, float ox, float oy, float kx, float ky) const;
|
||||
|
||||
/**
|
||||
* Call before using this Image's texture to draw. Binds the texture,
|
||||
* globally scales texture coordinates if the Image has NPOT dimensions and
|
||||
* NPOT isn't supported, etc.
|
||||
**/
|
||||
void predraw() const;
|
||||
void postdraw() const;
|
||||
|
||||
/**
|
||||
* Sets the filter mode.
|
||||
* @param f The filter mode.
|
||||
@@ -124,12 +132,6 @@ public:
|
||||
**/
|
||||
bool refresh();
|
||||
|
||||
/**
|
||||
* Gets the texture coordinate scale used for drawing auto-padded NPOT
|
||||
* images correctly.
|
||||
**/
|
||||
love::Vector getTexCoordScale() const;
|
||||
|
||||
static void setDefaultMipmapSharpness(float sharpness);
|
||||
static float getDefaultMipmapSharpness();
|
||||
static void setDefaultMipmapFilter(FilterMode f);
|
||||
@@ -172,6 +174,9 @@ private:
|
||||
// The source vertices of the image.
|
||||
Vertex vertices[4];
|
||||
|
||||
// The scale applied to texcoords for NPOT images without NPOT support.
|
||||
love::Vector texCoordScale;
|
||||
|
||||
// Mipmap texture LOD bias (sharpness) value.
|
||||
float mipmapSharpness;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user