Remember me

Lost Password?

Register now!
Who's Online
109 user(s) are online (81 user(s) are browsing Forums)

Members: 1
Guests: 108

Kamelito, more...
Support us!
Recent OS4 Files
Report message:*

GL4ES: another OpenGL over OpenGLES2 emulation - some tech. info and porting progress

Subject: GL4ES: another OpenGL over OpenGLES2 emulation - some tech. info and porting progress
by kas1e on 2018/2/16 13:50:30


As some of you may know, there was another attempt we discuss before which make OpenGL apps to works on OpenGLES, which called called glshim.

I follow that development on the Pyra's/Pandora's forum, where was pretty nice long discussion of 36 pages of how it all develops, what it can or don't , what games they port over it and so on

Seeing from comments on github, you may see that since 2016 development mostly stop, and in 2017 there was only one commit.

Butits all about glshim originally. Then, at some point (in 2015 or something), another author made a fork of it, and start to develop it futher (at begining in parallel with glshim, then probably author of glshim loose interest and only that fork is continue to develop).

Name of fork: gl4es
Its quite active even today.

And to have 2 wrappers (Regal and GL4ES) is better than have only Regal, and i give it a go as well.

Structure of project not that good as Regal's one, and it's depends not only on X11 in few parts , but also on EGL. It also use CMAKE , and not pure makefiles , that is kind of boring always for normal tests to be honest.

So, i jsut check how it all builds on linux, and make pure makefile for os4 which will build necessary objects, only to realize that X11 can be disabled easy (it is already disabled for Android), while EGL is used much. I then write ticket for, in case to ask for some clarification , and aurhos says:


EGL is used at minimum in 3 places (beside the GLES context creation):

1. At init, to create a small pbuffer to get Hardware information support. This part can be skipped with LIBGL_NOTEST=1

2. For eglGetProcAddress to get extension function adresses.

3. for eglSwapBuffers to swap buffers (actually put drawing onscreen).

I then explain him that we at amiga and all that necessary stuff, and , he still in interest to deal with ! Today he made a commit where add inital NOEGL stuff, and what he wrote about:


It should be working for you now.
Some gidelines:

Compile with NOEGL (the NOX11 will be set anyway).
Use with Export LIBGL_ES=2 (or define a DEFAULT_ES=2 at compile time).
You will need to create the GLES context yourself
There is no Hardware checking for capability, so only basic functions will be used
You need to SwapBuffers yourself. To stay on the safe side (because gl4es has many optimisations and may cache/batch drawing calls), it's better to call either glFlush() or glFinish() before the SwapBuffers.

So, all of this even better for checks: As i of course need and want to create GLES context myself, as well as i for myself want to do aglSwapBuffers().

Through, at moment not everything handled as need it with NOEGL, as well as there is other code-compile bugs (strange!), but he seems still to works on , and we can expect something soon !

For those ones who want to play a bit with and see how it all error's for now, there is os4's amigaos4_build.sh:

Stay tuned !

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project