API Surface (5) GpuTexture texture()
int baseMipLevel()
int mipLevels()
int getWidth(final int mipLevel)
int getHeight(final int mipLevel)
Fields & Constants (3) texture
baseMipLevel
mipLevels
Code Graph: Dependencies (2) Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.
Full Source
BaseGpuTextureView.java 45 lines · Minecraft 26.3 · verbatim Copy
1 package com.mojang.renderpearl.backend.common;
2
3 import com.mojang.renderpearl.api.textures.GpuTexture;
4 import com.mojang.renderpearl.api.textures.GpuTextureView;
5 import net.fabricmc.api.EnvType;
6 import net.fabricmc.api.Environment;
7
8 @Environment(EnvType.CLIENT)
9 public abstract class BaseGpuTextureView implements GpuTextureView {
10 private final GpuTexture texture;
11 private final int baseMipLevel;
12 private final int mipLevels;
13
14 protected BaseGpuTextureView(final GpuTexture texture, final int baseMipLevel, final int mipLevels) {
15 this.texture = texture;
16 this.baseMipLevel = baseMipLevel;
17 this.mipLevels = mipLevels;
18 }
19
20 @Override
21 public GpuTexture texture() {
22 return this.texture;
23 }
24
25 @Override
26 public int baseMipLevel() {
27 return this.baseMipLevel;
28 }
29
30 @Override
31 public int mipLevels() {
32 return this.mipLevels;
33 }
34
35 @Override
36 public int getWidth(final int mipLevel) {
37 return this.texture.getWidth(mipLevel + this.baseMipLevel);
38 }
39
40 @Override
41 public int getHeight(final int mipLevel) {
42 return this.texture.getHeight(mipLevel + this.baseMipLevel);
43 }
44 }
45
Decompiled Minecraft 26.3 source of BaseGpuTextureView (com/mojang/renderpearl/backend/common/BaseGpuTextureView.java) with Mojang official mappings, stored verbatim on the site.