mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 09:21:36 +00:00
Polymer: when drawing art sky, temporarily set texcoord s wrapping to clamping.
This properly fixes the unwanted vertical lines. git-svn-id: https://svn.eduke32.com/eduke32@2606 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
d1fed44da6
commit
90144e1dcc
3 changed files with 13 additions and 0 deletions
|
@ -134,6 +134,7 @@ extern void (APIENTRY * bglCopyTexSubImage2D)(GLenum target, GLint level, GLint
|
|||
extern void (APIENTRY * bglTexSubImage2D)( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ); // 1.1
|
||||
extern void (APIENTRY * bglTexParameterf)( GLenum target, GLenum pname, GLfloat param );
|
||||
extern void (APIENTRY * bglTexParameteri)( GLenum target, GLenum pname, GLint param );
|
||||
extern void (APIENTRY * bglGetTexParameteriv)( GLenum target, GLenum pname, GLint *params );
|
||||
extern void (APIENTRY * bglGetTexLevelParameteriv)( GLenum target, GLint level, GLenum pname, GLint *params );
|
||||
extern void (APIENTRY * bglCompressedTexImage2DARB)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
|
||||
extern void (APIENTRY * bglGetCompressedTexImageARB)(GLenum, GLint, GLvoid *);
|
||||
|
|
|
@ -94,6 +94,7 @@ void (APIENTRY *bglCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset,
|
|||
void (APIENTRY *bglTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); // 1.1
|
||||
void (APIENTRY *bglTexParameterf)(GLenum target, GLenum pname, GLfloat param);
|
||||
void (APIENTRY *bglTexParameteri)(GLenum target, GLenum pname, GLint param);
|
||||
void (APIENTRY *bglGetTexParameteriv)(GLenum target, GLenum pname, GLint *params);
|
||||
void (APIENTRY *bglGetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint *params);
|
||||
void (APIENTRY *bglCompressedTexImage2DARB)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
|
||||
void (APIENTRY *bglGetCompressedTexImageARB)(GLenum, GLint, GLvoid *);
|
||||
|
@ -447,6 +448,7 @@ int32_t loadgldriver(const char *driver)
|
|||
bglTexSubImage2D = GETPROC("glTexSubImage2D");
|
||||
bglTexParameterf = GETPROC("glTexParameterf");
|
||||
bglTexParameteri = GETPROC("glTexParameteri");
|
||||
bglGetTexParameteriv = GETPROC("glGetTexParameteriv");
|
||||
bglGetTexLevelParameteriv = GETPROC("glGetTexLevelParameteriv");
|
||||
bglTexGenfv = GETPROC("glTexGenfv");
|
||||
|
||||
|
@ -735,6 +737,7 @@ int32_t unloadgldriver(void)
|
|||
bglTexSubImage2D = NULL;
|
||||
bglTexParameterf = NULL;
|
||||
bglTexParameteri = NULL;
|
||||
bglGetTexParameteriv = NULL;
|
||||
bglGetTexLevelParameteriv = NULL;
|
||||
bglCompressedTexImage2DARB = NULL;
|
||||
bglGetCompressedTexImageARB = NULL;
|
||||
|
|
|
@ -3804,9 +3804,18 @@ static void polymer_drawartsky(int16_t tilenum, char palnum, int8_t shad
|
|||
j = (1<<pskybits);
|
||||
while (i < j)
|
||||
{
|
||||
GLint oldswrap;
|
||||
|
||||
bglColor4f(glcolors[pskyoff[i]][0], glcolors[pskyoff[i]][1], glcolors[pskyoff[i]][2], 1.0f);
|
||||
bglBindTexture(GL_TEXTURE_2D, glpics[pskyoff[i]]);
|
||||
|
||||
bglGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, &oldswrap);
|
||||
bglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, glinfo.clamptoedge?GL_CLAMP_TO_EDGE:GL_CLAMP);
|
||||
|
||||
polymer_drawartskyquad(i, (i + 1) & (j - 1), height);
|
||||
|
||||
bglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, oldswrap);
|
||||
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue