OS4 DepotLogo by Alkaron 
(anonymous IP: 3.239.58.199,1777) 
 HomeRecentStatsSearchSubmitUploadsMirrorsContactInfoDisclaimerConfigAdmin
 Menu

 Features
   Crashlogs
   Bug tracker
   Locale browser
 

 Categories

   o Audio (333)
   o Datatype (50)
   o Demo (195)
   o Development (566)
   o Document (21)
   o Driver (96)
   o Emulation (143)
   o Game (934)
   o Graphics (485)
   o Library (105)
   o Network (221)
   o Office (60)
   o Utility (868)
   o Video (65)

Total files: 4142

Full index file
Recent index file

 Links

  Amigans.net
  OpenAmiga
  Aminet
  IntuitionBase


Support the site


 Readme for:  Development » Library » Graphics » gl4es_sdk.lha

gl4es_sdk

Description: GL4ES SDK
Download: gl4es_sdk.lha       (TIPS: Use the right click menu if your browser takes you back here all the time)
Size: 2Mb
Version: 1.2
Date: 19 Apr 2021
Author: ptitseb, SDK by kas1e
Submitter: kas1e
Email: kas1e/yandex ru
Homepage: https://github.com/kas1e/GL4ES-SDK/releases
Requirements: ogles2.library >=3.1 (+SDK), warp3dnova =>1.83, RadeonHD =>3.7 or RadeonRX >=2.4
Category: development/library/graphics
Replaces: development/library/graphics/gl4es_sdk.lha
License: Other
Distribute: yes
Min OS Version: 4.1
FileID: 11665
 
Snapshots:
 
Comments: 3
Snapshots: 1
Videos: 0
Downloads: 52  (Current version)
227  (Accumulated)
Votes: 6 (0/0)  (30 days/7 days)

Show comments Show snapshots Show videos Show content Show crashlogs Replace file 
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"
Muessener), and which in turn works on top of warp3dnova.library (written by
Hans de Ruiter).

Minimum requirements for ogles2.library are 3.1 and for warp3dnova.library it
should be 1.83

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/


=== What is GL4ES SDK for AmigaOS4

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

As of now, SDK v1.2 contains those libraries:

libgl4es.a      : gl4es (r2484, Apr 15, 2021) : https://github.com/ptitSeb/gl4es

libGLU_gl4es.a  : GLU  (9.0.0,  Apr 15, 2018) : https://github.com/ptitSeb/GLU
libSDL_gl4es.a  : SDL1  (1.2.16, Jan 3, 2021) :
https://github.com/AmigaPorts/SDL/tree/SDL-1.2
libSDL2_gl4es.a : SDL2 (2.0.14, Apr 10, 2021) :
https://github.com/AmigaPorts/SDL/tree/master

There is a GitHub repository for GL4ES SDK for AmigaOS4, where you can find
current and all older version of SDK: 

https://github.com/kas1e/GL4ES-SDK/releases/

As well as there are repositories of SDL1/SDL2 by Capehill with GL4ES changes at
top of it:

https://github.com/kas1e/SDL1_GL4ES
https://github.com/kas1e/SDL2_GL4ES


=== 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
the 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
<mgl/gl.h> (so to avoid name conflicts and co).
   For SDL2 no such include used, so no conflicts there.

One may ask, why to 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 need 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 an
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 a developer, it is a matter of only
adding necessary defines. I rewrote few random MiniGL examples from MiniGL
distributive to make them work 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 that 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 some random SDL2
examples which I take from the google, adapt a bit, and made makefiles for.

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


=== How be up to date:

I hope to update SDK from time to time with a 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 cross-compiler (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, 17 April 2021 

Copyright © 2004-2021 by Björn Hagström All Rights Reserved