JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

classic Classic list List threaded Threaded
249 messages Options
1 ... 3456789 ... 13
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

krishnak
After installing openAl and setting the property as advised. Things moved further.

Both with and with out X, the screen clears up to start the graphics - I get a black screen and then it quits with the following exception

Exception in thread "main-AWTAnimator-1" com.jme3.renderer.RendererException: Ima
ge format 'BGR8' is unsupported by the video hardware.
        at com.jme3.renderer.jogl.TextureUtil.getImageFormatWithError(TextureUti
l.java:235)
        at com.jme3.renderer.jogl.TextureUtil.uploadTexture(TextureUtil.java:246
)
        at com.jme3.renderer.jogl.JoglRenderer.updateTexImageData(JoglRenderer.j
ava:1986)
        at com.jme3.renderer.jogl.JoglRenderer.setTexture(JoglRenderer.java:2010
)
        at com.jme3.material.MatParamTexture.apply(MatParamTexture.java:86)
        at com.jme3.material.Material.render(Material.java:1036)
        at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:523
)
        at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.ja
va:322)
        at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:374)
        at com.jme3.renderer.RenderManager.renderViewPortQueues(RenderManager.ja
va:763)
        at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:719)
        at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:983
)
        at com.jme3.renderer.RenderManager.render(RenderManager.java:1029)
        at com.jme3.app.SimpleApplication.update(SimpleApplication.java:252)
        at com.jme3.system.jogl.JoglNewtDisplay.display(JoglNewtDisplay.java:241)
        at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:548)
        at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:533)
        at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:280)
        at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:904)
        at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:822)
        at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:543)
        at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:74)
        at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:142)
        at com.jogamp.opengl.util.Animator$MainLoop.run(Animator.java:175)
        at java.lang.Thread.run(Thread.java:722)
EGLDisplayUtil.EGLDisplays: Shutdown (open: 1)
EGLDisplayUtil: Open EGL Display Connections: 1
EGLDisplayUtil: Open[0]: 0x1: refCnt 1
AL lib: ReleaseALC: 2 devices not closed
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

gouessej
Administrator
By default, JMonkeyEngine uses a texture format not supported by RaspberryPi, Noxo modified TextureUtil to make it work (but I couldn't integrate this hack because I was not sure of the impact in desktop environment).
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

krishnak
Ok, I will check noxo's code base
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

krishnak
In reply to this post by gouessej
I have re build JmonkeyEngine with Noxo's TextureUtil.java - I still get the same error when I run it on Pi
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

gouessej
Administrator
Please try to run another demo or use other textures. I have no Raspberry Pi, I can't help.

Xerxes, you already told me that JMonkeyEngine 3 uses texture formats not supported by the Raspberry Pi by default, didn't you?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

Xerxes RÃ¥nby
gouessej wrote
Please try to run another demo or use other textures. I have no Raspberry Pi, I can't help.

Xerxes, you already told me that JMonkeyEngine 3 uses texture formats not supported by the Raspberry Pi by default, didn't you?
Yes, if you write your own code and prepare your textures for use with jME3 then avoid using textures with formats that are problematic and it will be OK.
Unfortunately most of the example textures found in the jME3 examples are using  non Raspberry Pi compatible formats.

There several ways to fix this,
A) inform broadcom and they can add support in the raspberry pi videocore GPU firmware to support these texture formats, sending broadcom minimal unittests that tries to use a problematic texture will do,
B) add more compatiblity code into jME3 that converts unsupported textures to supported formats
C) avoid using problematic textures
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

krishnak
Ok will do :)
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

gouessej
Administrator
Can you tell me which formats are supported on the Raspberry Pi?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

Xerxes RÃ¥nby
gouessej wrote
Can you tell me which formats are supported on the Raspberry Pi?
Raspberry Pi:
Image format 'BGR8' is unsupported by the video hardware.

AC100 (Tegra2):
The AC100 only supports N-POT textures, where width==height.

Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

dardzull@yahoo.com
The only image sizes I have been able to get to work are binary based: 8x8, 16x16, 32x32, 64x64, etc. up to 2048x2048 so far.

Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

krishnak
In reply to this post by Xerxes RÃ¥nby
I changed my texture images to PNG.

When I run the code on the pi - I get the following console message - there are no exceptions. After about 1 minute or so a black window appears with the JMonkey cursor in the middle. This screen remains black apart from the cursor and the frame rate/vertex/triangle informations appearing on the bottom left of the screen.

The frame rate stays at 0.

Rest of the details like, Frame Buffer/vertex/triangle etc shows values.

WARNING: Your graphics card does not support non-power-of-2 textures. Some features might not work.  - this probably is the reason.

Could you please confirm.

I have created a texture with 16x16 pixel png - even with that I am getting this warning message on the PI. Could you please advise how should I create the texture to satisfy this.


