diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index bfeda823f..02df2e294 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -398,7 +398,6 @@ typedef void (APIENTRY * PFNglCopyTexSubImage2D) (GLenum target, GLint level, GL static PFNglCopyTexSubImage2D pglCopyTexSubImage2D; #endif - /* 1.3 functions for multitexturing */ typedef void (APIENTRY *PFNglActiveTexture) (GLenum); static PFNglActiveTexture pglActiveTexture; @@ -973,7 +972,6 @@ void SetupGLFunc4(void) *(void**)&pglUniform3fv = GetGLFunc("glUniform3fv"); *(void**)&pglGetUniformLocation = GetGLFunc("glGetUniformLocation"); #endif - } EXPORT boolean HWRAPI(CompileShaders) (void) @@ -1995,7 +1993,7 @@ EXPORT void HWRAPI(UpdateTexture) (GLMipmap_t *pTexInfo) { pglTexParameteri(GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE); pglTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE_ALPHA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, ptex); - + pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_LOD, 0); if (pTexInfo->flags & TF_TRANSPARENT) pglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 0); // No mippmaps on transparent stuff else diff --git a/src/sdl/ogl_sdl.c b/src/sdl/ogl_sdl.c index 5e088073f..816397cd8 100644 --- a/src/sdl/ogl_sdl.c +++ b/src/sdl/ogl_sdl.c @@ -152,6 +152,11 @@ boolean OglSdlSurface(INT32 w, INT32 h) else supportMipMap = false; + if (atof((const char*)gl_version) >= 1.4) + supportMipMap = true; + else + supportMipMap = false; + SetupGLFunc4(); glanisotropicmode_cons_t[1].value = maximumAnisotropy;