From: Sven G. <sgo...@ja...> - 2000-08-31 20:29:13
|
No success ... This piece of code, should give us the function-pointer (funcPtr) ! Purpose: The function ptr is achieved dynamically out of the OpenGL implementation ... But: It does not work ... Ideas ? #include <CodeFragments.h> void * LIBAPIENTRY getGLProcAddressHelper(const char * func, int * method, int debug, int verbose ) { void * funcPtr=NULL; int lmethod; ... #ifdef __mac_os /* funcPtr = GetProcAddress(func); */ static char buffer[256]; Ptr glLibMainAddr; CFragConnectionID glLibConnectId; CFragSymbolClass glLibSymClass; GetSharedLibrary ("OpenGLLibrary", kCompiledCFragArch /*kPowerPCCFragArch */, kStubLibraryCFrag, &glLibConnectId, &glLibMainAddr, buffer); printf("GetSharedLibrary errMsg: %s\n", buffer); fflush(NULL); FindSymbol (glLibConnectId, func, &funcPtr, & glLibSymClass ); /* With this peace, or without, just getting NULL ! :-( if(glLibSymClass == kTVectorCFragSymbol) { printf("should be found: symbol class equals kTVectSymbol\n"); } else { printf("should be NOT found: symbol class NOT equals kTVectSymbol\n"); funcPtr = NULL; } */ fflush(NULL); CloseConnection(&glLibConnectId); lmethod=2; #endif -- mailto:sgo...@ja... www : http://www.jausoft.com ; pgp: http://www.jausoft.com/gpg/ voice : +49-521-2399440, +49-170-2115963; fax: +49-521-2399442 |