@Hans
Yeah, having GLES hint for win32, do not make it any different for amigaos4 (it compiles and works on aos4 with it fine, so no needs for ifdef).
As for other changes:
1. "3" on "2" for MAJOR_VERSION. So there amigaos4 ifdef need it.
2. default SDL include in SDL2 , so <SDL2/SDL.h> , not just <SDL.h> , or , instead of changing that, on compiling time -I can be used, like -I/usr/local/amiga/ppc-amigaos/SDK/local/newlib/include/SDL2 , but imho its worse (as then will be different between native and crosscompiler builds), and better to replace everyhtng with adding <SDL2/ " , so it will fine everywhere (and for visual studio too, probabaly). For msys on win32, it also need <SDL2/.
3. For amigaos4 it should be main() , for msys/win32 it should be WinMain(), for visual studio you seems use SDL_main(). So there should be ifdefs.
4. To make works GLM includes on amigaos4 for tutorial4 and tutorial5, you need to add at top of main.cpp in both examples that:
#define GLM_ENABLE_EXPERIMENTAL 1
(that maybe because of my GLM includes being a little old, or too new , dunno).
And in GLM includes itself, in the glm/detail/setup.hpp, where part about "Has of C++ features" , add amigaos4 ifdef , so define GLM_HAS_CXX11_STL will be 0, and not 1. Because if it, it will fail with some undefs and usuall "not being a member of std::" , i.e. like this:
///////////////////////////////////////////////////////////////////////////////////
// Has of C++ features
// http://clang.llvm.org/cxx_status.html
// http://gcc.gnu.org/projects/cxx0x.html
// http://msdn.microsoft.com/en-us/library/vstudio/hh567368(v=vs.120).aspx
// Android has multiple STLs but C++11 STL detection doesn't always work #284 #564
#if GLM_PLATFORM == GLM_PLATFORM_ANDROID && !defined(GLM_LANG_STL11_FORCED)
# define GLM_HAS_CXX11_STL 0
#elif GLM_COMPILER & GLM_COMPILER_CLANG
# if (defined(_LIBCPP_VERSION) && GLM_LANG & GLM_LANG_CXX11_FLAG) || defined(GLM_LANG_STL11_FORCED)
# define GLM_HAS_CXX11_STL 1
# else
# define GLM_HAS_CXX11_STL 0
# endif
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
#ifdef __amigaos4__
# define GLM_HAS_CXX11_STL 0
#else
# define GLM_HAS_CXX11_STL 1
#endif
#else
# define GLM_HAS_CXX11_STL ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)) || \
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
((GLM_PLATFORM != GLM_PLATFORM_WINDOWS) && (GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL15))))
#endif
And compiling lines for amigaos4 are easy, like this one for tutorial05:
ppc-amigaos-g++ -athread=native main.cpp Shader.cpp Texture.cpp -lSDL2 -lSDL2_image -lpng -ltiff -ljpeg -lwebp -lz -lpthread
And that all.
Edited by kas1e on 2019/8/7 16:36:17