support for anisotropic filtering

This commit is contained in:
codeanticode
2012-11-20 22:05:21 +00:00
parent f594ff3746
commit 54e2ff13fe
7 changed files with 60 additions and 2 deletions

View File

@@ -1141,6 +1141,10 @@ public class Texture implements PConstants {
pgl.texParameteri(glTarget, PGL.TEXTURE_MAG_FILTER, glMagFilter);
pgl.texParameteri(glTarget, PGL.TEXTURE_WRAP_S, glWrapS);
pgl.texParameteri(glTarget, PGL.TEXTURE_WRAP_T, glWrapT);
if (PGraphicsOpenGL.anisoSamplingSupported) {
pgl.texParameterf(glTarget, PGL.TEXTURE_MAX_ANISOTROPY,
PGraphicsOpenGL.maxAnisoAmount);
}
// First, we use glTexImage2D to set the full size of the texture (glW/glH
// might be diff from w/h in the case that the GPU doesn't support NPOT