MYST3: Fixed an error with 2D non textured rect rendering.
This commit is contained in:
parent
38aa730b76
commit
206c6b4e11
1 changed files with 5 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue