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


Java GL12.GL_CLAMP_TO_EDGE屬性代碼示例

本文整理匯總了Java中org.lwjgl.opengl.GL12.GL_CLAMP_TO_EDGE屬性的典型用法代碼示例。如果您正苦於以下問題:Java GL12.GL_CLAMP_TO_EDGE屬性的具體用法?Java GL12.GL_CLAMP_TO_EDGE怎麽用?Java GL12.GL_CLAMP_TO_EDGE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.lwjgl.opengl.GL12的用法示例。


在下文中一共展示了GL12.GL_CLAMP_TO_EDGE屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setTextureParams

private void setTextureParams(){
	int filterType = nearestFiltering ? GL11.GL_NEAREST : GL11.GL_LINEAR;
	GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, filterType);
	GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, filterType);
	int wrapType = clampEdges ? GL12.GL_CLAMP_TO_EDGE : GL11.GL_REPEAT;
	GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, wrapType);
	GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, wrapType);
}
 
開發者ID:TheThinMatrix,項目名稱:LowPolyWater,代碼行數:8,代碼來源:TextureAttachment.java

示例2: onLoad

@Override
protected Texture onLoad(JSONObject src) throws Exception
{
	Asset<Bitmap> bitmap = this.assets.getAsset("bitmap", this.getString(src, "bitmap"));
	String minMagFilterKey = this.getString(src, "minMagFilter");
	String wrapModeKey = this.getString(src, "wrapMode");

	int minMagFilter;
	if ("nearest".equals(minMagFilterKey))
	{
		minMagFilter = GL11.GL_NEAREST;
	}
	else if ("linear".equals(minMagFilterKey))
	{
		minMagFilter = GL11.GL_LINEAR;
	}
	else
	{
		throw new IllegalArgumentException("could not find valid value for parameter '" + "minMagFilter" + "'");
	}

	int wrapMode;
	if ("clamp_edge".equals(wrapModeKey))
	{
		wrapMode = GL12.GL_CLAMP_TO_EDGE;
	}
	else
	{
		throw new IllegalArgumentException("could not find valid value for parameter '" + "wrapMode" + "'");
	}

	return new Texture(bitmap.get(), minMagFilter, wrapMode);
}
 
開發者ID:andykuo1,項目名稱:candlelight,代碼行數:33,代碼來源:TextureLoader.java

示例3: setTextureParams

private void setTextureParams() {
    int filterType = nearestFiltering ? GL11.GL_NEAREST : GL11.GL_LINEAR;
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, filterType);
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, filterType);
    int wrapType = clampEdges ? GL12.GL_CLAMP_TO_EDGE : GL11.GL_REPEAT;
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_S, wrapType);
    GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_WRAP_T, wrapType);
}
 
開發者ID:GryPLOfficial,項目名稱:EcoSystem-Official,代碼行數:8,代碼來源:TextureAttachment.java

示例4: Texture

public Texture(int w, int h, int fillColour) {
	this(w, h, fillColour, GL11.GL_LINEAR, GL11.GL_NEAREST, GL12.GL_CLAMP_TO_EDGE);
}
 
開發者ID:tom5454,項目名稱:Toms-Mod,代碼行數:3,代碼來源:Texture.java


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