Attempting to fix PSP alpha textures

This commit is contained in:
2026-03-29 13:38:55 -05:00
parent 55d44f229d
commit e56ff20e2d
2 changed files with 4 additions and 6 deletions

View File

@@ -232,6 +232,8 @@ errorret_t shaderSetTextureGL(
errorChain(errorGLCheck());
glBindTexture(GL_TEXTURE_2D, texture->id);
errorChain(errorGLCheck());
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
errorChain(errorGLCheck());
#else
if(shader->setTexture == NULL) {

View File

@@ -25,8 +25,8 @@ errorret_t textureInitGL(
switch(format) {
case TEXTURE_FORMAT_RGBA:
glTexImage2D(
GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0,
GL_RGBA, GL_UNSIGNED_BYTE, (void*)data.rgbaColors
GL_TEXTURE_2D, 0, format, width, height, 0,
format, GL_UNSIGNED_BYTE, (void*)data.rgbaColors
);
errorChain(errorGLCheck());
break;
@@ -77,10 +77,6 @@ errorret_t textureInitGL(
errorChain(errorGLCheck());
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
errorChain(errorGLCheck());
#ifdef DUSK_OPENGL_LEGACY
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
#endif
glBindTexture(GL_TEXTURE_2D, 0);
errorChain(errorGLCheck());