- some missed parts.

This commit is contained in:
Christoph Oelckers 2019-09-16 21:27:07 +02:00
parent 6536d910b3
commit 0359602159
5 changed files with 5 additions and 11 deletions

View file

@ -463,7 +463,7 @@ void animvpx_setup_glstate(int32_t animvpx_flags)
#ifdef USE_GLEXT #ifdef USE_GLEXT
glActiveTexture(GL_TEXTURE0); glActiveTexture(GL_TEXTURE0);
#endif #endif
glGenTextures(1, &texname); GetTextureHandle(&texname);
glBindTexture(GL_TEXTURE_2D, texname); 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_S, glinfo.clamptoedge?GL_CLAMP_TO_EDGE:GL_CLAMP);

View file

@ -65,7 +65,7 @@ bool glsurface_initialize(vec2_t bufferResolution)
buffer = Xaligned_alloc(16, bufferRes.x * bufferRes.y); buffer = Xaligned_alloc(16, bufferRes.x * bufferRes.y);
glActiveTexture(GL_TEXTURE0); glActiveTexture(GL_TEXTURE0);
glGenTextures(1, &bufferTexID); GetTextureHandle(&bufferTexID);
glBindTexture(GL_TEXTURE_2D, bufferTexID); glBindTexture(GL_TEXTURE_2D, bufferTexID);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
@ -172,7 +172,7 @@ void glsurface_setPalette(void* pPalette)
} }
else else
{ {
glGenTextures(1, &paletteTexID); GetTextureHandle(&paletteTexID);
glBindTexture(GL_TEXTURE_2D, paletteTexID); glBindTexture(GL_TEXTURE_2D, paletteTexID);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);

View file

@ -2109,9 +2109,6 @@ static int32_t polymost_md3draw(md3model_t *m, const uspritetype *tspr)
if (m->usesalpha) //Sprites with alpha in texture if (m->usesalpha) //Sprites with alpha in texture
{ {
// glEnable(GL_BLEND);// glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
// glEnable(GL_ALPHA_TEST); glAlphaFunc(GL_GREATER,0.32);
// float al = 0.32;
// PLAG : default cutoff removed // PLAG : default cutoff removed
float al = 0.0; float al = 0.0;
if (alphahackarray[globalpicnum] != 0) if (alphahackarray[globalpicnum] != 0)

View file

@ -889,7 +889,7 @@ void polymost_glinit()
} }
for (uint32_t i = 0; i < numTilesheets; ++i) for (uint32_t i = 0; i < numTilesheets; ++i)
{ {
glGenTextures(1, tilesheetTexIDs+i); GetTextureHandle(tilesheetTexIDs+i);
glBindTexture(GL_TEXTURE_2D, tilesheetTexIDs[i]); glBindTexture(GL_TEXTURE_2D, tilesheetTexIDs[i]);
uploadtextureindexed(true, {0, 0}, maxTexDimensions, (intptr_t) NULL); uploadtextureindexed(true, {0, 0}, maxTexDimensions, (intptr_t) NULL);
} }
@ -1229,9 +1229,6 @@ void polymost_glinit()
uploadpalswap(palookupnum); uploadpalswap(palookupnum);
} }
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
polymost_resetVertexPointers(); polymost_resetVertexPointers();
texcache_init(); texcache_init();

View file

@ -74,7 +74,7 @@ uint32_t gloadtex(const int32_t *picbuf, int32_t xsiz, int32_t ysiz, int32_t is8
uint32_t rtexid; uint32_t rtexid;
glGenTextures(1, (GLuint *) &rtexid); GetTextureHandle((GLuint *) &rtexid);
glBindTexture(GL_TEXTURE_2D, rtexid); glBindTexture(GL_TEXTURE_2D, rtexid);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); 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_MIN_FILTER, GL_NEAREST);