minecraft-src/com/mojang/blaze3d/opengl/GlTextureView.java
2025-09-18 12:27:44 +00:00

32 lines
671 B
Java

package com.mojang.blaze3d.opengl;
import com.mojang.blaze3d.textures.GpuTextureView;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
@Environment(EnvType.CLIENT)
public class GlTextureView extends GpuTextureView {
private boolean closed;
protected GlTextureView(GlTexture texture, int baseMipLevel, int mipLevels) {
super(texture, baseMipLevel, mipLevels);
texture.addViews();
}
@Override
public boolean isClosed() {
return this.closed;
}
@Override
public void close() {
if (!this.closed) {
this.closed = true;
this.texture().removeViews();
}
}
public GlTexture texture() {
return (GlTexture)super.texture();
}
}