本文整理匯總了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);
}
}