MYST3: Fixed an error with 2D non textured rect rendering.

This commit is contained in:
Stefano Musumeci 2014-07-03 17:33:04 +02:00
parent 38aa730b76
commit 206c6b4e11

View file

@ -137,12 +137,11 @@ void TinyGLRenderer::drawRect2D(const Common::Rect &rect, uint32 color) {
tglBlendFunc(TGL_SRC_ALPHA, TGL_ONE_MINUS_SRC_ALPHA);
}
tglBegin(TGL_TRIANGLE_STRIP);
tglVertex3f( rect.left, rect.bottom, 0.0f);
tglVertex3f( rect.right, rect.bottom, 0.0f);
tglVertex3f( rect.left, rect.top, 0.0f);
tglVertex3f( rect.right, rect.top, 0.0f);
tglEnd();
for (int x = rect.left; x < rect.right; x++) {
for (int y = rect.top; y < rect.bottom; y++) {
_fb->writePixel(y * kOriginalWidth + x, a, r, g, b);
}
}
tglDisable(TGL_BLEND);
}