标签:end opengl src blend float ext func integer ntop
在遇到状态值较多较复杂的情况,可以选择使用GL11.glIsEnabled()或者GL11.glGet()函数来查看状态机值,以下是常用值:
public static void printOpenGlArg() { System.out.println("GL_LIGHTING:" + GL11.glIsEnabled(GL11.GL_LIGHTING)); System.out.println("GL_FOG:" + GL11.glIsEnabled(GL11.GL_FOG)); System.out.println("GL_CULL_FACE:" + GL11.glIsEnabled(GL11.GL_CULL_FACE)); System.out.println("GL_ALPHA_TEST:" + GL11.glIsEnabled(GL11.GL_ALPHA_TEST)); System.out.println("GL_DEPTH_TEST:" + GL11.glIsEnabled(GL11.GL_DEPTH_TEST)); System.out.println("GL_TEXTURE_2D:" + GL11.glIsEnabled(GL11.GL_TEXTURE_2D)); System.out.println("GL_GREATER:" + GL11.glGetFloat(GL11.GL_GREATER)); System.out.println("GL_BLEND_SRC:" + GL11.glGetInteger(GL11.GL_BLEND_SRC)); System.out.println("GL_BLEND_DST:" + GL11.glGetInteger(GL11.GL_BLEND_DST)); System.out.println("GL_ALPHA_TEST_FUNC:" + GL11.glGetInteger(GL11.GL_ALPHA_TEST_FUNC)); System.out.println("GL_ALPHA_TEST_REF:" + GL11.glGetInteger(GL11.GL_ALPHA_TEST_REF)); System.out.println("r:" + GL11.glGetFloat(GL11.GL_RED)); System.out.println("g:" + GL11.glGetFloat(GL11.GL_GREEN)); System.out.println("b:" + GL11.glGetFloat(GL11.GL_BLUE)); System.out.println("a:" + GL11.glGetFloat(GL11.GL_ALPHA)); } public static void printOpenGlColor() { System.out.println("r:" + GL11.glGetFloat(GL11.GL_RED)); System.out.println("g:" + GL11.glGetFloat(GL11.GL_GREEN)); System.out.println("b:" + GL11.glGetFloat(GL11.GL_BLUE)); System.out.println("a:" + GL11.glGetFloat(GL11.GL_ALPHA)); }
标签:end opengl src blend float ext func integer ntop
原文地址:http://www.cnblogs.com/2333/p/7523750.html