love.graphics.setColor no longer uses the main per-vertex color attribute. This lets it affect the color of ParticleSystems, and SpriteBatches and Meshes even when they use custom per-vertex colors.

This commit is contained in:
Alex Szpakowski
2015-06-21 11:20:26 -03:00
parent 42ae9c9585
commit c82ccbb89b
10 changed files with 21 additions and 51 deletions
+1 -13
View File
@@ -56,6 +56,7 @@ enum VertexAttribID
ATTRIB_POS = 0,
ATTRIB_TEXCOORD,
ATTRIB_COLOR,
ATTRIB_CONSTANTCOLOR,
ATTRIB_MAX_ENUM
};
@@ -196,16 +197,6 @@ public:
void drawArrays(GLenum mode, GLint first, GLsizei count);
void drawElements(GLenum mode, GLsizei count, GLenum type, const void *indices);
/**
* Sets the current constant color.
**/
void setColor(const Color &c);
/**
* Gets the current constant color.
**/
Color getColor() const;
/**
* Sets the OpenGL rendering viewport to the specified rectangle.
* The y-coordinate starts at the top.
@@ -356,9 +347,6 @@ private:
// Tracked OpenGL state.
struct
{
// Current constant color.
Color color;
// Texture unit state (currently bound texture for each texture unit.)
std::vector<GLuint> boundTextures;