mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Fixes an issue with the automap
git-svn-id: https://svn.eduke32.com/eduke32@7346 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
5eb007396d
commit
e253f2e0a8
1 changed files with 21 additions and 21 deletions
|
@ -118,27 +118,6 @@ static void drawlinegl(int32_t x1, int32_t y1, int32_t x2, int32_t y2, palette_t
|
|||
{
|
||||
// setpolymost2dview(); // JBF 20040205: more efficient setup
|
||||
|
||||
glViewport(0, 0, xdim, ydim);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glOrtho(0, xdim, ydim, 0, -1, 1);
|
||||
if (videoGetRenderMode() == REND_POLYMER)
|
||||
{
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
gloy1 = -1;
|
||||
glDisable(GL_ALPHA_TEST);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glEnable(GL_BLEND); // When using line antialiasing, this is needed
|
||||
|
||||
polymost_useColorOnly(true);
|
||||
glBegin(GL_LINES);
|
||||
glColor4ub(p.r, p.g, p.b, 255);
|
||||
|
||||
int const dx = x2-x1;
|
||||
int const dy = y2-y1;
|
||||
|
||||
|
@ -167,6 +146,27 @@ static void drawlinegl(int32_t x1, int32_t y1, int32_t x2, int32_t y2, palette_t
|
|||
if (y1 > wy2) x1 += scale(wy2-y1, dx, dy), y1 = wy2;
|
||||
}
|
||||
|
||||
glViewport(0, 0, xdim, ydim);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glOrtho(0, xdim, ydim, 0, -1, 1);
|
||||
if (videoGetRenderMode() == REND_POLYMER)
|
||||
{
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
gloy1 = -1;
|
||||
glDisable(GL_ALPHA_TEST);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glEnable(GL_BLEND); // When using line antialiasing, this is needed
|
||||
|
||||
polymost_useColorOnly(true);
|
||||
glBegin(GL_LINES);
|
||||
glColor4ub(p.r, p.g, p.b, 255);
|
||||
|
||||
glVertex2f((float) x1 * (1.f/4096.f), (float) y1 * (1.f/4096.f));
|
||||
glVertex2f((float) x2 * (1.f/4096.f), (float) y2 * (1.f/4096.f));
|
||||
|
||||
|
|
Loading…
Reference in a new issue