本文整理汇总了Java中org.lwjgl.opengl.GL11.glAlphaFunc方法的典型用法代码示例。如果您正苦于以下问题:Java GL11.glAlphaFunc方法的具体用法?Java GL11.glAlphaFunc怎么用?Java GL11.glAlphaFunc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.lwjgl.opengl.GL11
的用法示例。
在下文中一共展示了GL11.glAlphaFunc方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: render
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
/**
* @see org.newdawn.slick.Game#render(org.newdawn.slick.GameContainer, org.newdawn.slick.Graphics)
*/
public void render(GameContainer container, Graphics g)
throws SlickException {
String text = "abc";
font.drawString(610,100,text);
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glAlphaFunc(GL11.GL_GEQUAL, 0.5f);
font.drawString(610,150,text);
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glEnable(GL11.GL_BLEND);
g.translate(-50,-130);
g.scale(10,10);
font.drawString(0,0,text);
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glAlphaFunc(GL11.GL_GEQUAL, 0.5f);
font.drawString(0,26,text);
GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glEnable(GL11.GL_BLEND);
g.resetTransform();
g.setColor(Color.lightGray);
g.drawString("Original Size on Sheet", 620, 210);
g.drawString("10x Scale Up", 40, 575);
g.setColor(Color.darkGray);
g.drawRect(40, 40, 560,530);
g.drawRect(610, 105, 150,100);
g.setColor(Color.white);
g.drawString("512x512 Font Sheet", 620, 300);
g.drawString("NEHE Charset", 620, 320);
g.drawString("4096x4096 (8x) Source Image", 620, 340);
g.drawString("ScanSize = 20", 620, 360);
}
示例2: alphaFunc
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void alphaFunc(int func, float ref)
{
if (func != alphaState.func || ref != alphaState.ref)
{
alphaState.func = func;
alphaState.ref = ref;
GL11.glAlphaFunc(func, ref);
}
}
示例3: alphaFunc
import org.lwjgl.opengl.GL11; //导入方法依赖的package包/类
public static void alphaFunc(int func, float ref) {
GL11.glAlphaFunc(func, ref);
}