ptitSeb / gl4es

GL4ES is a OpenGL 2.1/1.5 to GL ES 2.0/1.1 translation library, with support for Pandora, ODroid, OrangePI, CHIP, Raspberry PI, Android, Emscripten and AmigaOS4.
http://ptitseb.github.io/gl4es/
MIT License
694 stars 159 forks source link

amigaos4: MiniGL 4 GL4ES #139

Open kas1e opened 4 years ago

kas1e commented 4 years ago

@ptitSeb I do not know if you are aware, but Daniel made a wrapper that emulates our old MiniGL which works over GL4ES. So those people with amigaos4 machines who can't use real MiniGL can use now "Minigl4GL4ES", which is transfer all the GL calls to GL4ES + add some MiniGL specific functions at top.

What is good there, is that we have about 200-300 MiniGL apps for OS4, which now can just go through GL4ES, and hit all the issues GL4ES may have, without needs to recompile anything over GL4ES.

So far, I test really MANY things, and all of them, most of the time works fine! Some are starting to be faster, some start to be visually-better, some instead start to be slower (like for example Cube1, Gish, some demoscene prods).

So the reason to create that ticket, its to just have everything about there.

An issue with Cube1 you already fixed, but now I find another issue with game called Frogatto: https://github.com/frogatto/frogatto

Its pretty fun arcade, and if you don't port it to Pandora you for sure need to do so :) Issue, is that over original MiniGL when I start a level everything looks like this:

http://kas1e.mikendezign.com/aos4/gl4es/games/frogatto/frogatto_minigl.jpg

And that how it looks for GL4ES:

http://kas1e.mikendezign.com/aos4/gl4es/games/frogatto/frogatto_gl4es.jpg

I not sure if it again AmigaOS4 only issue, or GL4ES one, but probably worthy of note.

ptitSeb commented 4 years ago

hey.

Well, I noticed Daniel had clone gl4es and did some AmigaOS related commit.

Sounds like a nice project!

I know frogatto yes, and there is a GLES 1.1 prot of it on the Pandora for a long time. The rendering is missing stuffs indeed! I'll try to build an OpenGL version of frogatto to see what is happening.

Daytona675x commented 4 years ago

@ptitSeb hi mate, I messed around quite a lot in the code ... Unfortunately I'm not really familiar with git and github yet (almost always used svn so far or git in a very basic way), so I have no idea how to best a) integrate your changes into my fork b) how to propose my changes to you without annoying you too much ;) Is there any way how I can actively pull-over your fixes / you can pull-over whatever you like on your own?

ptitSeb commented 4 years ago

Hi @Daytona675x ! How are you since last Gamescom :)

So, git and github, well, unfortunatly, I'm also not that familliar with all this, and always end up on stackoverflow for some base maintenance routine, that I always forgot each time I need them.

(like this https://stackoverflow.com/questions/7244321/how-do-i-update-a-github-forked-repository to update a forked repo).

Now, to get your changes, I know only of the Pull Request. I usualy do it from github GUI dirrectly. I'm sure there are other solution, and thta it's better to do it from a specific branch (but I rarely does that myself).

ptitSeb commented 4 years ago

@Daytona675x @kas1e : with commit 7e602ea I have splitted lookup stuff (the heart of aglGetProcAddress(...)). As you can see, now there is a specific lookup.c in agl folder. I haven't tested (I cannot in fact), so I hope I didn't broke anything. For now, there are still some dependancies with glx.c but hopefully they can be removed soon.

kas1e commented 4 years ago

@ptitSeb Tried to build latest sources for os4 :

[  3%] Building C object src/CMakeFiles/GL.dir/gl/gl_lookup.c.obj
/amiga/ooo/src/gl/gl_lookup.c:16:10: fatal error: hardext.h: No such file or directory
 #include "hardext.h"
          ^~~~~~~~~~~

Changed in gl_lookup.c include of hardtext to ../glx/hardext.h , fail with other error:

[  3%] Building C object src/CMakeFiles/GL.dir/gl/gl_lookup.c.obj
/amiga/ooo/src/gl/gl_lookup.c: In function ‘gl4es_GetProcAddress’:
/amiga/ooo/src/gl/gl_lookup.c:24:14: fatal error: glesfuncs.inc: No such file or directory
     #include "glesfuncs.inc"
              ^~~~~~~~~~~~~~~
ptitSeb commented 4 years ago

Ok, both issues should be fixed now (thanks for testing :) )

kas1e commented 4 years ago

Seems not :)

Tried fresh test:

[ 28%] Building C object src/CMakeFiles/GL.dir/gl/framebuffers.c.obj
[ 30%] Building C object src/CMakeFiles/GL.dir/gl/gl_lookup.c.obj
/amiga/ooo/src/gl/gl_lookup.c:16:10: fatal error: hardext.h: No such file or directory
 #include "hardext.h"
          ^~~~~~~~~~~
compilation terminated.

Error come not from agl/gl_lookup.c , but from gl/gl_lookup.c (GL directory, not AGL)

ptitSeb commented 4 years ago

