unfiltered display of preview
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5012 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -246,7 +246,7 @@ struct mitemimagemanual : mitemmanual
|
||||
if(image)
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D, image->id);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glDisable(GL_BLEND);
|
||||
glColor3f(1, 1, 1);
|
||||
xs = (FONTH*image->xs)/image->ys;
|
||||
glBegin(GL_TRIANGLE_STRIP);
|
||||
@@ -256,6 +256,7 @@ struct mitemimagemanual : mitemmanual
|
||||
glTexCoord2f(1, 1); glVertex2f(x+xs, y+FONTH);
|
||||
glEnd();
|
||||
xtraverts += 4;
|
||||
glEnable(GL_BLEND);
|
||||
}
|
||||
draw_text(text, !image || *text == '\t' ? x : x+xs + FONTH/2, y);
|
||||
if(altfont && strchr(text, '\a'))
|
||||
@@ -279,7 +280,7 @@ struct mitemimagemanual : mitemmanual
|
||||
x = (6 * VIRTW + w - 2 * xs) / 4; y = VIRTH - ys / 2;
|
||||
blendbox(x - FONTH, y - FONTH, x + xs + FONTH, y + ys + FONTH, false);
|
||||
glBindTexture(GL_TEXTURE_2D, image->id); // I just copy&pasted this...
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // could pls someone with actual OpenGL-knowledge check this?
|
||||
glDisable(GL_BLEND);
|
||||
glColor3f(1, 1, 1);
|
||||
glBegin(GL_TRIANGLE_STRIP);
|
||||
glTexCoord2f(0, 0); glVertex2f(x, y);
|
||||
@@ -288,6 +289,7 @@ struct mitemimagemanual : mitemmanual
|
||||
glTexCoord2f(1, 1); glVertex2f(x+xs, y+ys);
|
||||
glEnd();
|
||||
xtraverts += 4;
|
||||
glEnable(GL_BLEND);
|
||||
}
|
||||
}
|
||||
else mitemmanual::render(x, y, w);
|
||||
|
||||
Reference in New Issue
Block a user