Explorar o código

Cylinder: fix incorrect axis samples for closed

Kirill Vainer %!s(int64=9) %!d(string=hai) anos
pai
achega
b431d16981
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      jme3-core/src/main/java/com/jme3/scene/shape/Cylinder.java

+ 1 - 0
jme3-core/src/main/java/com/jme3/scene/shape/Cylinder.java

@@ -222,6 +222,7 @@ public class Cylinder extends Mesh {
 //        VertexBuffer pvb = getBuffer(Type.Position);
 //        VertexBuffer nvb = getBuffer(Type.Normal);
 //        VertexBuffer tvb = getBuffer(Type.TexCoord);
+        axisSamples += (closed ? 2 : 0);
 
         // Vertices
         int vertCount = axisSamples * (radialSamples + 1) + (closed ? 2 : 0);