Feb 23, 2013 1:17:50 PM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.0.0 RC2
BCM.Display initIDs ok
BCM.Screen initIDs ok
BCM.Window initIDs ok
BCM.Screen initNative ok 1920x1080
setPosition n/a in KD
Feb 23, 2013 1:18:09 PM com.jme3.renderer.jogl.JoglRenderer initialize
WARNING: Failed parsing GLSL version assuming it's v1.00
Feb 23, 2013 1:18:09 PM com.jme3.renderer.jogl.JoglRenderer initialize
WARNING: Your graphics card does not support non-power-of-2 textures. Some features might not work.
Feb 23, 2013 1:18:13 PM com.jme3.audio.joal.JoalAudioRenderer initInThread
WARNING: OpenAL EFX not available! Audio effects won't work.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

gouessej
Administrator
In my humble opinion, the size of your textures is ok but the texture format is still unsupported. Maybe you can look for this information before modifying your images, I don't know where the spec is. You would save a lot of time if you knew which texture formats are supported.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

krishnak
Many thanks for your thoughts.

There is a project called Blocky which runs on the PI using LWJGL

the code is here
https://github.com/spsn/blocky/tree/master/ge.demo/res

I just took a texture from there (as they work on the PI but using X) thinking that will work but that also gives me the WARNING and black box.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

gouessej
Administrator
krishnak wrote
Many thanks for your thoughts.

There is a project called Blocky which runs on the PI using
Whatever the Java binding for the OpenGL API you use, if a texture format is not supported in the OpenGL driver, it won't be supported in the binding. Blocky doesn't use only such a binding, it uses Slick Util. I have no Raspberry Pi, Xerxes already said that JMonkeyEngine 3 uses lots of texture formats not supported by the Raspberry Pi whatever the backend you use (based on JOGL or on its competitor). If you really want to use JOGL 2.0 on your Raspberry Pi, maybe use it with LibGDX. If you want to use JMonkeyEngine, you will have to find what makes Slick Util (or LWJGL util) works on your device, it is not a matter of binding.

Edit.: JOGL 2.0 runs on the Raspberry PI, Xerxes showcased it at Siggraph 2012. I just remind you that fact in order to avoid any confusion. The current problem comes from an higher level API above JOGL 2.0.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

gouessej
Administrator
In reply to this post by krishnak
There aren't a lot of informations about the chip used in the RPI, I have only found that. This document is more interesting but there is no information about supported texture formats.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

gouessej
Administrator
In reply to this post by krishnak
BGRA should work. Have you tried Blocky on your own Raspberry Pi? Maybe there is something wrong with your device. Some people complained about almost always getting a black screen with its very early versions and a Basic binding for the OpenGL API.

@noxo You succeeded in running JMonkeyEngine 3.0 with its JOGL backend. Can you tell us which texture formats are really supported on this device?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

krishnak
Blocky works on my board. The reason that you are not finding information about the chip is - Broadcom doesn't sell the chip unless they are happy with your business model. Pi has managed to be an Opensource product which no one else can replicate :) - They only release a partial data sheet.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

gouessej
Administrator
krishnak wrote
Blocky works on my board. The reason that you are not finding information about the chip is - Broadcom doesn't sell the chip unless they are happy with your business model.
I know that but helping you is difficult without the real device, I do my best. I will have to politely ask xranby to give you some help.

krishnak wrote
Pi has managed to be an Opensource product which no one else can replicate :) - They only release a partial data sheet.
Raspberry Pi is based on open source software, its schematics are publicly available but it still uses proprietary hardware (chipset) and software (driver(s)) components. There are already some alternatives to Raspberry Pi and it is possible to use the schematics and adapt them for another chipset.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

krishnak
I appreciate your help that you are providing me on this forum.

I have shifted to try out libGDX. I have installed the libGDX jars.

Where do I find the backend jars for the libgdx?

I downloaded stuff from here

https://github.com/gouessej/libgdx/tree/master/backends/gdx-backend-jogl/libs

but com.badlogic.gdx.backends.jogl.JoglApplication; is not found in those Jars.

Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.0 (OpenGL/OpenGL-ES) backend for LibGDX

gouessej
Administrator
At first, you can use Xerxes's repository instead of mine as he tested his code on a real Raspberry Pi.

Secondly, gdx-backend-jogl/libs contains the dependencies of this backend (GlueGen + JOGL), not the binaries. You have to build LibGDX from source. You can get the whole project by doing that in command line:
git clone https://github.com/xranby/libgdx
You can do something similar with Eclipse + EGIT, go to File -> Import... -> Git -> Import projects from GIT
Then, use the Ant scripts to build LibGDX.
Julien Gouesse | Personal blog | Website
1 ... 3456789 ... 13