mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Geometries now automatically use per-vertex colors when drawing if any vertex has a custom color set, otherwise the constant color is used.
Still not a perfect solution, but it works better than before
This commit is contained in:
@@ -86,6 +86,19 @@ public:
|
||||
return vertexCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether this Geometry will use custom per-vertex colors.
|
||||
**/
|
||||
void setVertexColors(bool on);
|
||||
|
||||
/**
|
||||
* Returns whether this Geometry is using custom per-vertex colors.
|
||||
**/
|
||||
bool hasVertexColors() const
|
||||
{
|
||||
return vertexColors;
|
||||
};
|
||||
|
||||
private:
|
||||
void triangulate();
|
||||
|
||||
@@ -99,6 +112,8 @@ private:
|
||||
|
||||
float y_min;
|
||||
float y_max;
|
||||
|
||||
bool vertexColors;
|
||||
};
|
||||
|
||||
} // graphics
|
||||
|
||||
Reference in New Issue
Block a user