package com.mojang.blaze3d.systems; import com.mojang.blaze3d.DontObfuscate; import com.mojang.blaze3d.buffers.GpuBuffer; import com.mojang.blaze3d.buffers.GpuBufferSlice; import com.mojang.blaze3d.pipeline.RenderPipeline; import com.mojang.blaze3d.textures.GpuTextureView; import com.mojang.blaze3d.vertex.VertexFormat; import java.util.Collection; import java.util.function.BiConsumer; import java.util.function.Supplier; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) @DontObfuscate public interface RenderPass extends AutoCloseable { void pushDebugGroup(Supplier supplier); void popDebugGroup(); void setPipeline(RenderPipeline renderPipeline); void bindSampler(String string, @Nullable GpuTextureView gpuTextureView); void setUniform(String string, GpuBuffer gpuBuffer); void setUniform(String string, GpuBufferSlice gpuBufferSlice); void enableScissor(int i, int j, int k, int l); void disableScissor(); void setVertexBuffer(int i, GpuBuffer gpuBuffer); void setIndexBuffer(GpuBuffer gpuBuffer, VertexFormat.IndexType indexType); void drawIndexed(int i, int j, int k, int l); void drawMultipleIndexed( Collection> collection, @Nullable GpuBuffer gpuBuffer, @Nullable VertexFormat.IndexType indexType, Collection collection2, T object ); void draw(int i, int j); void close(); @Environment(EnvType.CLIENT) public record Draw( int slot, GpuBuffer vertexBuffer, @Nullable GpuBuffer indexBuffer, @Nullable VertexFormat.IndexType indexType, int firstIndex, int indexCount, @Nullable BiConsumer uniformUploaderConsumer ) { public Draw(int slot, GpuBuffer vertexBuffer, GpuBuffer indexBuffer, VertexFormat.IndexType indexType, int firstIndex, int indexCount) { this(slot, vertexBuffer, indexBuffer, indexType, firstIndex, indexCount, null); } } @Environment(EnvType.CLIENT) public interface UniformUploader { void upload(String string, GpuBufferSlice gpuBufferSlice); } }