本文整理汇总了Java中net.minecraft.client.renderer.texture.TextureUtil.allocateTexture方法的典型用法代码示例。如果您正苦于以下问题:Java TextureUtil.allocateTexture方法的具体用法?Java TextureUtil.allocateTexture怎么用?Java TextureUtil.allocateTexture使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.texture.TextureUtil
的用法示例。
在下文中一共展示了TextureUtil.allocateTexture方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initDynamicTexture
import net.minecraft.client.renderer.texture.TextureUtil; //导入方法依赖的package包/类
public static void initDynamicTexture(int texID, int width, int height, DynamicTexture tex)
{
MultiTexID multitexid = tex.getMultiTexID();
int[] aint = tex.getTextureData();
int i = width * height;
Arrays.fill(aint, i, i * 2, -8421377);
Arrays.fill((int[])aint, i * 2, i * 3, (int)0);
TextureUtil.allocateTexture(multitexid.base, width, height);
TextureUtil.setTextureBlurMipmap(false, false);
TextureUtil.setTextureClamped(false);
TextureUtil.allocateTexture(multitexid.norm, width, height);
TextureUtil.setTextureBlurMipmap(false, false);
TextureUtil.setTextureClamped(false);
TextureUtil.allocateTexture(multitexid.spec, width, height);
TextureUtil.setTextureBlurMipmap(false, false);
TextureUtil.setTextureClamped(false);
GlStateManager.bindTexture(multitexid.base);
}
示例2: loadDirect
import net.minecraft.client.renderer.texture.TextureUtil; //导入方法依赖的package包/类
@Override
public @Nonnull DynamicImageTexture loadDirect() {
final int[][] mipdata = this.mipdata;
if (mipdata!=null&&mipdata.length>=1) {
final int id = getId();
if (this.miplevel>=1) {
TextureUtil.allocateTextureImpl(id, this.miplevel, this.width, this.height, Client.mc.gameSettings.anisotropicFiltering);
TextureUtil.uploadTextureMipmap(mipdata, this.width, this.height, 0, 0, false, false);
} else {
TextureUtil.allocateTexture(id, this.width, this.height);
TextureUtil.uploadTexture(id, mipdata[0], this.width, this.height);
}
this.mipdata = null;
}
return this;
}
示例3: PaintingSheet
import net.minecraft.client.renderer.texture.TextureUtil; //导入方法依赖的package包/类
public PaintingSheet(int res){
glTexId = TextureUtil.glGenTextures();
this.resolution = res;
int total = resolution * resolution / 256;
for(int i = 0 ;i < total; i ++)icons.add(new PaintingIcon(this,i));
TextureUtil.allocateTexture(glTexId, resolution, resolution);
}
示例4: GXTexture
import net.minecraft.client.renderer.texture.TextureUtil; //导入方法依赖的package包/类
public GXTexture(int par1, int par2, int[] data)
{
this.width = par1;
this.height = par2;
this.dynamicTextureData = data;
TextureUtil.allocateTexture(this.getGlTextureId(), par1, par2);
this.updateDynamicTexture();
}
示例5: resize
import net.minecraft.client.renderer.texture.TextureUtil; //导入方法依赖的package包/类
public void resize(int width, int height) {
if (width != this.width || height != this.height) {
this.width = width;
this.height = height;
TextureUtil.allocateTexture(getGlTextureId(), width, height);
}
}