Replaces glColor4f with glColor4ub in internal code

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1174 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2009-07-12 13:28:44 +00:00
parent 0f7cb43902
commit 374af05d5f
3 changed files with 8 additions and 8 deletions

View File

@ -388,7 +388,7 @@ void Drawable::Draw(RenderTarget& target) const
}
// Set color
GLCheck(glColor4f(myColor.r / 255.f, myColor.g / 255.f, myColor.b / 255.f, myColor.a / 255.f));
GLCheck(glColor4ub(myColor.r, myColor.g, myColor.b, myColor.a));
// Let the derived class render the object geometry
Render(target);

View File

@ -299,7 +299,7 @@ void PostFX::Render(RenderTarget& target) const
it++;
}
// Compute the texture coordinates (in case the texture is larger than the screen, or flipped)
// Compute the texture coordinates (it may not be (0, 0, 1, 1) if the texture is padded or flipped)
IntRect frameBufferRect(0, 0, myFrameBuffer.GetWidth(), myFrameBuffer.GetHeight());
FloatRect texCoords = myFrameBuffer.GetTexCoords(frameBufferRect);

View File

@ -302,13 +302,13 @@ void Shape::Render(RenderTarget&) const
for (std::vector<Point>::const_iterator i = myPoints.begin(); i != myPoints.end(); ++i)
{
Color color = i->Col * GetColor();
glColor4f(color.r / 255.f, color.g / 255.f, color.b / 255.f, color.a / 255.f);
glColor4ub(color.r, color.g, color.b, color.a);
glVertex2f(i->Position.x, i->Position.y);
}
// Close the shape by duplicating the first point at the end
Color color = myPoints[1].Col * GetColor();
glColor4f(color.r / 255.f, color.g / 255.f, color.b / 255.f, color.a / 255.f);
glColor4ub(color.r, color.g, color.b, color.a);
glVertex2f(myPoints[1].Position.x, myPoints[1].Position.y);
}
glEnd();
@ -322,17 +322,17 @@ void Shape::Render(RenderTarget&) const
for (std::size_t i = 1; i < myPoints.size(); ++i)
{
Color color = myPoints[i].OutlineCol * GetColor();
glColor4f(color.r / 255.f, color.g / 255.f, color.b / 255.f, color.a / 255.f);
glColor4ub(color.r, color.g, color.b, color.a);
glVertex2f(myPoints[i].Position.x, myPoints[i].Position.y);
glColor4f(color.r / 255.f, color.g / 255.f, color.b / 255.f, color.a / 255.f);
glColor4ub(color.r, color.g, color.b, color.a);
glVertex2f(myPoints[i].Position.x + myPoints[i].Normal.x * myOutline, myPoints[i].Position.y + myPoints[i].Normal.y * myOutline);
}
// Close the shape by duplicating the first point at the end
Color color = myPoints[1].OutlineCol * GetColor();
glColor4f(color.r / 255.f, color.g / 255.f, color.b / 255.f, color.a / 255.f);
glColor4ub(color.r, color.g, color.b, color.a);
glVertex2f(myPoints[1].Position.x, myPoints[1].Position.y);
glColor4f(color.r / 255.f, color.g / 255.f, color.b / 255.f, color.a / 255.f);
glColor4ub(color.r, color.g, color.b, color.a);
glVertex2f(myPoints[1].Position.x + myPoints[1].Normal.x * myOutline, myPoints[1].Position.y + myPoints[1].Normal.y * myOutline);
}
glEnd();