I put in a bizarre wait of 2.5 seconds and cleared that block as far is this bit. Now, no matter what I try indices is null. What I'm trying is hacky, anyway, so I'd rather ask you when indices in CompiledInstance.renderVBO() might be null. The C# runtime operates very differently from the JVM.
do {
if (indexed) {
GL.BindBuffer(BufferTarget.ElementArrayBuffer, indicesId);
System.Console.WriteLine("CompiledInstance.renderVBO(): Is indices null? "+(indices==null));
if (indices==null){
indices = new IntBuffer(tris.Count * 3);
//return;
while (indices == null)
continue;}
GL.DrawElements(primitiveType, indexCount, DrawElementsType.UnsignedInt, indices.array);
System.Console.WriteLine("CompiledInstance.renderVBO(): BindBuffer()?");
GL.BindBuffer(BufferTarget.ElementArrayBuffer, 0);
} else {
System.Console.WriteLine("\n\nCompiledInstance.renderVBO(): GL.DrawArrays(...).\n");
GL.DrawArrays(primitiveType, 0, cnt);
}
}