mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +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 * 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 * bglTexParameterf)( GLenum target, GLenum pname, GLfloat param );
|
||||||
extern void (APIENTRY * bglTexParameteri)( GLenum target, GLenum pname, GLint 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 * 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 * bglCompressedTexImage2DARB)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
|
||||||
extern void (APIENTRY * bglGetCompressedTexImageARB)(GLenum, GLint, 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 *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 *bglTexParameterf)(GLenum target, GLenum pname, GLfloat param);
|
||||||
void (APIENTRY *bglTexParameteri)(GLenum target, GLenum pname, GLint 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 *bglGetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint *params);
|
||||||
void (APIENTRY *bglCompressedTexImage2DARB)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
|
void (APIENTRY *bglCompressedTexImage2DARB)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
|
||||||
void (APIENTRY *bglGetCompressedTexImageARB)(GLenum, GLint, GLvoid *);
|
void (APIENTRY *bglGetCompressedTexImageARB)(GLenum, GLint, GLvoid *);
|
||||||
|
@ -447,6 +448,7 @@ int32_t loadgldriver(const char *driver)
|
||||||
bglTexSubImage2D = GETPROC("glTexSubImage2D");
|
bglTexSubImage2D = GETPROC("glTexSubImage2D");
|
||||||
bglTexParameterf = GETPROC("glTexParameterf");
|
bglTexParameterf = GETPROC("glTexParameterf");
|
||||||
bglTexParameteri = GETPROC("glTexParameteri");
|
bglTexParameteri = GETPROC("glTexParameteri");
|
||||||
|
bglGetTexParameteriv = GETPROC("glGetTexParameteriv");
|
||||||
bglGetTexLevelParameteriv = GETPROC("glGetTexLevelParameteriv");
|
bglGetTexLevelParameteriv = GETPROC("glGetTexLevelParameteriv");
|
||||||
bglTexGenfv = GETPROC("glTexGenfv");
|
bglTexGenfv = GETPROC("glTexGenfv");
|
||||||
|
|
||||||
|
@ -735,6 +737,7 @@ int32_t unloadgldriver(void)
|
||||||
bglTexSubImage2D = NULL;
|
bglTexSubImage2D = NULL;
|
||||||
bglTexParameterf = NULL;
|
bglTexParameterf = NULL;
|
||||||
bglTexParameteri = NULL;
|
bglTexParameteri = NULL;
|
||||||
|
bglGetTexParameteriv = NULL;
|
||||||
bglGetTexLevelParameteriv = NULL;
|
bglGetTexLevelParameteriv = NULL;
|
||||||
bglCompressedTexImage2DARB = NULL;
|
bglCompressedTexImage2DARB = NULL;
|
||||||
bglGetCompressedTexImageARB = NULL;
|
bglGetCompressedTexImageARB = NULL;
|
||||||
|
|
|
@ -3804,9 +3804,18 @@ static void polymer_drawartsky(int16_t tilenum, char palnum, int8_t shad
|
||||||
j = (1<<pskybits);
|
j = (1<<pskybits);
|
||||||
while (i < j)
|
while (i < j)
|
||||||
{
|
{
|
||||||
|
GLint oldswrap;
|
||||||
|
|
||||||
bglColor4f(glcolors[pskyoff[i]][0], glcolors[pskyoff[i]][1], glcolors[pskyoff[i]][2], 1.0f);
|
bglColor4f(glcolors[pskyoff[i]][0], glcolors[pskyoff[i]][1], glcolors[pskyoff[i]][2], 1.0f);
|
||||||
bglBindTexture(GL_TEXTURE_2D, glpics[pskyoff[i]]);
|
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);
|
polymer_drawartskyquad(i, (i + 1) & (j - 1), height);
|
||||||
|
|
||||||
|
bglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, oldswrap);
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue