zoukankan      html  css  js  c++  java
  • 查看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));
        }
  • 相关阅读:
    python面试的100题(2)
    面试题目和地址
    python面试的100题(1)
    no module named系列问题解决
    ubuntu16.04无法打开终端
    Reinforcement Learning,微信公众号:DRL学习
    Java中的I/O操作File
    Java中的Date时间转换【SimpleDateFormat (parse和format)】和Calendar日历表
    重写equals方法
    Java中栈,堆,常量池的简单理解
  • 原文地址:https://www.cnblogs.com/2333/p/7523750.html
Copyright © 2011-2022 走看看