Commit 74f7b0da authored by Dino Bollinger's avatar Dino Bollinger Committed by Richard Gobeille

Mapster32: Fix tilescreen drawing for Polymer renderer.

According to pogo in a previous commit, GL_TEXTURE_2D is deprecated.
However, polymer cannot draw the tiles in the tilescreen correctly
without enabling it first, else it shows white boxes instead.

This fixes terminx/eduke32#93
parent 7c3b3e67
......@@ -9416,6 +9416,11 @@ int32_t polymost_drawtilescreen(int32_t tilex, int32_t tiley, int32_t wallnum, i
else ratio = dimen/scy;
}
#ifdef POLYMER
if (videoGetRenderMode() == REND_POLYMER)
glEnable(GL_TEXTURE_2D);
#endif
glColor3f(1,1,1);
glBegin(GL_TRIANGLE_FAN);
glTexCoord2f(0, 0); glVertex2f((float)tilex ,(float)tiley);
......@@ -9424,6 +9429,11 @@ int32_t polymost_drawtilescreen(int32_t tilex, int32_t tiley, int32_t wallnum, i
glTexCoord2f(0, ydimepad); glVertex2f((float)tilex ,(float)tiley+(scy*ratio));
glEnd();
#ifdef POLYMER
if (videoGetRenderMode() == REND_POLYMER)
glDisable(GL_TEXTURE_2D);
#endif
if (pth && !(pth->flags & PTH_INDEXED))
{
// restore palette usage if we were just rendering a non-indexed color texture
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment