OPENGLES

Previous topic - Next topic

Qedo

Hi everyone, I ask you this question:
Can GLB use OPENGLES 2.0?
Because in the \ Compiler \ platform \ android \ lib folder there is the libGLESv2.so file where the functions of version 2.0 are present
In a thread from several years ago Gernot recommended using the ES1.1 version for compatibility issues only it was running Android 1.6 at the time.
Water has passed under the bridge and it would be useful to be able to use something more recent.
If it were possible to use 2.0, is there a procedure to be performed or is everything transparent?
Thank you
Ciao

dreamerman

I'm not expert at that but from what I know, main difference is that OpenGL ES has fixed pipeline rendering (that GLB is using) and in ES 2.0 everything is programmable by shaders, so even for rendering simple 3d cube you need to use vertex and pixel shader fragment programs, this would either require rewriting part of GLB engine or add some translation layer or default shader code to at least have 2d rendering working (this would be simpler as basic shaders are enough), many 3d GLB functions such as lights/shadows/specialfx would require more work.
The lack of shaders on Android in GLB (due to ES 1.1) may be annoying as they are handy for some effects like realtime 2d mirrors, drawing filters that emulate older devices/consoles, and other - like using one base sprite with colorkeys that are switched to draw units for different players or whatever.
Check my source code editor for GLBasic - link Update: 20.04.2020

Kitty Hello

We would have to rewrite the whole engine foe es2. Alphamode, alphat3sting, settranspar3ncy etc would have to be considerer...

Qedo

it is true I realize the work, but I thought it is not possible to access Opengl ES 2.0 via SDL 2.0?