diff --git a/GL/state.c b/GL/state.c index 96f507a..4b48966 100644 --- a/GL/state.c +++ b/GL/state.c @@ -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; diff --git a/GL/texture.c b/GL/texture.c index 7e9e9ec..143aef0 100644 --- a/GL/texture.c +++ b/GL/texture.c @@ -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; diff --git a/include/GL/glext.h b/include/GL/glext.h index 50cb63c..210d86b 100644 --- a/include/GL/glext.h +++ b/include/GL/glext.h @@ -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