Canvases can now be used in SpriteBatches, ParticleSystems, and Meshes (resolves issue #782).

Canvases and Images are now subclasses of the new Texture class.
Added setTexture and getTexture methods for Meshes, ParticleSystems, and SpriteBatches (the old set/getImage methods are deprecated but not removed.)
Canvas texture coordinates are no longer flipped.
This commit is contained in:
Alex Szpakowski
2014-01-03 17:07:12 -04:00
parent 1d3f6e967d
commit aa69a695d3
43 changed files with 1011 additions and 852 deletions
+7 -7
View File
@@ -203,11 +203,11 @@ public:
/**
* Creates a Font object.
**/
Font *newFont(love::font::Rasterizer *data, const Image::Filter &filter = Image::Filter());
Font *newFont(love::font::Rasterizer *data, const Texture::Filter &filter = Texture::getDefaultFilter());
SpriteBatch *newSpriteBatch(Image *image, int size, int usage);
SpriteBatch *newSpriteBatch(Texture *texture, int size, int usage);
ParticleSystem *newParticleSystem(Image *image, int size);
ParticleSystem *newParticleSystem(Texture *texture, int size);
Canvas *newCanvas(int width, int height, Canvas::TextureType texture_type = Canvas::TYPE_NORMAL);
@@ -270,18 +270,18 @@ public:
/**
* Sets the default filter for images, canvases, and fonts.
**/
void setDefaultFilter(const Image::Filter &f);
void setDefaultFilter(const Texture::Filter &f);
/**
* Gets the default filter for images, canvases, and fonts.
**/
const Image::Filter &getDefaultFilter() const;
const Texture::Filter &getDefaultFilter() const;
/**
* Default Image mipmap filter mode and sharpness values.
**/
void setDefaultMipmapFilter(Image::FilterMode filter, float sharpness);
void getDefaultMipmapFilter(Image::FilterMode *filter, float *sharpness) const;
void setDefaultMipmapFilter(Texture::FilterMode filter, float sharpness);
void getDefaultMipmapFilter(Texture::FilterMode *filter, float *sharpness) const;
/**
* Sets the line width.