package com.mojang.blaze3d.buffers; import com.mojang.blaze3d.DontObfuscate; import java.nio.ByteBuffer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @Environment(EnvType.CLIENT) @DontObfuscate public abstract class GpuBuffer implements AutoCloseable { private final BufferType type; private final BufferUsage usage; public int size; public GpuBuffer(BufferType bufferType, BufferUsage bufferUsage, int i) { this.type = bufferType; this.size = i; this.usage = bufferUsage; } public int size() { return this.size; } public BufferType type() { return this.type; } public BufferUsage usage() { return this.usage; } public abstract boolean isClosed(); public abstract void close(); @Environment(EnvType.CLIENT) @DontObfuscate public interface ReadView extends AutoCloseable { ByteBuffer data(); void close(); } }