OS4 DepotLogo by Browallia 
(anonymous IP: 3.128.200.165,0) 
 HomeRecentStatsSearchMirrorsContactInfoDisclaimerConfigAdmin
 Menu

 Features
   Crashlogs
   Bug tracker
   Locale browser
 

 Categories

   o Audio (343)
   o Datatype (51)
   o Demo (203)
   o Development (602)
   o Document (24)
   o Driver (97)
   o Emulation (149)
   o Game (1011)
   o Graphics (500)
   o Library (118)
   o Network (234)
   o Office (66)
   o Utility (932)
   o Video (69)

Total files: 4399

Full index file
Recent index file

 Links

  Amigans.net
  OpenAmiga
  Aminet
  UtilityBase
  IntuitionBase
  AmigaBounty


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 19
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:  (Current version)
 (Accumulated)

[Show comments] [Show snapshots] [Show videos] [Show content] [Show crashlogs] 
**** 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 (c) 2004-2024 by Björn Hagström All Rights Reserved
Amiga OS and its logos are registered trademarks of Hyperion Entertainment