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

@@ -110,6 +110,7 @@ public class PGraphicsOpenGL extends PGraphics {
static public boolean autoMipmapGenSupported;
static public boolean fboMultisampleSupported;
static public boolean packedDepthStencilSupported;
static public boolean anisoSamplingSupported;
static public boolean blendEqSupported;
/** Some hardware limits */
@@ -117,6 +118,7 @@ public class PGraphicsOpenGL extends PGraphics {
static public int maxSamples;
static public float maxPointSize;
static public float maxLineWidth;
static public float maxAnisoAmount;
static public int depthBits;
static public int stencilBits;
@@ -6144,6 +6146,12 @@ public class PGraphicsOpenGL extends PGraphics {
pgl.getIntegerv(PGL.STENCIL_BITS, temp, 0);
stencilBits = temp[0];
if (anisoSamplingSupported) {
float ftemp[] = new float[1];
pgl.getFloatv(PGL.MAX_TEXTURE_MAX_ANISOTROPY, ftemp, 0);
maxAnisoAmount = ftemp[0];
}
glParamsRead = true;
}