Skip to content

Conversation

@MeFisto94
Copy link
Member

Same policy here, especially since nobody commented on #1241 - Going to merge in 7 days.
I've also fixed a javadoc warning in the surrounding code, sorry for that :D

@stephengold
Copy link
Member

This sounds like a great idea, but when I add setGraphicsDebug(true) to HelloJME3 and run it, it crashes quickly with a RendererException:

Jan 26, 2020 11:58:09 PM com.jme3.app.LegacyApplication handleError
SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
com.jme3.renderer.RendererException: Image format 'ABGR8' is unsupported by the video hardware.
	at com.jme3.renderer.opengl.TextureUtil.getImageFormatWithError(TextureUtil.java:102)
	at com.jme3.renderer.opengl.TextureUtil.uploadTexture(TextureUtil.java:252)
	at com.jme3.renderer.opengl.GLRenderer.updateTexImageData(GLRenderer.java:2498)
	at com.jme3.renderer.opengl.GLRenderer.setTexture(GLRenderer.java:2536)
	at com.jme3.material.Material.updateShaderMaterialParameters(Material.java:845)
	at com.jme3.material.Material.render(Material.java:1020)
	at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:614)
	at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:266)
	at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:302)
	at com.jme3.renderer.RenderManager.renderViewPortQueues(RenderManager.java:905)
	at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:779)
	at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1108)
	at com.jme3.renderer.RenderManager.render(RenderManager.java:1166)
	at com.jme3.app.SimpleApplication.update(SimpleApplication.java:272)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:151)
	at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:197)
	at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:232)
	at java.lang.Thread.run(Thread.java:748)

Perhaps address the errors before adding this feature?

@MeFisto94
Copy link
Member Author

Yes, this is "expected" and one of the reasons I want to push for adding GraphicsDebug:
Essentially everything needs to be run with GraphicsDebug as we otherwise ignore so many problems.
Another one happens when trying to run openGL 3.2 within loading the extensions (GL_INVALID_ENUM), which we otherwise silently ignore.

In the following days I will extend my testing, so we can find a few of these cases, but they might still pop up for users from time to time then.

Regarding said exception: https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-jogl/src/main/java/com/jme3/renderer/jogl/TextureUtil.java#L172
This could stem from some different variant of #1243
Can you run glxinfo and see if GL_EXT_abgr is present? For me it certainly was.
Another question would be why abgrToRgbaConversionEnabled isn't enabled. It would bypass this problem by converting the files, which is slow but works on unsupported hardware. See here

Oh and another question is if this code is basically the same for lwjgl, I only stumbled over jogl during a short web search.

We might spin this of into a separate issue actually

@stephengold
Copy link
Member

I agree that separate issues are warranted for any errors encountered when the debug option is enabled.

@stephengold
Copy link
Member

I've opened issue #1272 and will integrate this PR promptly to support additional testing.

@stephengold stephengold merged commit eee3702 into jMonkeyEngine:master Jan 27, 2020
@MeFisto94
Copy link
Member Author

Actually forgot to mention: @mitm001 might want to check if the wiki mentions GraphicsDebug at all and if not, could maybe incooperate it into the "debugging" section :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants