I have a BlockEntityRenderer and I am rendering an obj model using:
VertexConsumer vertexConsumer = iRenderTypeBuffer.getBuffer(RenderType.solid());
rendererProvider.getBlockRenderDispatcher().getModelRenderer().renderModel(matrixStack.last(), vertexConsumer, null, myModel, 255f, 255f, 255f, combinedLight, combinedOverlay, EmptyModelData.INSTANCE);
The performance is pretty terrible rendering it this way. If I instead use the same model as the blockstate model for the block then there are no performance issues. I ran a profiler and found it was spending all its time in com.mojang.blaze3d.vertex.VertexConsumer.putBulkData(). There must be some way to cache what putBulkData() is doing?
Just wondering if anyone has some thoughts on this, thanks.