From 0c35b20412072e9d720c5fa0a51cfee615d73ad8 Mon Sep 17 00:00:00 2001 From: michael Date: Mon, 23 Feb 2015 18:38:11 +0100 Subject: [PATCH] Added Patch as MeshMode Added private variable patchVertexCount --- jme3-core/src/main/java/com/jme3/scene/Mesh.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/scene/Mesh.java b/jme3-core/src/main/java/com/jme3/scene/Mesh.java index 5d0e8dcec..357cee438 100644 --- a/jme3-core/src/main/java/com/jme3/scene/Mesh.java +++ b/jme3-core/src/main/java/com/jme3/scene/Mesh.java @@ -134,8 +134,12 @@ public class Mesh implements Savable, Cloneable { * {@link Mesh#setElementLengths(int[]) element lengths} must * be specified for this mode. */ - Hybrid(false); - + Hybrid(false), + /** + * Used for Tesselation only. Requires to set the number of vertices + * for each patch (default is 3 for triangle tesselation) + */ + Patch(true); private boolean listMode = false; private Mode(boolean listMode){ @@ -175,6 +179,7 @@ public class Mesh implements Savable, Cloneable { private int vertCount = -1; private int elementCount = -1; private int instanceCount = -1; + private int patchVertexCount=3; //only used for tesselation private int maxNumWeights = -1; // only if using skeletal animation private int[] elementLengths;