diff options
-rw-r--r-- | src/main/java/org/jogamp/java3d/Canvas3D.java | 6 | ||||
-rw-r--r-- | src/main/java/org/jogamp/java3d/Jogl2es2Pipeline.java | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/org/jogamp/java3d/Canvas3D.java b/src/main/java/org/jogamp/java3d/Canvas3D.java index b4d5bcb..fe21197 100644 --- a/src/main/java/org/jogamp/java3d/Canvas3D.java +++ b/src/main/java/org/jogamp/java3d/Canvas3D.java @@ -795,6 +795,8 @@ ArrayList<Integer> textureIdResourceFreeList = new ArrayList<Integer>(); // Max number of vertex attrs (not counting coord, etc.) int maxVertexAttrs = 0; + + int maxVaryingVectors = 0; // End of variables set by createNewContext()/createQueryContext() @@ -3741,8 +3743,12 @@ ArrayList<TextureRetained> textureIDResourceTable = new ArrayList<TextureRetaine keys.add("textureImageUnitsCombinedMax"); values.add(new Integer(maxCombinedTextureImageUnits)); + keys.add("maxVaryingVectors"); + values.add(new Integer(maxVaryingVectors)); + keys.add("vertexAttrsMax"); values.add(new Integer(maxVertexAttrs)); + keys.add("shadingLanguageGLSL"); values.add(new Boolean(shadingLanguageGLSL)); diff --git a/src/main/java/org/jogamp/java3d/Jogl2es2Pipeline.java b/src/main/java/org/jogamp/java3d/Jogl2es2Pipeline.java index fa556e9..3e2ba74 100644 --- a/src/main/java/org/jogamp/java3d/Jogl2es2Pipeline.java +++ b/src/main/java/org/jogamp/java3d/Jogl2es2Pipeline.java @@ -7012,6 +7012,11 @@ class Jogl2es2Pipeline extends Jogl2es2DEPPipeline { cv.maxVertexAttrs = 0; } + + //http://stackoverflow.com/questions/26682631/webgl-shaders-maximum-number-of-varying-variables + gl.glGetIntegerv(GL2ES2.GL_MAX_VARYING_VECTORS, tmp, 0); + cv.maxVaryingVectors = tmp[0]; + cv.shadingLanguageGLSL = true; } } @@ -7030,6 +7035,7 @@ class Jogl2es2Pipeline extends Jogl2es2DEPPipeline cv.maxVertexTextureImageUnits = 0; cv.maxCombinedTextureImageUnits = 0; cv.maxVertexAttrs = 0; + cv.maxVaryingVectors = 0; cv.extensionsSupported = 0; cv.textureExtendedFeatures = 0; cv.textureColorTableSize = 0; |