diff options
author | Treeki <treeki@gmail.com> | 2012-08-25 04:33:27 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-08-25 04:33:27 +0200 |
commit | e95cad36b68ebbce8fedb119ff2b41a0f345ffbb (patch) | |
tree | 175303b6fe263d7ce3638bbf00e74f56b8cdda55 | |
parent | 46bceae4f4ec8a6c3cba2b0c989c72df552a2909 (diff) | |
download | LayoutStudio-e95cad36b68ebbce8fedb119ff2b41a0f345ffbb.tar.gz LayoutStudio-e95cad36b68ebbce8fedb119ff2b41a0f345ffbb.zip |
fixed vertex colours rendering, this fixes some weird panes in NSMBW
-rw-r--r-- | layoutgl/widget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layoutgl/widget.cpp b/layoutgl/widget.cpp index acfb8da..32789f5 100644 --- a/layoutgl/widget.cpp +++ b/layoutgl/widget.cpp @@ -469,14 +469,14 @@ void LGLWidget::drawQuad(float x, float y, float w, float h, int texCoordCount, glMultiTexCoord2f(GL_TEXTURE0_ARB+i, texCoords[i].coord[3].x(), 1.0f-texCoords[i].coord[3].y()); if (colours) - glColor4ub(colours[2].red(), colours[2].green(), colours[2].blue(), (colours[2].alpha() * alpha) / 255); + glColor4ub(colours[3].red(), colours[3].green(), colours[3].blue(), (colours[3].alpha() * alpha) / 255); glVertex2f(x + w, y - h); for (int i = 0; i < texCoordCount; i++) glMultiTexCoord2f(GL_TEXTURE0_ARB+i, texCoords[i].coord[2].x(), 1.0f-texCoords[i].coord[2].y()); if (colours) - glColor4ub(colours[3].red(), colours[3].green(), colours[3].blue(), (colours[3].alpha() * alpha) / 255); + glColor4ub(colours[2].red(), colours[2].green(), colours[2].blue(), (colours[2].alpha() * alpha) / 255); glVertex2f(x, y - h); glEnd(); |