OS4 DepotLogo by Nickman 
(anonymous IP: 3.231.229.89,1391) 
 HomeRecentStatsSearchSubmitUploadsMirrorsContactInfoDisclaimerConfigAdmin
 Menu

 Features
   Crashlogs
   Bug tracker
   Locale browser
 

 Categories

   o Audio (330)
   o Datatype (47)
   o Demo (186)
   o Development (541)
   o Document (21)
   o Driver (87)
   o Emulation (142)
   o Game (874)
   o Graphics (469)
   o Library (102)
   o Network (207)
   o Office (56)
   o Utility (827)
   o Video (62)

Total files: 3951

Full index file
Recent index file

 Links

  Amigans.net
  OpenAmiga
  Aminet
  IntuitionBase


Support the site


 Readme for:  Development » Example » erik_sdl2-ogles2.lha

erik_sdl2-ogles2

Description: basic code examples for OpenGL ES 2 + SDL2 , C++
Download: erik_sdl2-ogles2.lha       (TIPS: Use the right click menu if your browser takes you back here all the time)
Size: 3Mb
Version: 1.0
Date: 04 Aug 2019
Author: erik-larsen, amigaos4 port by kas1e
Submitter: kas1e
Email: kas1e/yandex ru
Homepage: https://github.com/erik-larsen/emscripten-sdl2-ogles2
Requirements: ogles2.library , warp3dnova, radeonhd
Category: development/example
License: Other
Distribute: yes
Min OS Version: 4.1
FileID: 10979
 
Comments: 0
Snapshots: 0
Videos: 0
Downloads: 52  (Current version)
52  (Accumulated)
Votes: 4 (0/0)  (30 days/7 days)

Show comments Show snapshots Show videos Show content Show crashlogs Replace file 
**** What is it ?

It is collection of code samples demonstrates the basics of OpenGL ES 2 usage
with SDL2. C++.

Originally writen by erik-larsen for Emscripten and changed/fixed by me to make
it works on AmigaOS4 and Win32/MSYS2/Angle.

Original source code can be found at:
https://github.com/erik-larsen/emscripten-sdl2-ogles2

AmigaOS4 & Win32 source code coming in that archive.

example1: Hello Triangle

Demonstrates a colorful triangle using shaders, with support for mouse and touch
input:
 * Pan using left mouse or finger drag.
 * Zoom using mouse wheel or pinch gesture.

example2: Hello Texture

Demonstrates a textured triangle, using SDL to load an image from a file.

example3: Hello Text

Demonstrates TrueType text, using SDL to render a string into a texture and
apply it to a quad.

example4: Hello Texture Atlas

Demonstrates SGI's Texfont text, loading a font texture atlas from a .txf file
and applying it to a quad, as well as rendering of text strings.


**** What exactly done to make it works on amigaos4/win32 ?

1. added amigaos4 and win32/msys2 build scripts (you can manually take the
strings for necessary example and run one by one)
2. fixed initialisation (events.cpp): proper initialising of SDL, creating of
context, SDL_GL_SetAttributes , so it works now not only on emscripten, but also
on amigaos4 and on win32
3. fixed cleanup (events.cpp/events.h): was just std::terminate() for SDL_Quit,
which is wrong even on win32, taking aside aos4 where we need clean things
ourselfs. Now its proper:

           case SDL_QUIT:
                if(glc) {
                    SDL_GL_DeleteContext(glc);
                    glc = NULL;
                }
                if(mpWindow) {
                    SDL_DestroyWindow(mpWindow);
                    mpWindow = NULL;
                }
                SDL_Quit();
                exit(0);
                break;

            
4. proper commenting of sources in terms of amigaos4/win32
5. prebuild binaries for amigaos4

**** For what ?

To help any developer who want to use OpenGL ES 2 with SDL2 on AmigaOS4. Those
examples are basic, but very well structured, selfexplained, well commented, and
can be used as basis for more matured apps.

**** Thanks

Thanks to Daniel for OpenGL ES2 and all his help with everything :
http://www.goldencode.de/
Thanks to Hans for Warp3DNova and all his help with everything :
https://keasigmadelta.com/
Thanks to AEON who actually pay developers (yes, unusual in amiga world) , so we
have OpenGL ES2 and Warp3DNova.
Thanks to Capehill (and others) for actual SDL2 port and all his help with
everything : https://github.com/AmigaPorts/SDL
Thanks to erik-larsen for original Emscripten based version


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