From 16e3e005073350204ad772335d66e63d00ecb8f5 Mon Sep 17 00:00:00 2001 From: shadowislord Date: Sun, 1 Feb 2015 20:03:42 -0500 Subject: [PATCH] Renderer Changes * Add new "Limits" enum to hold maximums of various renderer capabilities such as texture size * Add support for seamless cubemap (enabled by default for mipmapped cubemaps) * Fix conflict when using GL tracing with GL debugging --- .../com/jme3/renderer/opengl/GLDebugDesktop.java | 4 ++-- .../main/java/com/jme3/renderer/opengl/GLTracer.java | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLDebugDesktop.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLDebugDesktop.java index f71b15aae..e13402bd5 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLDebugDesktop.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLDebugDesktop.java @@ -3,12 +3,12 @@ package com.jme3.renderer.opengl; import java.nio.ByteBuffer; import java.nio.IntBuffer; -public class GLDebugGL2 extends GLDebugES { +public class GLDebugDesktop extends GLDebugES implements GL2, GL3 { private final GL2 gl2; private final GL3 gl3; - public GLDebugGL2(GL gl, GLFbo glfbo) { + public GLDebugDesktop(GL gl, GLFbo glfbo) { super(gl, glfbo); this.gl2 = gl instanceof GL2 ? (GL2) gl : null; this.gl3 = gl instanceof GL3 ? (GL3) gl : null; diff --git a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLTracer.java b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLTracer.java index d841e213f..e6498cfcd 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/opengl/GLTracer.java +++ b/jme3-core/src/main/java/com/jme3/renderer/opengl/GLTracer.java @@ -71,6 +71,7 @@ public final class GLTracer implements InvocationHandler { noEnumArgs("glTexImage2D", 1, 3, 4, 5); noEnumArgs("glTexImage3D", 1, 3, 4, 5, 6); noEnumArgs("glTexSubImage3D", 1, 2, 3, 4, 5, 6, 7); + noEnumArgs("glCompressedTexImage2D", 1, 3, 4, 5); noEnumArgs("glCompressedTexSubImage3D", 1, 2, 3, 4, 5, 6, 7); noEnumArgs("glDeleteTextures", 0); noEnumArgs("glReadPixels", 0, 1, 2, 3); @@ -86,8 +87,12 @@ public final class GLTracer implements InvocationHandler { noEnumArgs("glBindFramebufferEXT", 1); noEnumArgs("glBindRenderbufferEXT", 1); noEnumArgs("glRenderbufferStorageEXT", 2, 3); + noEnumArgs("glRenderbufferStorageMultisampleEXT", 1, 3, 4); noEnumArgs("glFramebufferRenderbufferEXT", 3); noEnumArgs("glFramebufferTexture2DEXT", 3, 4); + noEnumArgs("glBlitFramebufferEXT", 0, 1, 2, 3, 4, 5, 6, 7, 8); + + noEnumArgs("glCreateProgram", -1); noEnumArgs("glCreateShader", -1); @@ -110,6 +115,7 @@ public final class GLTracer implements InvocationHandler { noEnumArgs("glDetachShader", 0, 1); noEnumArgs("glDeleteShader", 0); noEnumArgs("glDeleteProgram", 0); + noEnumArgs("glBindFragDataLocation", 0, 1); } public GLTracer(Object obj, IntMap constMap) { @@ -153,13 +159,13 @@ public final class GLTracer implements InvocationHandler { * Creates a tracer implementation that wraps OpenGL 2+. * * @param glInterface OGL object to wrap - * @param glInterfaceClass The interface to implement + * @param glInterfaceClasses The interface(s) to implement * @return A tracer that implements the given interface */ - public static Object createDesktopGlTracer(Object glInterface, Class glInterfaceClass) { + public static Object createDesktopGlTracer(Object glInterface, Class ... glInterfaceClasses) { IntMap constMap = generateConstantMap(GL2.class, GLExt.class); return Proxy.newProxyInstance(glInterface.getClass().getClassLoader(), - new Class[] { glInterfaceClass }, + glInterfaceClasses, new GLTracer(glInterface, constMap)); }