Skip to content

Commit 154d3ab

Browse files
committed
fixed build errors in GlVertexBuffer
1 parent ebf9528 commit 154d3ab

22 files changed

Lines changed: 268 additions & 307 deletions
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**
2+
* Contains utilities for Vulkan and OpenGL compatible applications.
3+
*/
4+
package com.jme3.compat;

jme3-core/src/main/java/com/jme3/scene/GlMesh.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,11 +988,16 @@ public void getTriangle(int index, Vector3f v1, Vector3f v2, Vector3f v3) {
988988
*
989989
* @param tri The triangle to store the positions in
990990
*/
991-
public void getTriangle(int index, Triangle tri) {
991+
@Override
992+
public Triangle getTriangle(int index, Triangle tri) {
993+
if (tri == null) {
994+
tri = new Triangle();
995+
}
992996
getTriangle(index, tri.get1(), tri.get2(), tri.get3());
993997
tri.setIndex(index);
994998
tri.setCenter(null); // invalidate previously cached centroid, if any
995999
tri.setNormal(null);
1000+
return tri;
9961001
}
9971002

9981003
/**

0 commit comments

Comments
 (0)