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
+6 -5
View File
@@ -29,7 +29,8 @@
// LOVE
#include "common/Object.h"
#include "font/Rasterizer.h"
#include "graphics/Image.h"
#include "graphics/Texture.h"
#include "graphics/Volatile.h"
#include "OpenGL.h"
@@ -44,7 +45,7 @@ class Font : public Object, public Volatile
{
public:
Font(love::font::Rasterizer *r, const Image::Filter &filter = Image::getDefaultFilter());
Font(love::font::Rasterizer *r, const Texture::Filter &filter = Texture::getDefaultFilter());
virtual ~Font();
@@ -122,8 +123,8 @@ public:
**/
float getSpacing() const;
void setFilter(const Image::Filter &f);
const Image::Filter &getFilter();
void setFilter(const Texture::Filter &f);
const Texture::Filter &getFilter();
// Implements Volatile.
bool loadVolatile();
@@ -199,7 +200,7 @@ private:
std::map<uint32, Glyph *> glyphs;
FontType type;
Image::Filter filter;
Texture::Filter filter;
static const int NUM_TEXTURE_SIZES = 7;
static const int TEXTURE_WIDTHS[NUM_TEXTURE_SIZES];