From fd78f4d896fc473de4cc04d68b0ce260be2550c1 Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 28 Feb 2015 13:38:34 +0100 Subject: [PATCH] Added renderer support for glPatchParameter --- .../src/main/java/com/jme3/renderer/opengl/GLRenderer.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java index 5a8641b7a..1dcd8b659 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java @@ -107,6 +107,7 @@ public class GLRenderer implements Renderer { private final GL gl; private final GL2 gl2; private final GL3 gl3; + private final GL4 gl4; private final GLExt glext; private final GLFbo glfbo; private final TextureUtil texUtil; @@ -115,6 +116,7 @@ public class GLRenderer implements Renderer { this.gl = gl; this.gl2 = gl instanceof GL2 ? (GL2)gl : null; this.gl3 = gl instanceof GL3 ? (GL3)gl : null; + this.gl4 = gl instanceof GL4 ? (GL4)gl : null; this.glfbo = glfbo; this.glext = glfbo instanceof GLExt ? (GLExt)glfbo : null; this.texUtil = new TextureUtil(gl, gl2, glext, context); @@ -2686,7 +2688,9 @@ public class GLRenderer implements Renderer { gl.glLineWidth(mesh.getLineWidth()); context.lineWidth = mesh.getLineWidth(); } - + if(gl4!=null && mesh.getMode().equals(Mode.Patch)){ + gl4.glPatchParameter(mesh.getPatchVertexCount()); + } statistics.onMeshDrawn(mesh, lod, count); // if (ctxCaps.GL_ARB_vertex_array_object){ // renderMeshVertexArray(mesh, lod, count);