查看lwjgl常用状态的值
Posted 蔚蓝星空
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了查看lwjgl常用状态的值相关的知识,希望对你有一定的参考价值。
在遇到状态值较多较复杂的情况,可以选择使用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)); }
以上是关于查看lwjgl常用状态的值的主要内容,如果未能解决你的问题,请参考以下文章