* Another ATI driver hack, now for framebuffers. Based on http://www.opengl.org/wiki/Common_Mistakes#Automatic_mipmap_generation
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7877 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
88257bbb3e
commit
6c12808493
@ -1447,7 +1447,11 @@ public class LwjglRenderer implements Renderer {
|
|||||||
if (tex != null
|
if (tex != null
|
||||||
&& tex.getMinFilter().usesMipMapLevels()) {
|
&& tex.getMinFilter().usesMipMapLevels()) {
|
||||||
setTexture(0, rb.getTexture());
|
setTexture(0, rb.getTexture());
|
||||||
glGenerateMipmapEXT(convertTextureType(tex.getType(), tex.getImage().getMultiSamples()));
|
|
||||||
|
int textureType = convertTextureType(tex.getType(), tex.getImage().getMultiSamples());
|
||||||
|
glEnable(textureType);
|
||||||
|
glGenerateMipmapEXT(textureType);
|
||||||
|
glDisable(textureType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1811,7 +1815,10 @@ public class LwjglRenderer implements Renderer {
|
|||||||
|
|
||||||
if (GLContext.getCapabilities().OpenGL30) {
|
if (GLContext.getCapabilities().OpenGL30) {
|
||||||
if (!img.hasMipmaps() && mips && img.getData() != null) {
|
if (!img.hasMipmaps() && mips && img.getData() != null) {
|
||||||
|
// XXX: Required for ATI
|
||||||
|
glEnable(target);
|
||||||
glGenerateMipmapEXT(target);
|
glGenerateMipmapEXT(target);
|
||||||
|
glDisable(target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user