Login  Register

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

Posted by Xerxes Rånby on Jun 11, 2015; 9:38pm
URL: https://forum.jogamp.org/JOGL-2-0-OpenGL-OpenGL-ES-backend-for-LibGDX-tp4027689p4034675.html

Peter wrote
Dear Xerxes,

Thank you for tip with cherry-pick.

First i do that:

git remote add xranby https://github.com/xranby/libgdx

git fetch xranby
git cherry-pick aafb0c1fbe9d377a530129a838124d7de2a0f166

at my local copy of repository: https://github.com/gouessej/libgdx

after that i go to that repo and execute this command:

mvn install

after that i load my libgdx project to eclipse, refresh all gradle dependencies and try to build, but i have still these errors:

Exception in thread "main-AWTAnimator#00" com.jogamp.opengl.util.AnimatorBase$UncaughtAnimatorException: com.jogamp.opengl.GLException: Caught IllegalArgumentException: Error compiling shader: ERROR: 0:1: '' :  #version required and missing.
...

what is wrong with my workflow?

You sad that your patch will fix these problems :/

Greetings,

Peter
Remember to update the dependency of your project to match the latest libgdx version that you have compiled.

in your project edit the build.gradle
and if you are using gouessej's latest libgdx verison then you should use
gdxVersion = '1.6.3-SNAPSHOT'

i think i have given errornous instructions before in this thread to set an explicit version of the gdx-backend-jogamp, best is ofcourse to use the same version of libgdx and the gdx-backend-jogamp !

thus in your projects build.gradle you should use this dependencies section

project(":desktop") {
    apply plugin: "java"


    dependencies {
        compile project(":core")
        compile "com.badlogicgames.gdx:gdx-backend-jogamp:$gdxVersion"
        compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
    }
}

I think i also found the root cause why this correct dependencies section did not work before and the answer is that the gdx-backend-jogamp pom compiled against the wrong libgdx version!
https://github.com/xranby/libgdx/commit/376290b8b198fef12ee4e4bdb55878a92105a34a

In your case this may explain why your changes to the libgdx shaders did not fix anything because you worked on 1.6.3-SNAPSHOT while the jogamp backend errornously pulled in some old snapshot.

try this new cherry pick and tell if it fixes your issues.
git fetch xranby
git cherry-pick 376290b8b198fef12ee4e4bdb55878a92105a34a