Commit 7304811f authored by Richard Gobeille's avatar Richard Gobeille
Browse files

engine: detect GL_ARB_sampler_objects, drop detection of...

engine: detect GL_ARB_sampler_objects, drop detection of GL_ARB_vertex_buffer_object, GL_EXT_texture_edge_clamp, and GL_SGIS_texture_edge_clamp
parent 0e45faac
......@@ -125,7 +125,6 @@ struct glinfo_t {
{
int bgra : 1;
int bufferstorage : 1;
int clamptoedge : 1;
int debugoutput : 1;
int depthclamp : 1;
int depthtex : 1;
......@@ -134,11 +133,11 @@ struct glinfo_t {
int multitex : 1;
int occlusionqueries : 1;
int rect : 1;
int samplerobjects : 1;
int shadow : 1;
int sync : 1;
int texcompr : 1;
int texnpot : 1;
int vbos : 1;
int vsync : 1;
};
};
......
......@@ -470,8 +470,8 @@ void animvpx_setup_glstate(int32_t animvpx_flags)
glBindTexture(GL_TEXTURE_2D, texname);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, glinfo.clamptoedge?GL_CLAMP_TO_EDGE:GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, glinfo.clamptoedge?GL_CLAMP_TO_EDGE:GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
if ((animvpx_flags & CUTSCENE_TEXTUREFILTER && gltexfiltermode == TEXFILTER_ON) || animvpx_flags & CUTSCENE_FORCEFILTER ||
(!(animvpx_flags & CUTSCENE_TEXTUREFILTER) && !(animvpx_flags & CUTSCENE_FORCENOFILTER))) // if no flags, then use filter for IVFs
{
......
......@@ -434,19 +434,17 @@ void fill_glinfo(void)
glinfo.shadow = !!Bstrstr(glinfo.extensions, "GL_ARB_shadow");
glinfo.texnpot = !!Bstrstr(glinfo.extensions, "GL_ARB_texture_non_power_of_two") || !!Bstrstr(glinfo.extensions, "GL_OES_texture_npot");
#if !defined EDUKE32_GLES
glinfo.bgra = !!Bstrstr(glinfo.extensions, "GL_EXT_bgra");
glinfo.bufferstorage = !!Bstrstr(glinfo.extensions, "GL_ARB_buffer_storage");
glinfo.clamptoedge = !!Bstrstr(glinfo.extensions, "GL_EXT_texture_edge_clamp") || !!Bstrstr(glinfo.extensions, "GL_SGIS_texture_edge_clamp");
glinfo.debugoutput = !!Bstrstr(glinfo.extensions, "GL_ARB_debug_output");
glinfo.depthclamp = !!Bstrstr(glinfo.extensions, "GL_ARB_depth_clamp");
glinfo.glsl = !!Bstrstr(glinfo.extensions, "GL_ARB_shader_objects");
glinfo.multitex = !!Bstrstr(glinfo.extensions, "GL_ARB_multitexture");
glinfo.occlusionqueries = !!Bstrstr(glinfo.extensions, "GL_ARB_occlusion_query");
glinfo.rect = !!Bstrstr(glinfo.extensions, "GL_NV_texture_rectangle") || !!Bstrstr(glinfo.extensions, "GL_EXT_texture_rectangle");
glinfo.samplerobjects = !!Bstrstr(glinfo.extensions, "GL_ARB_sampler_objects");
glinfo.sync = !!Bstrstr(glinfo.extensions, "GL_ARB_sync");
glinfo.texcompr = !!Bstrstr(glinfo.extensions, "GL_ARB_texture_compression") && Bstrcmp(glinfo.vendor, "ATI Technologies Inc.");
glinfo.vbos = !!Bstrstr(glinfo.extensions, "GL_ARB_vertex_buffer_object");
glinfo.vsync = !!Bstrstr(glinfo.extensions, "WGL_EXT_swap_control") || !!Bstrstr(glinfo.extensions, "GLX_EXT_swap_control");
# ifdef DYNAMIC_GLEXT
......@@ -457,7 +455,8 @@ void fill_glinfo(void)
glinfo.texcompr = 0;
}
# endif
#else
#if defined EDUKE32_GLES
// don't bother checking because ETC2 et al. are not listed in extensions anyway
glinfo.texcompr = 1; // !!Bstrstr(glinfo.extensions, "GL_OES_compressed_ETC1_RGB8_texture");
#endif
......@@ -563,8 +562,7 @@ int osdcmd_glinfo(osdcmdptr_t UNUSED(parm))
{
UNREFERENCED_CONST_PARAMETER(parm);
initprintf("OpenGL information\n %s %s %s\n",
glinfo.vendor, glinfo.renderer, glinfo.version);
OSD_Printf("OpenGL information\n %s %s %s\n", glinfo.vendor, glinfo.renderer, glinfo.version);
if (!glinfo.filled)
return OSDCMD_OK;
......@@ -573,24 +571,22 @@ int osdcmd_glinfo(osdcmdptr_t UNUSED(parm))
#define SUPPORTED(x) (x ? s[0] : s[1])
initprintf(" BGRA textures: %s\n", SUPPORTED(glinfo.bgra));
initprintf(" Clamp-to-edge: %s\n", SUPPORTED(glinfo.clamptoedge));
initprintf(" Framebuffer objects: %s\n", SUPPORTED(glinfo.fbos));
initprintf(" Multi-texturing: %s\n", SUPPORTED(glinfo.multitex));
initprintf(" Non-power-of-2 textures: %s\n", SUPPORTED(glinfo.texnpot));
#ifndef EDUKE32_GLES
initprintf(" Buffer storage: %s\n", SUPPORTED(glinfo.bufferstorage));
initprintf(" Debug output: %s\n", SUPPORTED(glinfo.debugoutput));
initprintf(" Depth textures: %s\n", SUPPORTED(glinfo.depthtex));
initprintf(" GLSL: %s\n", SUPPORTED(glinfo.glsl));
initprintf(" Occlusion queries: %s\n", SUPPORTED(glinfo.occlusionqueries));
initprintf(" Rectangle textures: %s\n", SUPPORTED(glinfo.rect));
initprintf(" Shadow textures: %s\n", SUPPORTED(glinfo.shadow));
initprintf(" Sync: %s\n", SUPPORTED(glinfo.sync));
initprintf(" Texture compression: %s\n", SUPPORTED(glinfo.texcompr));
initprintf(" Vertex buffer objects: %s\n", SUPPORTED(glinfo.vbos));
#endif
initprintf(" Maximum anisotropy: %.1f%s\n", glinfo.maxanisotropy, glinfo.maxanisotropy > 1.0 ? "" : " (no anisotropic filtering)");
OSD_Printf(" BGRA textures: %s\n", SUPPORTED(glinfo.bgra));
OSD_Printf(" Buffer storage: %s\n", SUPPORTED(glinfo.bufferstorage));
OSD_Printf(" Debug output: %s\n", SUPPORTED(glinfo.debugoutput));
OSD_Printf(" Depth textures: %s\n", SUPPORTED(glinfo.depthtex));
OSD_Printf(" Frame buffer objects: %s\n", SUPPORTED(glinfo.fbos));
OSD_Printf(" GLSL: %s\n", SUPPORTED(glinfo.glsl));
OSD_Printf(" Maximum anisotropy: %.1f%s\n", glinfo.maxanisotropy, glinfo.maxanisotropy > 1.0 ? "" : " (no anisotropic filtering)");
OSD_Printf(" Multi-texturing: %s\n", SUPPORTED(glinfo.multitex));
OSD_Printf(" Non-power-of-2 textures: %s\n", SUPPORTED(glinfo.texnpot));
OSD_Printf(" Occlusion queries: %s\n", SUPPORTED(glinfo.occlusionqueries));
OSD_Printf(" Rectangle textures: %s\n", SUPPORTED(glinfo.rect));
OSD_Printf(" Sampler objects: %s\n", SUPPORTED(glinfo.samplerobjects));
OSD_Printf(" Shadow textures: %s\n", SUPPORTED(glinfo.shadow));
OSD_Printf(" Sync: %s\n", SUPPORTED(glinfo.sync));
OSD_Printf(" Texture compression: %s\n", SUPPORTED(glinfo.texcompr));
if (GLVersion.major)
OSD_Printf(" GL context version: %d.%d\n", GLVersion.major, GLVersion.minor);
......
......@@ -759,7 +759,6 @@ int32_t polymer_init(void)
!glinfo.fbos ||
!glinfo.rect ||
!glinfo.multitex ||
!glinfo.vbos ||
!glinfo.occlusionqueries ||
!glinfo.glsl)
{
......@@ -830,9 +829,9 @@ int32_t polymer_init(void)
prhighpalookups[i][j].data); // data pointer
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, glinfo.clamptoedge?GL_CLAMP_TO_EDGE:GL_CLAMP);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, glinfo.clamptoedge?GL_CLAMP_TO_EDGE:GL_CLAMP);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, glinfo.clamptoedge?GL_CLAMP_TO_EDGE:GL_CLAMP);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
polymost_bindTexture(GL_TEXTURE_3D, 0);
}
j++;
......@@ -4313,7 +4312,7 @@ static void polymer_drawartsky(int16_t tilenum, char palnum, int8_t shad
polymost_bindTexture(GL_TEXTURE_2D, glpics[tileofs]);
glGetTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, &oldswrap);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, glinfo.clamptoedge?GL_CLAMP_TO_EDGE:GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
polymer_drawartskyquad(i, (i + increment) & (PSKYOFF_MAX - 1), height);
......@@ -4933,8 +4932,8 @@ static void polymer_setupartmap(int16_t tilenum, char pal, int32_t meth)
tempbuffer);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, meth & DAMETH_CLAMPED ? glinfo.clamptoedge ? GL_CLAMP_TO_EDGE : GL_CLAMP : GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, meth & DAMETH_CLAMPED ? glinfo.clamptoedge ? GL_CLAMP_TO_EDGE : GL_CLAMP : GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, meth & DAMETH_CLAMPED ? GL_CLAMP_TO_EDGE : GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, meth & DAMETH_CLAMPED ? GL_CLAMP_TO_EDGE : GL_REPEAT);
polymost_bindTexture(GL_TEXTURE_2D, 0);
Xfree(tempbuffer);
}
......@@ -4953,8 +4952,8 @@ static void polymer_setupartmap(int16_t tilenum, char pal, int32_t meth)
basepaltable[curbasepal]);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, glinfo.clamptoedge ? GL_CLAMP_TO_EDGE : GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, glinfo.clamptoedge ? GL_CLAMP_TO_EDGE : GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
polymost_bindTexture(GL_TEXTURE_2D, 0);
}
......@@ -4972,8 +4971,8 @@ static void polymer_setupartmap(int16_t tilenum, char pal, int32_t meth)
palookup[pal]);
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, glinfo.clamptoedge ? GL_CLAMP_TO_EDGE : GL_CLAMP);
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, glinfo.clamptoedge ? GL_CLAMP_TO_EDGE : GL_CLAMP);
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
polymost_bindTexture(GL_TEXTURE_RECTANGLE_ARB, 0);
}
}
......@@ -6358,8 +6357,8 @@ static void polymer_initrendertargets(int32_t count)
glTexImage2D(prrts[i].target, 0, GL_RGB, prrts[i].xdim, prrts[i].ydim, 0, GL_RGB, GL_SHORT, NULL);
glTexParameteri(prrts[i].target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(prrts[i].target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(prrts[i].target, GL_TEXTURE_WRAP_S, glinfo.clamptoedge?GL_CLAMP_TO_EDGE:GL_CLAMP);
glTexParameteri(prrts[i].target, GL_TEXTURE_WRAP_T, glinfo.clamptoedge?GL_CLAMP_TO_EDGE:GL_CLAMP);
glTexParameteri(prrts[i].target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(prrts[i].target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
} else {
prrts[i].target = GL_TEXTURE_2D;
prrts[i].xdim = 128 << pr_shadowdetail;
......@@ -6373,8 +6372,8 @@ static void polymer_initrendertargets(int32_t count)
glTexImage2D(prrts[i].target, 0, GL_RGB, prrts[i].xdim, prrts[i].ydim, 0, GL_RGB, GL_SHORT, NULL);
glTexParameteri(prrts[i].target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(prrts[i].target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(prrts[i].target, GL_TEXTURE_WRAP_S, glinfo.clamptoedge?GL_CLAMP_TO_EDGE:GL_CLAMP);
glTexParameteri(prrts[i].target, GL_TEXTURE_WRAP_T, glinfo.clamptoedge?GL_CLAMP_TO_EDGE:GL_CLAMP);
glTexParameteri(prrts[i].target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(prrts[i].target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
}
}
......@@ -6384,8 +6383,8 @@ static void polymer_initrendertargets(int32_t count)
glTexImage2D(prrts[i].target, 0, GL_DEPTH_COMPONENT, prrts[i].xdim, prrts[i].ydim, 0, GL_DEPTH_COMPONENT, GL_SHORT, NULL);
glTexParameteri(prrts[i].target, GL_TEXTURE_MIN_FILTER, pr_shadowfiltering ? GL_LINEAR : GL_NEAREST);
glTexParameteri(prrts[i].target, GL_TEXTURE_MAG_FILTER, pr_shadowfiltering ? GL_LINEAR : GL_NEAREST);
glTexParameteri(prrts[i].target, GL_TEXTURE_WRAP_S, glinfo.clamptoedge?GL_CLAMP_TO_EDGE:GL_CLAMP);
glTexParameteri(prrts[i].target, GL_TEXTURE_WRAP_T, glinfo.clamptoedge?GL_CLAMP_TO_EDGE:GL_CLAMP);
glTexParameteri(prrts[i].target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(prrts[i].target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(prrts[i].target, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE);
glTexParameteri(prrts[i].target, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL);
glTexParameteri(prrts[i].target, GL_DEPTH_TEXTURE_MODE, GL_ALPHA);
......
......@@ -1914,14 +1914,13 @@ void uploadbasepalette(int32_t basepalnum)
polymost_bindTexture(GL_TEXTURE_2D, paletteTextureIDs[basepalnum]);
if (allocateTexture)
{
const GLuint clamp_mode = glinfo.clamptoedge ? GL_CLAMP_TO_EDGE : GL_CLAMP;
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, clamp_mode);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, clamp_mode);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 256, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, basepalWFullBrightInfo);
}
else
......@@ -1950,14 +1949,13 @@ void uploadpalswap(int32_t palookupnum)
polymost_bindTexture(GL_TEXTURE_2D, palswapTextureID);
if (allocateTexture)
{
const GLuint clamp_mode = glinfo.clamptoedge ? GL_CLAMP_TO_EDGE : GL_CLAMP;
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, clamp_mode);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, clamp_mode);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, PALSWAP_TEXTURE_SIZE, PALSWAP_TEXTURE_SIZE, 0, GL_RED, GL_UNSIGNED_BYTE, NULL);
}
......@@ -1990,8 +1988,6 @@ static int32_t tile_is_sky(int32_t tilenum)
static void polymost_setuptexture(const int32_t dameth, int filter)
{
const GLuint clamp_mode = glinfo.clamptoedge ? GL_CLAMP_TO_EDGE : GL_CLAMP;
gltexfiltermode = clamp(gltexfiltermode, 0, NUMGLFILTERMODES-1);
if (filter == -1)
......@@ -2014,14 +2010,14 @@ static void polymost_setuptexture(const int32_t dameth, int filter)
if (!(dameth & DAMETH_CLAMPED))
{
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, clamp_if_tile_is_sky(dapic, clamp_mode));
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, clamp_if_tile_is_sky(dapic, GL_CLAMP_TO_EDGE));
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
}
else
{
// For sprite textures, clamping looks better than wrapping
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, clamp_mode);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, clamp_mode);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
}
}
......@@ -2069,31 +2065,13 @@ static void gloadtile_art_indexed(int32_t dapic, int32_t dameth, pthtyp *pth, in
}
if (doalloc)
{
glGenTextures(1, (GLuint *)&pth->glpic);
}
polymost_bindTexture(GL_TEXTURE_2D, pth->glpic);
if (doalloc)
{
const GLuint clamp_mode = glinfo.clamptoedge ? GL_CLAMP_TO_EDGE : GL_CLAMP;
if (!(dameth & DAMETH_CLAMPED))
{
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, clamp_if_tile_is_sky(dapic, clamp_mode));
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
}
else
{
// For sprite textures, clamping looks better than wrapping
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, clamp_mode);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, clamp_mode);
}
}
if (!doalloc &&
!tileIsPacked &&
(siz.x != pth->siz.x ||
siz.y != pth->siz.y))
polymost_setuptexture(dameth, -1);
else if (!tileIsPacked && siz != pth->siz)
{
//POGO: resize our texture to match the tile data
doalloc = true;
......@@ -3591,13 +3569,11 @@ static void polymost_drawpoly(vec2f_t const * const dpxy, int32_t const n, int32
else if (!nofog)
polymost_setFogEnabled(true);
const GLuint clamp_mode = glinfo.clamptoedge ? GL_CLAMP_TO_EDGE : GL_CLAMP;
if (drawpoly_srepeat)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, clamp_mode);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
if (drawpoly_trepeat)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, clamp_mode);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
if (fullbright_pass == 1)
{
......
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