Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
11 crawler(s) on-line.
 72 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 Hammer:  11 mins ago
 MEGA_RJ_MICAL:  1 hr 17 mins ago
 minator:  1 hr 18 mins ago
 Cammy:  1 hr 24 mins ago
 OneTimer1:  1 hr 26 mins ago
 MagicSN:  1 hr 33 mins ago
 Everblue:  2 hrs 10 mins ago
 bhabbott:  2 hrs 52 mins ago
 agami:  2 hrs 55 mins ago
 Mobileconnect:  3 hrs 9 mins ago

software OS4   software OS4 : GL4ES SDK Released
   posted by kas1e on 11-Sep-2019 18:21:31 (4616 reads)
GL4ES SDK for AmigaOS4

=== What is GL4ES

GL4ES is an OpenGL 2.1/1.5 to GL ES 2.0/1.1 translation library, with support for Pandora, ODroid, OrangePI, CHIP, Raspberry PI, Android and AmigaOS4.



For AmigaOS4 translation done via ogles2.library (written by Daniel "Daytona" Mubener), and which in turn works on top of warp3dnova.library (written by Hans de Ruiter).







click "read more" for more info


Minimum requirements for ogles2.library are 2.8 and for warp3dnova.library it should be 1.65

With GL4ES we have not only OpenGL1.x as with MiniGL, but OpenGL 1.x, OpenGL2.x and even some limited OpenGL3.x support.

Also it is faster than MiniGL and bug-less.

Written by Sebastian "ptitSeb" Chevalier. AmigaOS4 version handled by kas1e, but all actual AmigaOS4 related code still done by ptitSeb.

Actual code: https://github.com/ptitSeb/gl4es

Main site: http://ptitseb.github.io/gl4es/

Currently on os4depot in upload query.

=== What is GL4ES SDK for AmigaOS4

GL4ES SDK for AmigaOS4 come not only with gl4es link library, but also with set of other link libraries which help to use it more widely, such as SDL1, SDL2 and GLU.

Currently in the first release of SDK it contains those libraries:

libgl4es.a : gl4es (r1.974, Sep 7, 2019) : https://github.com/ptitSeb/gl4es
libgGLU_gl4es : GLU (9.0.0, Apr 15, 2018) : https://github.com/ptitSeb/GLU
libSDL_gl4es.a : SDL1 (1.2.15, Sep 1, 2019) : https://github.com/AmigaPorts/SDL/tree/SDL-1.2
libSDL2_gl4es.a : SDL2 (2.0.8, Apr 9, 2019) : https://github.com/AmigaPorts/SDL/tree/master

While actual AmigaOS4 changes are in gl4es & glu repos, SDL1/2 changes related to handling of GL4ES still not on github, as at the moment it's still unclear how to handle that all better:
- or to put them to original repos and made a way to choose with what support to compile (MiniGL or GL4ES).
- or to just make separate branches, where remove MiniGL and keep only GL4ES, so that there is no chaos in the repositories.
- or to find some other clean-to-handle way.
In other words at the moment in terms of SDL only ready to use static link libs, without actual code changes (in which probably no one interested if everything works)



=== How to install

1. Be sure that you have installed original SDL1, SDL2 and OpenGLES2 SDK
SDL1: http://os4depot.net/share/library/misc/sdl.lha
SDL2: http://os4depot.net/share/library/misc/sdl2.lha
OGLES2 SDK : that one can be taken together with ogles2.library itself from Enhancer pack.

2. Put gl4es_sdk's libraries to SDK/local/newlib/lib/

3. Put gl4es_sdk's GL includes to the place where you have old MiniGL ones (don't forget to save them, to something like GL_save_minigl).
It can be in SDK/local/common/include/GL or in SDK/local/newlib/include/GL. Just be sure nowhere else old MiniGL includes will be taken.

4. For SDL1, in SDK/local/newlib/include/SDL/SDL_opengl.h comment out include of (so to avoid name conflicts and co).
For SDL2 no such include used, so no conflicts there.

One may ask, why remove MiniGL includes, and why not put GL4ES includes to some directory like GL4ES instead of GL (so to not touch MiniGL ones) : yes, you can do that. Just when you will later work with GL4ES,
then everywhere and every time you will be in needs to change include of opengl includes from GL to GL4ES directory. And when sometime in your sources you will forget or miss to do so, then you will have name conflicts and clashes.
But you can choose the way you want, of course. I just find it easier to have it in GL.



=== How to use:

