Java 类org.lwjgl.opengl.GL42 实例源码

项目:warp    文件:GBuffer.java   
public void initWithSize(int width, int height) {
    GL11.glBindTexture(GL11.GL_TEXTURE_2D, textures[0]);
    GL42.glTexStorage2D(GL11.GL_TEXTURE_2D, 1, GL11.GL_RGBA8, width, height);
    setDefaultParams();
    GL11.glBindTexture(GL11.GL_TEXTURE_2D, textures[1]);
    GL42.glTexStorage2D(GL11.GL_TEXTURE_2D, 1, GL30.GL_R32UI, width, height);
    setDefaultParams();
    GL11.glBindTexture(GL11.GL_TEXTURE_2D, textures[2]);
    GL42.glTexStorage2D(GL11.GL_TEXTURE_2D, 1, GL11.GL_RGB4, width, height);
    setDefaultParams();
    GL11.glBindTexture(GL11.GL_TEXTURE_2D, textures[3]);
    GL42.glTexStorage2D(GL11.GL_TEXTURE_2D, 1, GL30.GL_DEPTH_COMPONENT32F, width, height);
    setDefaultParams();
    this.width = width;
    this.height = height;
}
项目:Visage    文件:Errors.java   
private static void buildMapping() {
    if (mapping != null) return;
    Multimap<Integer, String> map = HashMultimap.create();
    List<Class<?>> classes = ImmutableList.of(
            GL11.class, GL12.class, GL13.class, GL14.class, GL15.class,
            GL20.class, GL21.class, GL30.class, GL31.class, GL32.class,
            GL33.class, GL40.class, GL41.class, GL42.class, GL43.class,
            GL44.class, GL45.class, GLFW.class
            );
    for (Class<?> clazz : classes) {
        for (Field f : clazz.getDeclaredFields()) {
            if (f.getName().toUpperCase(Locale.ROOT).equals(f.getName()) &&
                    f.getType() == int.class && Modifier.isPublic(f.getModifiers()) && Modifier.isStatic(f.getModifiers())) {
                List<String> li = Splitter.on('_').splitToList(f.getName());
                li = li.subList(1, li.size());
                String clean =
                    Joiner.on(' ').join(
                        li.stream()
                            .map(Errors::toTitleCase)
                            .iterator());
                try {
                    map.put(f.getInt(null), clean);
                } catch (Throwable t) {
                    t.printStackTrace();
                }
            }
        }
    }
    mapping = map;
}
项目:oreon-engine    文件:GLRenderEngine.java   
private void getDeviceProperties(){
    System.out.println("OpenGL version: " + GL11.glGetString(GL11.GL_VERSION) + " bytes");
    System.out.println("Max Geometry Uniform Blocks: " + GL11.glGetInteger(GL31.GL_MAX_GEOMETRY_UNIFORM_BLOCKS));
    System.out.println("Max Geometry Shader Invocations: " + GL11.glGetInteger(GL40.GL_MAX_GEOMETRY_SHADER_INVOCATIONS));
    System.out.println("Max Uniform Buffer Bindings: " + GL11.glGetInteger(GL31.GL_MAX_UNIFORM_BUFFER_BINDINGS));
    System.out.println("Max Uniform Block Size: " + GL11.glGetInteger(GL31.GL_MAX_UNIFORM_BLOCK_SIZE) + " bytes");
    System.out.println("Max SSBO Block Size: " + GL11.glGetInteger(GL43.GL_MAX_SHADER_STORAGE_BLOCK_SIZE) + " bytes");  
    System.out.println("Max Image Bindings: " + GL11.glGetInteger(GL42.GL_MAX_IMAGE_UNITS));
}