/** * Called by the Renderer when a mesh has been drawn. */ public void onMeshDrawn(Mesh mesh, int lod){ onMeshDrawn(mesh, lod, 1); }
public void renderMesh(Mesh mesh, int lod, int count, VertexBuffer[] instanceData) { if (mesh.getVertexCount() == 0 || mesh.getTriangleCount() == 0 || count == 0) { return; } if (count > 1 && !caps.contains(Caps.MeshInstancing)) { throw new RendererException("Mesh instancing is not supported by the video hardware"); } if (mesh.getLineWidth() != 1f && context.lineWidth != mesh.getLineWidth()) { gl.glLineWidth(mesh.getLineWidth()); context.lineWidth = mesh.getLineWidth(); } if (gl4 != null && mesh.getMode().equals(Mode.Patch)) { gl4.glPatchParameter(mesh.getPatchVertexCount()); } statistics.onMeshDrawn(mesh, lod, count); // if (ctxCaps.GL_ARB_vertex_array_object){ // renderMeshVertexArray(mesh, lod, count); // }else{ renderMeshDefault(mesh, lod, count, instanceData); // } }
/** * Called by the Renderer when a mesh has been drawn. */ public void onMeshDrawn(Mesh mesh, int lod){ onMeshDrawn(mesh, lod, 1); }
public void renderMesh(Mesh mesh, int lod, int count, VertexBuffer[] instanceData) { if (mesh.getVertexCount() == 0 || mesh.getTriangleCount() == 0 || count == 0) { return; } if (count > 1 && !caps.contains(Caps.MeshInstancing)) { throw new RendererException("Mesh instancing is not supported by the video hardware"); } if (mesh.getLineWidth() != 1f && context.lineWidth != mesh.getLineWidth()) { gl.glLineWidth(mesh.getLineWidth()); context.lineWidth = mesh.getLineWidth(); } if (gl4 != null && mesh.getMode().equals(Mode.Patch)) { gl4.glPatchParameter(mesh.getPatchVertexCount()); } statistics.onMeshDrawn(mesh, lod, count); // if (ctxCaps.GL_ARB_vertex_array_object){ // renderMeshVertexArray(mesh, lod, count); // }else{ renderMeshDefault(mesh, lod, count, instanceData); // } }
statistics.onMeshDrawn(mesh, lod, count);