GLRenderer: fix NPE when using mesh without index buffer
This commit is contained in:
parent
4e572605a8
commit
0d3ebf75bd
@ -2715,7 +2715,9 @@ public class GLRenderer implements Renderer {
|
|||||||
VertexBuffer indices = getIndexBuffer(mesh, lod);
|
VertexBuffer indices = getIndexBuffer(mesh, lod);
|
||||||
if (mesh.isUpdateNeeded()) {
|
if (mesh.isUpdateNeeded()) {
|
||||||
setupVertexBuffers(mesh, instanceData);
|
setupVertexBuffers(mesh, instanceData);
|
||||||
|
if (indices != null) {
|
||||||
updateBufferData(indices);
|
updateBufferData(indices);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
updateVertexBuffers(mesh, instanceData);
|
updateVertexBuffers(mesh, instanceData);
|
||||||
if (indices != null) {
|
if (indices != null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user