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