:( New try, it should work now.

kas1e commented 4 years ago

That one passed for sure, there is new ones:

[ 45%] Building C object src/CMakeFiles/GL.dir/agl/amigaos.c.obj
[ 46%] Building C object src/CMakeFiles/GL.dir/agl/agl.c.obj
In file included from /amiga/ooo/src/gl/wrap/gles.h:1,
                 from /amiga/ooo/src/gl/gl4es.h:10,
                 from /amiga/ooo/src/glx/glx.h:16,
                 from /amiga/ooo/src/agl/lookup.c:8:
/amiga/ooo/src/gl/gles.h:24:26: error: conflicting types for ‘GLintptr’
 typedef khronos_intptr_t GLintptr;
                          ^~~~~~~~
In file included from /amiga/ooo/src/agl/agl.h:21,
                 from /amiga/ooo/src/agl/lookup.c:7:
/usr/local/amiga/ppc-amigaos/SDK/include/include_h/ogles2/ogles2_defs.h:38:13: note: previous declaration of ‘GLintptr’ was here
 typedef int GLintptr;
             ^~~~~~~~
In file included from /amiga/ooo/src/gl/wrap/gles.h:1,
                 from /amiga/ooo/src/gl/gl4es.h:10,
                 from /amiga/ooo/src/glx/glx.h:16,
                 from /amiga/ooo/src/agl/lookup.c:8:
/amiga/ooo/src/gl/gles.h:25:26: error: conflicting types for ‘GLsizeiptr’
 typedef khronos_ssize_t  GLsizeiptr;
                          ^~~~~~~~~~
In file included from /amiga/ooo/src/agl/agl.h:21,
                 from /amiga/ooo/src/agl/lookup.c:7:
/usr/local/amiga/ppc-amigaos/SDK/include/include_h/ogles2/ogles2_defs.h:37:13: note: previous declaration of ‘GLsizeiptr’ was here
 typedef int GLsizeiptr;
             ^~~~~~~~~~
In file included from /amiga/ooo/src/gl/eval.h:4,
                 from /amiga/ooo/src/gl/state.h:6,
                 from /amiga/ooo/src/gl/stack.h:5,
                 from /amiga/ooo/src/gl/glstate.h:9,
                 from /amiga/ooo/src/gl/gl4es.h:12,
                 from /amiga/ooo/src/glx/glx.h:16,
                 from /amiga/ooo/src/agl/lookup.c:8:
/amiga/ooo/src/gl/const.h:5: warning: "GL_QUAD_STRIP" redefined
 #define GL_QUAD_STRIP 8

In file included from /amiga/ooo/src/agl/agl.h:21,
                 from /amiga/ooo/src/agl/lookup.c:7:
/usr/local/amiga/ppc-amigaos/SDK/include/include_h/ogles2/ogles2_defs.h:416: note: this is the location of the previous definition
 #define GL_QUAD_STRIP            0x0008

make[2]: *** [src/CMakeFiles/GL.dir/build.make:872: src/CMakeFiles/GL.dir/agl/lookup.c.obj] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:91: src/CMakeFiles/GL.dir/all] Error 2
make: *** [Makefile:95: all] Error 2
ptitSeb commented 4 years ago

:( And I pushed another fix.

kas1e commented 4 years ago

Now all compiles !:) Didn't check how it works at the moment, but the library surely compiles.

ptitSeb commented 4 years ago

Ok good.

I don't expect too much changes on Amiga. But now, maximum number of Texture unit supported is 16 (instead of 8). So some card may get more TMU (if you have program that want to use more than 8 textures at the same times).

Also, now, GL_EXT_draw_buffers is supported (well, not much tested to be honest), but not sure you have that on OGLES2 driver.

Daytona675x commented 4 years ago

There's an "illegal" include in agl.h (ogles2/ogles2_defs.h) which can cause conflicts. This one is not meant to be included directly! I'm going to fork and fix, then you kas1e please check if it works for your build setup too, then ptitSeb can pull.

No, as of now we dont support GL_EXT_draw_buffers.

Am 23.02.2020 um 10:22 schrieb ptitSeb:

Ok good.

I don't expect too much changes on Amiga. But now, maximum number of Texture unit supported is 16 (instead of 8). So some card may get more TMU (if you have program that want to use more than 8 textures at the same times).

Also, now, GL_EXT_draw_buffers is supported (well, not much tested to be honest), but not sure you have that on OGLES2 driver.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ptitSeb/gl4es/issues/139?email_source=notifications&email_token=AG4TITU3LD3TZFUHARVM7GDREI54XA5CNFSM4KCXMXSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMVW3HQ#issuecomment-590048670, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG4TITRPBERQXFVGZ7H2N7TREI54XANCNFSM4KCXMXSA.

-- < GoldenCode > Daniel A. Müßener Am Langen Weiher 11 D-50170 Kerpen / Buir Tel.: +49-2275-2039567 Mail: d.muessener@goldencode.de Web: http://www.goldencode.de

kas1e commented 4 years ago

@Daytona675x Yeah, forked version builds too. Didn't tested if it works or not, but library builds for sure.