If you want to use pure AmigaOS API + GL (without SDL) , you need to use ogles2 context instead of minigl one. You shouldn't use directly any agl* functions from ogles2.library, but instead
their alternatives from gl4es: they have the same name, just before calling original agl* ogles2 function, in wrapper ones done some internal for gl4es things. For developer it is a matter of only
adding necessary defines. I rewrote few random minigl examples from minigl distributive to make them works over gl4es and put them to Examples/from_minigl, so you can see how to work with pure AmigaOS4 API + GL4ES.

If you want to use SDL1/2, then there nothing need to be changed, only compiling lines changes from -lSDL -lGL -lGLU , to -lSDL_gl4es -lglu_gl4es -lgl4es , or to -lSDL2_gl4es if SDL2 in use.

Examples directory also comes with some SDL1 examples (just a few randomly taken nehe's tutorials, with amigaos4 makefile), as well as with with some random SDL2 examples which I take from the google, adapt a bit, and made a makefiles for.

Remember, that GL4ES can be also controlled via environments a lot (that, of course, includes AmigaOS4 version too, where you just control envs via "setenv LIBGL_xxx xx"). Full list of environments and their description can be found in Documentation/GL4ES/USAGE.md



=== How be up to date:

I hope to update SDK from time to time with newer version of gl4es, SDL1 and SDL2 libraries, but you always can go to https://github.com/ptitSeb/gl4es , and build up2date version yourself.
For myself, I do it all on crosscompiler (cygwin) and to build it I just do:

cd gl4es-master
mkdir build
cd build

cmake \
-DCMAKE_SYSTEM_NAME=Generic \
-DAMIGAOS4=1 \
-DSTATICLIB=ON \
-DCMAKE_SYSTEM_VERSION=1 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER="/usr/local/amiga/bin/ppc-amigaos-gcc" \
-DCMAKE_CXX_COMPILER="/usr/local/amiga/bin/ppc-amigaos-g++" \
-DCMAKE_LINKER="/usr/local/amiga/bin/ppc-amigaos-ld" \
-DCMAKE_AR="/usr/local/amiga/bin/ppc-amigaos-ar" \
-DCMAKE_RANLIB="/usr/local/amiga/bin/ppc-amigaos-ranlib" \
-DCMAKE_FIND_ROOT_PATH="/usr/local/amiga/ppc-amigaos/" \
..

make -j4

And in build/lib directory you have libGL.a, which you just rename after to libgl4es.a



=== Thanks to:

to ptitSeb for gl4es and all his help with everything : https://github.com/ptitSeb/gl4es/
to Daniel for OpenGL ES2 and all his help with everything : http://www.goldencode.de/
to Hans for Warp3DNova and all his help with everything : https://keasigmadelta.com/
to Capehill for actual SDL1 and SDL2 ports and all his help with everything: https://github.com/AmigaPorts/SDL
to others for help and tests

(c) kas1e, 10 sep 2019
    

STORYID: 8423
Related Links
· More about software OS4
· News by kas1e


Most read story about software OS4
Homebank 4.4 for AmiCygnix released

Last news about software OS4
Get 20-40% Off ZitaFTP Server (Limited Time Offer)
Printer Friendly Page  Send this Story to a Friend

PosterThread
BigD 
Re: GL4ES SDK Released
Posted on 12-Sep-2019 23:05:39
#1 ]
Elite Member
Joined: 11-Aug-2005
Posts: 7445
From: UK

Wow Impressive!

Does that mean OS4 has caught up with the OpenGL support on macOS (stuck on version 2 forever)?


_________________
"Art challenges technology. Technology inspires the art."
John Lasseter, Co-Founder of Pixar Animation Studios

 Status: Offline
Profile     Report this post  
Murasame 
Re: GL4ES SDK Released
Posted on 13-Sep-2019 6:44:04
#2 ]
Member
Joined: 1-Jun-2004
Posts: 42
From: Italy, Reggio Emilia

@BigD

Ehm macOS is stuck forever at OpenGL version 4.1 then they started to promote and use their proprietary next gen Metal API similar to Vulkan/DirectX 12.

 Status: Offline
Profile     Report this post  
BigD 
Re: GL4ES SDK Released
Posted on 13-Sep-2019 8:02:52
#3 ]
Elite Member
Joined: 11-Aug-2005
Posts: 7445
From: UK

Ok, we have a bit of a way to go then. Metal is proving usekess in enticing the big developers to furthet support the Mac and Starcraft 2 only uses OpenGL 2.1 on my machine unless I upgrade to at least macOS Sierra!

The Amiga NG could easily catch them up now though having enough users to be a viable games platform will always be an issue! 😪


_________________
"Art challenges technology. Technology inspires the art."
John Lasseter, Co-Founder of Pixar Animation Studios

 Status: Offline
Profile     Report this post  
BigD 
Re: GL4ES SDK Released
Posted on 13-Sep-2019 8:03:53
#4 ]
Elite Member
Joined: 11-Aug-2005
Posts: 7445
From: UK

Ok, we have a bit of a way to go then. Metal is proving useless in enticing the big developers to further support the Mac and Starcraft 2 only uses OpenGL 2.1 on my machine unless I upgrade to at least macOS Sierra!

The Amiga NG could easily catch them up now, though having enough users to be a viable games platform will always be an issue! 😪


_________________
"Art challenges technology. Technology inspires the art."
John Lasseter, Co-Founder of Pixar Animation Studios

 Status: Offline
Profile     Report this post  
BigD 
Re: GL4ES SDK Released
Posted on 13-Sep-2019 8:05:05
#5 ]
Elite Member
Joined: 11-Aug-2005
Posts: 7445
From: UK

Double post sorry. Was trying to correct typos!


_________________
"Art challenges technology. Technology inspires the art."
John Lasseter, Co-Founder of Pixar Animation Studios

 Status: Offline
Profile     Report this post  
Fransexy 
Re: GL4ES SDK Released
Posted on 13-Sep-2019 8:43:22
#6 ]
Elite Member
Joined: 8-Jun-2004
Posts: 2334
From: Elche (Alicante), spain

Why cannot be implemented Ogl2 directly on top of warp3dnova?


_________________
No PowerPC, No Fun
Make Amiga Great Again

 Status: Offline
Profile     Report this post  
kas1e 
Re: GL4ES SDK Released
Posted on 13-Sep-2019 11:30:03
#7 ]
Elite Member
Joined: 11-Jan-2004
Posts: 3551
From: Russia

@Fransexy

It can of course, same as opengl3, 4 or anything else. Its even can be possible to "just" port mesa and be done with it, but no one do it.

Reasson why we have ogles2.library, its because its much easier to implement. There no fixedpipeline, etc. No need to write lot of boring and hard code.

So while there wasnt any developer willing to made proper opengl over nova, Daniel at least agree to made ogles2.library.

But yeah, if it was full opengl, there wasnt needs for such wrappers


_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites

 Status: Offline
Profile     Report this post  
amigang 
Re: GL4ES SDK Released
Posted on 14-Sep-2019 11:18:57
#8 ]
Elite Member
Joined: 12-Jan-2005
Posts: 2087
From: Cheshire, England

Great work all invovled!


_________________
AmigaNG, YouTube, LeaveReality Studio

 Status: Offline
Profile     Report this post  
klx300r 
Re: GL4ES SDK Released
Posted on 20-Sep-2019 15:34:40
#9 ]
Elite Member
Joined: 4-Mar-2008
Posts: 3846
From: Toronto, Canada

better & better thanks to Hans, Daniel and all others involved !


_________________
____________________________
c64-2sids, A1000, A1200T-060@50(finally working!),A4000-CSMKIII
! My Master Miggies- Amiga 1000 & AmigaOne X1000 !
mancave-ramblings
X1000 I BELIEVE

 Status: Offline
Profile     Report this post  
Jupp3 
Re: GL4ES SDK Released
Posted on 29-Sep-2019 20:30:00
#10 ]
Super Member
Joined: 22-Feb-2007
Posts: 1225
From: Unknown

Quote:
Metal is proving useless in enticing the big developers to further support the Mac and Starcraft 2 only uses OpenGL 2.1 on my machine unless I upgrade to at least macOS Sierra!


While Apple has definitely been promoting Metal, and going as far as deprecating OpenGL, there's a question, whether they will actually ever remove it. At least it's clear, that no support for newer versions (well, GL side hasn't been updated in ages anyway)

NOTE: At least I cannot see any "technical" reason to remove OpenGL; currently, Metal and OpenGL work nicely - so can't see why it couldn't work the same way in the future. I'd say the entire thing is 100% political.

Many Apple apologists falsely claim, that "everyone is using engines like Unity anyway", and that's true - it won't affect anyone using "big enough" engine. In worst case, big companies have enough manpower to add Metal backend to their own code.

So, in short, it will only affect small developers, that don't use any bigger mainstream 3D engines.

Oh, if you think this is only a minor thing, also rememer iOS.

As for the thread topic, even if it's mostly relevant to developers (and they likely already know it), OpenGL ES stands for "Embedded Systems", and is a version of OpenGL with a LOT of functionality removed (Mostly "worse ways to do more or less same thing", like immediate mode, display lists...) with aim being to keep the API as small as possible, but functional.

OpenGL ES1 has fixed function pipeline, but no shaders.
OpenGL ES2 has only shaders, no fixed function pipeline at all.

When it comes to drawing stuff on screen, there's very little in common between the two. AFAIK, only draw functionality that's 100% same with both, is screen clearing.

OpenGL ES1 is made for more "simple" hardware, and OpenGL ES2 has WAY more control on how you actually draw stuff. The downside is, it's also more complicated, especially for inexperienced users. It also needs "newer" hardware (note: this "newer" was over decade ago)

As for "desktop games", they usually use either fixed function or shaders, rarely both (but that's possible). So (as a developer) based on a game, you pick which one to use accordingly.

While OpenGL ES1 might sound "outdated" -and it is-, but there's definitely need for it, since there's LOTS of old OpenGL code only using fixed function pipeline, and porting them to use shader instead (GLES2) would need major code modifications.

(Of course these are not the only OpenGL solutions around)

 Status: Offline
Profile     Report this post  
Jupp3 
Re: GL4ES SDK Released
Posted on 29-Sep-2019 20:30:38
#11 ]
Super Member
Joined: 22-Feb-2007
Posts: 1225
From: Unknown

Quote:
Metal is proving useless in enticing the big developers to further support the Mac and Starcraft 2 only uses OpenGL 2.1 on my machine unless I upgrade to at least macOS Sierra!


While Apple has definitely been promoting Metal, and going as far as deprecating OpenGL, there's a question, whether they will actually ever remove it. At least it's clear, that no support for newer versions (well, GL side hasn't been updated in ages anyway)

NOTE: At least I cannot see any "technical" reason to remove OpenGL; currently, Metal and OpenGL work nicely side by side - so can't see why it couldn't work the same way in the future. I'd say the entire thing is 100% political.

Many Apple apologists falsely claim, that "everyone is using engines like Unity anyway", and that's true - it won't affect anyone using "big enough" engine. In worst case, big companies have enough manpower to add Metal backend to their own code.

So, in short, it will only affect small developers, that don't use any bigger mainstream 3D engines.

Oh, if you think this is only a minor thing, also rememer iOS.

As for the thread topic, even if it's mostly relevant to developers (and they likely already know it), OpenGL ES stands for "Embedded Systems", and is a version of OpenGL with a LOT of functionality removed (Mostly "worse ways to do more or less same thing", like immediate mode, display lists...) with aim being to keep the API as small as possible, but functional.

OpenGL ES1 has fixed function pipeline, but no shaders.
OpenGL ES2 has only shaders, no fixed function pipeline at all.

When it comes to drawing stuff on screen, there's very little in common between the two. AFAIK, only draw functionality that's 100% same with both, is screen clearing.

OpenGL ES1 is made for more "simple" hardware, and OpenGL ES2 has WAY more control on how you actually draw stuff. The downside is, it's also more complicated, especially for inexperienced users. It also needs "newer" hardware (note: this "newer" was over decade ago)

As for "desktop games", they usually use either fixed function or shaders, rarely both (but that's possible). So (as a developer) based on a game, you pick which one to use accordingly.

While OpenGL ES1 might sound "outdated" -and it is-, but there's definitely need for it, since there's LOTS of old OpenGL code only using fixed function pipeline, and porting them to use shader instead (GLES2) would need major code modifications.

(Of course these are not the only OpenGL solutions around)

 Status: Offline
Profile     Report this post  
kas1e 
Re: GL4ES SDK Released
Posted on 30-Sep-2019 6:43:52
#12 ]
Elite Member
Joined: 11-Jan-2004
Posts: 3551
From: Russia

@Jupp3
Quote:

since there's LOTS of old OpenGL code only using fixed function pipeline, and porting them to use shader instead (GLES2) would need major code modifications.


And that why we have that GL4ES : you don't need to do any major code modification. You just port a game which use opengl 1.x , 2.x and even a bit of 3.x over GL4ES like you do it for pure OpenGL. You do no code modification in the game, everything do for you GL4ES which made all necessary shaders and stuff, so to use ogles2.library with all this complication things. And that SDK is what is for : you only change linking flags and includes to make it all be the same simple as if it was real opengl 1.x/2.x/3.x


_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites

 Status: Offline
Profile     Report this post  
kas1e 
Re: GL4ES SDK Released
Posted on 30-Sep-2019 6:45:20
#13 ]
Elite Member
Joined: 11-Jan-2004
Posts: 3551
From: Russia

Ah, and forget to note, that there is of course plan by GL4ES author to make full OpenGL 3.X support by usage the same OpenGLES2. So theoretically if all will go well, we will have full OpenGL3.x support too, which is kind of close to realms.


_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites

 Status: Offline
Profile     Report this post  
[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle