Author Topic: OPENGLES  (Read 333 times)

Offline Qedo

  • Dr. Type
  • ****
  • Posts: 376
  • to program what I have do how should programming?
    • View Profile
OPENGLES
« on: 2022-Aug-19 »
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

Offline dreamerman

  • Global Moderator
  • Dr. Type
  • *******
  • Posts: 454
    • View Profile
    • my personal website
Re: OPENGLES
« Reply #1 on: 2022-Aug-20 »
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

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10839
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: OPENGLES
« Reply #2 on: 2022-Sep-05 »
We would have to rewrite the whole engine foe es2. Alphamode, alphat3sting, settranspar3ncy etc would have to be considerer...

Offline Qedo

  • Dr. Type
  • ****
  • Posts: 376
  • to program what I have do how should programming?
    • View Profile
Re: OPENGLES
« Reply #3 on: 2022-Sep-05 »
it is true I realize the work, but I thought it is not possible to access Opengl ES 2.0 via SDL 2.0?