1 // SwiftShader Software Renderer
\r
3 // Copyright(c) 2005-2012 TransGaming Inc.
\r
5 // All rights reserved. No part of this software may be copied, distributed, transmitted,
\r
6 // transcribed, stored in a retrieval system, translated into any human or computer
\r
7 // language by any means, or disclosed to third parties without the explicit written
\r
8 // agreement of TransGaming Inc. Without such an agreement, no rights or licenses, express
\r
9 // or implied, including but not limited to any patent rights, are granted to you.
\r
13 #include <Windows.h>
\r
19 inline void *loadLibrary(const char *path)
\r
21 return (void*)LoadLibrary(path);
\r
24 inline void freeLibrary(void *library)
\r
26 FreeLibrary((HMODULE)library);
\r
29 inline void *getProcAddress(void *library, const char *name)
\r
31 return (void*)GetProcAddress((HMODULE)library, name);
\r
34 inline void *loadLibrary(const char *path)
\r
36 return dlopen(path, RTLD_LAZY);
\r
39 inline void freeLibrary(void *library)
\r
44 inline void *getProcAddress(void *library, const char *name)
\r
46 return dlsym(library, name);
\r