|
|
|
@ -2379,6 +2379,10 @@ public class JoglRenderer implements Renderer { |
|
|
|
|
public void updateVertexArray(Mesh mesh) { |
|
|
|
|
int id = mesh.getId(); |
|
|
|
|
GL gl = GLContext.getCurrentGL(); |
|
|
|
|
//FIXME rather use GLCaps and do it once for all
|
|
|
|
|
boolean isVaoSupported = gl.isFunctionAvailable("glGenVertexArrays") && |
|
|
|
|
gl.isFunctionAvailable("glBindVertexArray"); |
|
|
|
|
if (isVaoSupported) { |
|
|
|
|
if (id == -1) { |
|
|
|
|
IntBuffer temp = intBuf1; |
|
|
|
|
if (gl.isGL2GL3()) { |
|
|
|
@ -2394,6 +2398,7 @@ public class JoglRenderer implements Renderer { |
|
|
|
|
} |
|
|
|
|
context.boundVertexArray = id; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
VertexBuffer interleavedData = mesh.getBuffer(Type.InterleavedData); |
|
|
|
|
if (interleavedData != null && interleavedData.isUpdateNeeded()) { |
|
|
|
|