mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-10 23:31:50 +00:00
Merge branch 'next' of http://git.magicalgirl.moe/STJr/SRB2 into next
This commit is contained in:
commit
a077be85cf
1 changed files with 26 additions and 6 deletions
|
@ -1470,6 +1470,26 @@ EXPORT void HWRAPI(SetTexture) (FTextureInfo *pTexInfo)
|
||||||
else
|
else
|
||||||
pglTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE_ALPHA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, ptex);
|
pglTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE_ALPHA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, ptex);
|
||||||
}
|
}
|
||||||
|
else if (pTexInfo->grInfo.format == GR_TEXFMT_ALPHA_8)
|
||||||
|
{
|
||||||
|
//pglTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, ptex);
|
||||||
|
if (MipMap)
|
||||||
|
{
|
||||||
|
pgluBuild2DMipmaps(GL_TEXTURE_2D, GL_ALPHA, w, h, GL_RGBA, GL_UNSIGNED_BYTE, ptex);
|
||||||
|
#ifdef GL_TEXTURE_MIN_LOD
|
||||||
|
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_LOD, 0);
|
||||||
|
#endif
|
||||||
|
#ifdef GL_TEXTURE_MAX_LOD
|
||||||
|
if (pTexInfo->flags & TF_TRANSPARENT)
|
||||||
|
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 0); // No mippmaps on transparent stuff
|
||||||
|
else
|
||||||
|
pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 4);
|
||||||
|
#endif
|
||||||
|
//pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_LINEAR_MIPMAP_LINEAR);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
pglTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, ptex);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (MipMap)
|
if (MipMap)
|
||||||
|
@ -2150,7 +2170,7 @@ EXPORT void HWRAPI(StartScreenWipe) (void)
|
||||||
Clamp2D(GL_TEXTURE_WRAP_S);
|
Clamp2D(GL_TEXTURE_WRAP_S);
|
||||||
Clamp2D(GL_TEXTURE_WRAP_T);
|
Clamp2D(GL_TEXTURE_WRAP_T);
|
||||||
#ifndef KOS_GL_COMPATIBILITY
|
#ifndef KOS_GL_COMPATIBILITY
|
||||||
pglCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, texsize, texsize, 0);
|
pglCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, texsize, texsize, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
tex_downloaded = 0; // 0 so it knows it doesn't have any of the cached patches downloaded right now
|
tex_downloaded = 0; // 0 so it knows it doesn't have any of the cached patches downloaded right now
|
||||||
|
@ -2179,7 +2199,7 @@ EXPORT void HWRAPI(EndScreenWipe)(void)
|
||||||
Clamp2D(GL_TEXTURE_WRAP_S);
|
Clamp2D(GL_TEXTURE_WRAP_S);
|
||||||
Clamp2D(GL_TEXTURE_WRAP_T);
|
Clamp2D(GL_TEXTURE_WRAP_T);
|
||||||
#ifndef KOS_GL_COMPATIBILITY
|
#ifndef KOS_GL_COMPATIBILITY
|
||||||
pglCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, texsize, texsize, 0);
|
pglCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, texsize, texsize, 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
tex_downloaded = 0; // 0 so it knows it doesn't have any of the cached patches downloaded right now
|
tex_downloaded = 0; // 0 so it knows it doesn't have any of the cached patches downloaded right now
|
||||||
|
@ -2294,22 +2314,22 @@ EXPORT void HWRAPI(DoScreenWipe)(float alpha)
|
||||||
|
|
||||||
// Bottom left
|
// Bottom left
|
||||||
pglMultiTexCoord2f(GL_TEXTURE0, 0.0f, 0.0f);
|
pglMultiTexCoord2f(GL_TEXTURE0, 0.0f, 0.0f);
|
||||||
pglMultiTexCoord2f(GL_TEXTURE1, 0.0f, 0.0f);
|
pglMultiTexCoord2f(GL_TEXTURE1, 0.0f, 1.0f);
|
||||||
pglVertex3f(-1.0f, -1.0f, 1.0f);
|
pglVertex3f(-1.0f, -1.0f, 1.0f);
|
||||||
|
|
||||||
// Top left
|
// Top left
|
||||||
pglMultiTexCoord2f(GL_TEXTURE0, 0.0f, yfix);
|
pglMultiTexCoord2f(GL_TEXTURE0, 0.0f, yfix);
|
||||||
pglMultiTexCoord2f(GL_TEXTURE1, 0.0f, 1.0f);
|
pglMultiTexCoord2f(GL_TEXTURE1, 0.0f, 0.0f);
|
||||||
pglVertex3f(-1.0f, 1.0f, 1.0f);
|
pglVertex3f(-1.0f, 1.0f, 1.0f);
|
||||||
|
|
||||||
// Top right
|
// Top right
|
||||||
pglMultiTexCoord2f(GL_TEXTURE0, xfix, yfix);
|
pglMultiTexCoord2f(GL_TEXTURE0, xfix, yfix);
|
||||||
pglMultiTexCoord2f(GL_TEXTURE1, 1.0f, 1.0f);
|
pglMultiTexCoord2f(GL_TEXTURE1, 1.0f, 0.0f);
|
||||||
pglVertex3f(1.0f, 1.0f, 1.0f);
|
pglVertex3f(1.0f, 1.0f, 1.0f);
|
||||||
|
|
||||||
// Bottom right
|
// Bottom right
|
||||||
pglMultiTexCoord2f(GL_TEXTURE0, xfix, 0.0f);
|
pglMultiTexCoord2f(GL_TEXTURE0, xfix, 0.0f);
|
||||||
pglMultiTexCoord2f(GL_TEXTURE1, 1.0f, 0.0f);
|
pglMultiTexCoord2f(GL_TEXTURE1, 1.0f, 1.0f);
|
||||||
pglVertex3f(1.0f, -1.0f, 1.0f);
|
pglVertex3f(1.0f, -1.0f, 1.0f);
|
||||||
pglEnd();
|
pglEnd();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue