Code: Select all
function love.draw()
local r, g, b, a = love.graphics.getColor()
love.graphics.print(r .. ', ' .. g .. ', ' .. b .. ', ' .. a, 0, 0)
love.graphics.setColor(r, g, b, a)
end
Does everyone get this same behaviour or is it computer dependent? Am I overlooking something?
I looked at the source code and all I can find is this.
Code: Select all
Color Graphics::getColor()
{
float c[4];
glGetFloatv(GL_CURRENT_COLOR, c);
Color t;
t.r = (unsigned char)(255.0f*c[0]);
t.g = (unsigned char)(255.0f*c[1]);
t.b = (unsigned char)(255.0f*c[2]);
t.a = (unsigned char)(255.0f*c[3]);
return t;
}