Not too shy to talk 
|
@smarkusg
How did you handle the GL Stuff ? Myselves I did a (because the version from the github loads the gl functions dynamically and on OS4 we have it statically), did you do this similar, or different ?
static void OGL_SetFunctionPointers_t(HINSTANCE /*hiOGL*/) { const char *strName;
#if defined(__amigaos4__) && defined(AMIGA_STATIC_GL) /* On AmigaOS we link GL, so: - for REQUIRED entries, bind to the (possibly remapped) linked symbol; - for OPTIONAL entries, leave the pointer NULL (don’t take &name). */ #define DLLFUNCTION(dll, output, name, inputs, params, required) \ do { \ if (required) { \ p##name = (output (*) inputs) &name; \ if (p##name == NULL) FailFunction_t(#name); \ } else { \ p##name = NULL; \ } \ } while (0) #else /* Default (ELF) path: resolve through SDL. */ #define DLLFUNCTION(dll, output, name, inputs, params, required) \ do { \ strName = #name; \ p##name = (output (*) inputs) SDL_GL_GetProcAddress(strName); \ if ((required) && (p##name == NULL)) FailFunction_t(strName); \ } while (0) #endif
/* If building for MiniGL, you can optionally ask gl_functions.h to skip 3D texture entries. (Only needed if those entries were ever marked REQUIRED there.) */ #if defined(__amigaos4__) && defined(USEMINIGL) #ifndef GL_FUNCTIONS_SKIP_TEX3D #define GL_FUNCTIONS_SKIP_TEX3D 1 #endif #endif
#include "Engine/Graphics/gl_functions.h" #undef DLLFUNCTION }
for the GL function pointers, I hope this works (I am now basically at the point where I need to install the game and test, everything compiles and links).
Also how do we continue from here ? Not that we in the end do two OS4 ports ^^
My own idea would be to do this like I did for OpenMohaa (while this was not ported by me), complete with installer which installs directly from the PC version, nice icons and everything.
My question is if you plan to continue or if this was just a quick try.
I will probably do a test today, if it works.
Did you do with GL4ES or MiniGL BTW ? I used GL4ES (didn't get MiniGL working yet, but the plan was to look into a alternate MiniGL version later - MiniGL having some problems with variable type clashes, while on GL4ES it compiles directly).
Best regards, Steffen
Edited by TheMagicSN on 2025/9/11 15:23:30
|