mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-01-26 02:07:26 +00:00
undo prev. commit and fix this properly. i'm just blind.
This commit is contained in:
parent
8b3c00dc76
commit
a2e7e4a670
2 changed files with 4 additions and 9 deletions
|
@ -391,18 +391,11 @@ void Quad::onRender(const RenderState& rs) const
|
|||
{
|
||||
if (!renderQuad) return;
|
||||
|
||||
|
||||
const float _w2 = width*0.5f;
|
||||
const float _h2 = height*0.5f;
|
||||
|
||||
if (!drawGrid)
|
||||
{
|
||||
const float red = rs.color.x * this->color.x;
|
||||
const float green = rs.color.y * this->color.y;
|
||||
const float blue = rs.color.z * this->color.z;
|
||||
const float alpha = rs.alpha * this->alpha.x * this->alphaMod;
|
||||
glColor4f(red, green, blue, alpha);
|
||||
|
||||
glBegin(GL_QUADS);
|
||||
{
|
||||
glTexCoord2f(upperLeftTextureCoordinates.x, 1.0f-upperLeftTextureCoordinates.y);
|
||||
|
|
|
@ -583,13 +583,15 @@ void RenderObject::renderCall(const RenderState& rs) const
|
|||
}
|
||||
}
|
||||
|
||||
rs.gpu.setBlend(getBlendType());
|
||||
|
||||
// RenderState color applies to everything in the scene graph,
|
||||
// so that needs to be multiplied in unconditionally
|
||||
{
|
||||
Vector col = this->color * rs.color;
|
||||
glColor4f(color.x, color.y, color.z, rs.alpha*alpha.x*alphaMod);
|
||||
glColor4f(col.x, col.y, col.z, rs.alpha*alpha.x*alphaMod);
|
||||
}
|
||||
rs.gpu.setBlend(getBlendType());
|
||||
|
||||
onRender(rs);
|
||||
|
||||
if (renderCollisionShape)
|
||||
|
|
Loading…
Reference in a new issue