Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX
Posted by krishnak on Feb 26, 2013; 2:42pm
URL: https://forum.jogamp.org/JOGL-2-0-OpenGL-OpenGL-ES-backend-for-LibGDX-tp4027689p4028387.html
Thanks for following up this, however my TextureUtil.java already has the same code.
I have added some debug statement to check whether the conversion method is called.
I can say that the conversion is called because I get the image format as ABGR8 inside the uploadTexture method call.
Inside TextureUtil.java -> UploadTexture there is a nested if else block, in that when I run the code on a PC as well on RaspberryPi, the last else block is executed
i.e
else {
System.out.println("Inside fifth else");
gl.glTexImage2D(target,
i,
glFmt.internalFormat,
mipWidth,
mipHeight,
border,
glFmt.format,
glFmt.dataType,
data);
}
On the PC, the graphics appears.
On the PI, the black window appears, then the JMonkey debug screen which shows the vertices, Triangle, Objects, frame rate etc appears. But no graphics.
The only extra WARNING message that appears on the Raspberry Pi is this
Feb 26, 2013 1:07:33 PM com.jme3.renderer.jogl.JoglRenderer initialize
WARNING: Failed parsing GLSL version assuming it's v1.00
I added a debug statement in the JOGLRenderer.java
On the PC the GLSL version comes back as 120
However on the RaspberryPi, the GLSL version string is coming back as OpenGL - this defaults it to version 100.
I have just modified the code to default to 120 to see whether it makes any difference (I am just blindly coding with out any logic :))
Even with a default value of 120. I only get the black screen and the console of JMonkey - the objects do not appear. The console shows value for objects etc which match the value when I run the program on a PC.
SIGNIFICANT DIFFERENCE:
On RaspberryPi, if the GLSL version is assumed as 100 - the program hangs after it has been started, i.e a control c will not bring back the prompt, I had to do a CTRL ALT DEL to reboot.
However when I modified the default GLSL version to be 120 - the program no longer hangs, it responds to CTRL C and quits.