jMonkeyEngine / jmonkeyengine

A complete 3-D game development suite written in Java.
http://jmonkeyengine.org
BSD 3-Clause "New" or "Revised" License
3.84k stars 1.13k forks source link

GraphicsTracing/Timing on non-lwjgl backends #1278

Open MeFisto94 opened 4 years ago

MeFisto94 commented 4 years ago

I think I found two nits to fix in GraphicsTrace: https://github.com/jMonkeyEngine/jmonkeyengine/blob/acbddc2763117da6cc5d2cd66c63d98a6f31fa44/jme3-android/src/main/java/com/jme3/system/android/OGLESContext.java#L217 This misses GL2.class, which is implemented by https://github.com/jMonkeyEngine/jmonkeyengine/blob/acbddc2763117da6cc5d2cd66c63d98a6f31fa44/jme3-android/src/main/java/com/jme3/renderer/android/AndroidGL.java#L45

And for JOGL: https://github.com/jMonkeyEngine/jmonkeyengine/blob/acbddc2763117da6cc5d2cd66c63d98a6f31fa44/jme3-jogl/src/main/java/com/jme3/system/jogl/JoglContext.java#L188 and the following address the wrong GL.class here, because GL.class is com.jogamp.opengl.GL, and not the com.jme3.renderer.opengl.GL (aka OpenGL 1 interface).

Both issues probably don't harm beyond instanceof Checks fail, but it could also be that the Proxy doesn't even hook the GL methods in that case, which would make this more critical.

On a similar sidenote: Why is there only GraphicsTrace for Android but no GraphicsTiming, which would also be interesting? Forgotten?

Sorry paul for again taking your time, but you are probably the only one knowing Proxies and I guess for you it's only a matter of 5 minutes then.

Ali-RS commented 1 year ago

Just a note:

jme3-jogl backend was removed from the JME repo since v3.4.