當前位置: 首頁>>代碼示例>>Java>>正文


Java TextureUtil.allocateTexture方法代碼示例

本文整理匯總了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);
}
 
開發者ID:SkidJava,項目名稱:BaseClient,代碼行數:19,代碼來源:ShadersTex.java

示例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;
}
 
開發者ID:Team-Fruit,項目名稱:SignPicture,代碼行數:17,代碼來源:DynamicImageTexture.java

示例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);
}
 
開發者ID:hypercross,項目名稱:minepainter,代碼行數:10,代碼來源:PaintingSheet.java

示例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();
}
 
開發者ID:ds84182,項目名稱:OpenGX,代碼行數:9,代碼來源:GXTexture.java

示例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);
	}
}
 
開發者ID:OpenMods,項目名稱:OpenModsLib,代碼行數:8,代碼來源:DisposableDynamicTexture.java


注:本文中的net.minecraft.client.renderer.texture.TextureUtil.allocateTexture方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。