use of me.jellysquid.mods.sodium.client.render.gl.GlVertexBuffer in project sodium-fabric by CaffeineMC.
the class ChunkRendererVBO method render.
@Override
public void render(MatrixStack matrixStack, RenderLayer layer, ChunkRenderDataVBO chunk) {
GlVertexBuffer vertexBuffer = chunk.getVertexBufferForLayer(layer);
vertexBuffer.bind();
VertexFormats.POSITION_COLOR_TEXTURE_LIGHT_NORMAL.startDrawing(0L);
vertexBuffer.draw(matrixStack.peek().getModel(), GL11.GL_QUADS);
}
use of me.jellysquid.mods.sodium.client.render.gl.GlVertexBuffer in project sodium-fabric by CaffeineMC.
the class ChunkRenderDataVBO method uploadMeshes.
@Override
public void uploadMeshes(Object2ObjectMap<RenderLayer, BufferUploadData> layers) {
for (Map.Entry<RenderLayer, BufferUploadData> entry : layers.entrySet()) {
GlVertexBuffer array = this.vbos.get(entry.getKey());
if (array == null) {
throw new NullPointerException("No graphics state container for layer " + entry.getKey());
}
array.upload(entry.getValue());
}
}
Aggregations