Fix issues with bilinear mipmapping
This commit is contained in:
parent
e225f54386
commit
b710a619d5
|
@ -193,11 +193,13 @@ void _glUpdatePVRTextureContext(PolyContext *context, GLshort textureUnit) {
|
|||
}
|
||||
|
||||
if(enableMipmaps) {
|
||||
if(tx1->minFilter == GL_LINEAR_MIPMAP_NEAREST) {
|
||||
// FIXME: This is probably the wrong filter for this
|
||||
// GL mode, but I'm not sure what's correct...
|
||||
if(tx1->minFilter == GL_NEAREST_MIPMAP_LINEAR) {
|
||||
filter = GPU_FILTER_TRILINEAR1;
|
||||
} else if(tx1->minFilter == GL_LINEAR_MIPMAP_LINEAR) {
|
||||
filter = GPU_FILTER_TRILINEAR2;
|
||||
} else if(tx1->minFilter == GL_NEAREST_MIPMAP_LINEAR) {
|
||||
} else if(tx1->minFilter == GL_LINEAR_MIPMAP_NEAREST) {
|
||||
filter = GPU_FILTER_BILINEAR;
|
||||
} else {
|
||||
filter = GPU_FILTER_NEAREST;
|
||||
|
|
|
@ -431,7 +431,7 @@ static void _glInitializeTextureObject(TextureObject* txr, unsigned int id) {
|
|||
txr->palette = NULL;
|
||||
txr->isCompressed = GL_FALSE;
|
||||
txr->isPaletted = GL_FALSE;
|
||||
txr->mipmap_bias = GL_MAX_TEXTURE_LOD_BIAS_DEFAULT;
|
||||
txr->mipmap_bias = GL_KOS_INTERNAL_DEFAULT_MIPMAP_LOD_BIAS;
|
||||
|
||||
/* Not mipmapped by default */
|
||||
txr->baseDataOffset = 0;
|
||||
|
|
|
@ -195,7 +195,7 @@ GLAPI void APIENTRY glCompressedTexImage2DARB(GLenum target,
|
|||
#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
|
||||
#define GL_TEXTURE_LOD_BIAS 0x8501
|
||||
#define GL_MAX_TEXTURE_LOD_BIAS_DEFAULT 7
|
||||
#define GL_KOS_INTERNAL_DEFAULT_MIPMAP_LOD_BIAS -4
|
||||
#define GL_KOS_INTERNAL_DEFAULT_MIPMAP_LOD_BIAS 4
|
||||
#endif
|
||||
|
||||
#ifndef GL_EXT_texture_lod_bias
|
||||
|
|
Loading…
Reference in New Issue
Block a user