Login  Register

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

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

gouessej wrote
You should modify this method:
https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/graphics/g2d/SpriteBatch.java#L127

Edit.: We should use #ifdef GL_ES_VERSION_3_0 or GL_ES_VERSION_2_0 to use the correct modifiers.

Edit.: We should use #version 100 with OpenGL ES 2.0, #version 110 with OpenGL 2.0, #version 120 with OpenGL 2.1 and so on:
https://en.wikipedia.org/wiki/OpenGL_Shading_Language#Versions
Last time i looked at this i deemed the task to make all libgdx shaders compatible with all GLProfiles a too large problem to tackle for the initial JogAmp JOGL port.

We can never patch all games using the libgdx GL20 api to stay shader compatible.
Some parts of the libgdx API still require automatic memory management only found using GL2 and GLES 2 thus the port will not be complete if we request a core profile for GL20.

Hence i would advise that we only request core profiles that require new shaders if the user has requested useGL30.