AbstractTexture .java

net.minecraft.client.renderer.texture.AbstractTexture (class): members: setBlurMipmapDirect, deleteGlTexture, glTextureId, mipmapLast, blurLast, mipmap.

net.minecraft.client.renderer.textureclass66 linesclient1.6 KB

Implements

API Surface (5)

void setBlurMipmapDirect(boolean p_174937_1_, boolean p_174937_2_)
void setBlurMipmap(boolean p_174936_1_, boolean p_174936_2_)
void restoreLastBlurMipmap()
int getGlTextureId()
void deleteGlTexture()

Fields & Constants (5)

glTextureId
blur
mipmap
blurLast
mipmapLast

Code Graph: Dependencies (2)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

AbstractTexture.java66 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.client.renderer.texture;
2
3
import org.lwjgl.opengl.GL11;
4
5
public abstract class AbstractTexture implements ITextureObject
6
{
7
    protected int glTextureId = -1;
8
    protected boolean blur;
9
    protected boolean mipmap;
10
    protected boolean blurLast;
11
    protected boolean mipmapLast;
12
13
    public void setBlurMipmapDirect(boolean p_174937_1_, boolean p_174937_2_)
14
    {
15
        this.blur = p_174937_1_;
16
        this.mipmap = p_174937_2_;
17
        int i = -1;
18
        int j = -1;
19
20
        if (p_174937_1_)
21
        {
22
            i = p_174937_2_ ? 9987 : 9729;
23
            j = 9729;
24
        }
25
        else
26
        {
27
            i = p_174937_2_ ? 9986 : 9728;
28
            j = 9728;
29
        }
30
31
        GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, i);
32
        GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, j);
33
    }
34
35
    public void setBlurMipmap(boolean p_174936_1_, boolean p_174936_2_)
36
    {
37
        this.blurLast = this.blur;
38
        this.mipmapLast = this.mipmap;
39
        this.setBlurMipmapDirect(p_174936_1_, p_174936_2_);
40
    }
41
42
    public void restoreLastBlurMipmap()
43
    {
44
        this.setBlurMipmapDirect(this.blurLast, this.mipmapLast);
45
    }
46
47
    public int getGlTextureId()
48
    {
49
        if (this.glTextureId == -1)
50
        {
51
            this.glTextureId = TextureUtil.glGenTextures();
52
        }
53
54
        return this.glTextureId;
55
    }
56
57
    public void deleteGlTexture()
58
    {
59
        if (this.glTextureId != -1)
60
        {
61
            TextureUtil.deleteTexture(this.glTextureId);
62
            this.glTextureId = -1;
63
        }
64
    }
65
}
66

Deobfuscated MCP 1.8.9 source of AbstractTexture from Marcelektro/MavenMCP-1.8.9 (net/minecraft/client/renderer/texture/AbstractTexture.java), stored verbatim.