Changeset 80
- Timestamp:
- 02/14/05 01:10:03 (4 years ago)
- Files:
-
- trunk/DerelictAL/derelict/openal/al.d (modified) (8 diffs)
- trunk/DerelictGL/derelict/opengl/gl.d (modified) (2 diffs)
- trunk/DerelictGLFW/derelict/glfw/glfw.d (modified) (4 diffs)
- trunk/DerelictGLU/derelict/opengl/glu.d (modified) (16 diffs)
- trunk/DerelictSDL/derelict/sdl/sdl.d (modified) (2 diffs)
- trunk/DerelictSDLImage/derelict/sdl/image.d (modified) (3 diffs)
- trunk/DerelictSDLMixer/derelict/sdl/mixer.d (modified) (1 diff)
- trunk/DerelictSDLNet/derelict/sdl/net.d (modified) (2 diffs)
- trunk/DerelictSDLttf/derelict/sdl/ttf.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/DerelictAL/derelict/openal/al.d
r46 r80 24 24 typedef ALdouble function(ALenum) pfalGetDouble; 25 25 typedef ALenum function() pfalGetError; 26 pfalEnable alEnable;27 pfalDisable alDisable;28 pfalIsEnabled alIsEnabled;29 pfalHint alHint;30 pfalGetBooleanv alGetBooleanv;31 pfalGetIntegerv alGetIntegerv;32 pfalGetFloatv alGetFloatv;33 pfalGetDoublev alGetDoublev;34 pfalGetString alGetString;35 pfalGetInteger alGetInteger;36 pfalGetFloat alGetFloat;37 pfalGetDouble alGetDouble;38 pfalGetError alGetError;26 pfalEnable alEnable; 27 pfalDisable alDisable; 28 pfalIsEnabled alIsEnabled; 29 pfalHint alHint; 30 pfalGetBooleanv alGetBooleanv; 31 pfalGetIntegerv alGetIntegerv; 32 pfalGetFloatv alGetFloatv; 33 pfalGetDoublev alGetDoublev; 34 pfalGetString alGetString; 35 pfalGetInteger alGetInteger; 36 pfalGetFloat alGetFloat; 37 pfalGetDouble alGetDouble; 38 pfalGetError alGetError; 39 39 40 40 typedef ALboolean function(char*) pfalIsExtensionPresent; 41 41 typedef ALboolean function(char*) pfalGetProcAddress; 42 42 typedef ALenum function(char*) pfalGetEnumValue; 43 pfalIsExtensionPresent alIsExtensionPresent;44 pfalGetProcAddress alGetProcAddress;45 pfalGetEnumValue alGetEnumValue;43 pfalIsExtensionPresent alIsExtensionPresent; 44 pfalGetProcAddress alGetProcAddress; 45 pfalGetEnumValue alGetEnumValue; 46 46 47 47 typedef void function(ALenum, ALfloat) pfalListenerf; … … 54 54 typedef void function(ALenum, ALfloat*) pfalGetListenerfv; 55 55 typedef void function(ALenum, ALfloat*, ALfloat*, ALfloat*) pfalGetListener3f; 56 pfalListenerf alListenerf;57 pfalListeneri alListeneri;58 pfalListener3f alListener3f;59 pfalListenerfv alListenerfv;60 pfalGetListeneri alGetListeneri;61 pfalGetListenerf alGetListenerf;62 pfalGetListeneriv alGetListeneriv;63 pfalGetListenerfv alGetListenerfv;64 pfalGetListener3f alGetListener3f;56 pfalListenerf alListenerf; 57 pfalListeneri alListeneri; 58 pfalListener3f alListener3f; 59 pfalListenerfv alListenerfv; 60 pfalGetListeneri alGetListeneri; 61 pfalGetListenerf alGetListenerf; 62 pfalGetListeneriv alGetListeneriv; 63 pfalGetListenerfv alGetListenerfv; 64 pfalGetListener3f alGetListener3f; 65 65 66 66 typedef void function(ALsizei, ALuint*) pfalGenSources; … … 76 76 typedef void function(ALuint, ALenum, ALfloat*) pfalGetSourcefv; 77 77 typedef void function(ALuint, ALenum, ALfloat*, ALfloat*, ALfloat*) pfalGetSource3f; 78 pfalGenSources alGenSources;79 pfalDeleteSources alDeleteSources;80 pfalIsSource alIsSource;81 pfalSourcei alSourcei;82 pfalSourcef alSourcef;83 pfalSource3f alSource3f;84 pfalSourcefv alSourcefv;85 pfalGetSourcei alGetSourcei;86 pfalGetSourcef alGetSourcef;87 pfalGetSourceiv alGetSourceiv;88 pfalGetSourcefv alGetSourcefv;89 pfalGetSource3f alGetSource3f;78 pfalGenSources alGenSources; 79 pfalDeleteSources alDeleteSources; 80 pfalIsSource alIsSource; 81 pfalSourcei alSourcei; 82 pfalSourcef alSourcef; 83 pfalSource3f alSource3f; 84 pfalSourcefv alSourcefv; 85 pfalGetSourcei alGetSourcei; 86 pfalGetSourcef alGetSourcef; 87 pfalGetSourceiv alGetSourceiv; 88 pfalGetSourcefv alGetSourcefv; 89 pfalGetSource3f alGetSource3f; 90 90 91 91 typedef void function(ALsizei, ALuint*) pfalSourcePlayv; … … 97 97 typedef void function(ALuint) pfalSourceRewind; 98 98 typedef void function(ALuint) pfalSourceStop; 99 pfalSourcePlayv alSourcePlayv;100 pfalSourceStopv alSourceStopv;101 pfalSourceRewindv alSourceRewindv;102 pfalSourcePausev alSourcePausev;103 pfalSourcePlay alSourcePlay;104 pfalSourcePause alSourcePause;105 pfalSourceRewind alSourceRewind;106 pfalSourceStop alSourceStop;99 pfalSourcePlayv alSourcePlayv; 100 pfalSourceStopv alSourceStopv; 101 pfalSourceRewindv alSourceRewindv; 102 pfalSourcePausev alSourcePausev; 103 pfalSourcePlay alSourcePlay; 104 pfalSourcePause alSourcePause; 105 pfalSourceRewind alSourceRewind; 106 pfalSourceStop alSourceStop; 107 107 108 108 typedef void function(ALsizei, ALuint*) pfalGenBuffers; … … 112 112 typedef void function(ALuint, ALenum, ALint*) pfalGetBufferi; 113 113 typedef void function(ALuint, ALenum, ALfloat*) pfalGetBufferf; 114 pfalGenBuffers alGenBuffers;115 pfalDeleteBuffers alDeleteBuffers;116 pfalIsBuffer alIsBuffer;117 pfalBufferData alBufferData;118 pfalGetBufferi alGetBufferi;119 pfalGetBufferf alGetBufferf;114 pfalGenBuffers alGenBuffers; 115 pfalDeleteBuffers alDeleteBuffers; 116 pfalIsBuffer alIsBuffer; 117 pfalBufferData alBufferData; 118 pfalGetBufferi alGetBufferi; 119 pfalGetBufferf alGetBufferf; 120 120 121 121 version(linux) … … 123 123 typedef void function(ALuint, ALenum, ALint*) pfalGetBufferiv; 124 124 typedef void function(ALuint, ALenum, ALfloat*) pfalGetBufferfv; 125 pfalGetBufferiv alGetBufferiv;126 pfalGetBufferfv alGetBufferfv;125 pfalGetBufferiv alGetBufferiv; 126 pfalGetBufferfv alGetBufferfv; 127 127 } 128 128 129 129 typedef void function(ALuint, ALsizei, ALuint*) pfalSourceQueueBuffers; 130 130 typedef void function(ALuint, ALsizei, ALuint*) pfalSourceUnqueueBuffers; 131 pfalSourceQueueBuffers alSourceQueueBuffers;132 pfalSourceUnqueueBuffers alSourceUnqueueBuffers;131 pfalSourceQueueBuffers alSourceQueueBuffers; 132 pfalSourceUnqueueBuffers alSourceUnqueueBuffers; 133 133 134 134 typedef void function(ALfloat) pfalDopplerFactor; 135 135 typedef void function(ALfloat) pfalDopplerVelocity; 136 136 typedef void function(ALenum) pfalDistanceModel; 137 pfalDopplerFactor alDopplerFactor;138 pfalDopplerVelocity alDopplerVelocity;139 pfalDistanceModel alDistanceModel;137 pfalDopplerFactor alDopplerFactor; 138 pfalDopplerVelocity alDopplerVelocity; 139 pfalDistanceModel alDistanceModel; 140 140 141 141 } … … 151 151 private void* getProc(char[] procname) 152 152 { 153 void *symbol = ExeModule_GetSymbol(hal, procname);154 if(symbol is null)155 throw new Exception("Failed to load openal proc address " ~ procname);156 return symbol;153 void *symbol = ExeModule_GetSymbol(hal, procname); 154 if(symbol is null) 155 throw new Exception("Failed to load openal proc address " ~ procname); 156 return symbol; 157 157 } 158 158 159 159 private void loadAL() 160 160 { 161 // al functions 162 alEnable = cast(pfalEnable)getProc("alEnable"); 163 alDisable = cast(pfalDisable)getProc("alDisable"); 164 alIsEnabled = cast(pfalIsEnabled)getProc("alIsEnabled"); 165 alHint = cast(pfalHint)getProc("alHint"); 166 alGetBooleanv = cast(pfalGetBooleanv)getProc("alGetBooleanv"); 167 alGetIntegerv = cast(pfalGetIntegerv)getProc("alGetIntegerv"); 168 alGetFloatv = cast(pfalGetFloatv)getProc("alGetFloatv"); 169 alGetDoublev = cast(pfalGetDoublev)getProc("alGetDoublev"); 170 alGetString = cast(pfalGetString)getProc("alGetString"); 171 alGetInteger = cast(pfalGetInteger)getProc("alGetInteger"); 172 alGetFloat = cast(pfalGetFloat)getProc("alGetFloat"); 173 alGetDouble = cast(pfalGetDouble)getProc("alGetDouble"); 174 alGetError = cast(pfalGetError)getProc("alGetError"); 175 alIsExtensionPresent = cast(pfalIsExtensionPresent)getProc("alIsExtensionPresent"); 176 alGetProcAddress = cast(pfalGetProcAddress)getProc("alGetProcAddress"); 177 alGetEnumValue = cast(pfalGetEnumValue)getProc("alGetEnumValue"); 178 alListenerf = cast(pfalListenerf)getProc("alListenerf"); 179 alListeneri = cast(pfalListeneri)getProc("alListeneri"); 180 alListener3f = cast(pfalListener3f)getProc("alListener3f"); 181 alListenerfv = cast(pfalListenerfv)getProc("alListenerfv"); 182 alGetListeneri = cast(pfalGetListeneri)getProc("alGetListeneri"); 183 alGetListenerf = cast(pfalGetListenerf)getProc("alGetListenerf"); 184 alGetListeneriv = cast(pfalGetListeneriv)getProc("alGetListeneriv"); 185 alGetListenerfv = cast(pfalGetListenerfv)getProc("alGetListenerfv"); 186 alGetListener3f = cast(pfalGetListener3f)getProc("alGetListener3f"); 187 alGenSources = cast(pfalGenSources)getProc("alGenSources"); 188 alDeleteSources = cast(pfalDeleteSources)getProc("alDeleteSources"); 189 alIsSource = cast(pfalIsSource)getProc("alIsSource"); 190 alSourcei = cast(pfalSourcei)getProc("alSourcei"); 191 alSourcef = cast(pfalSourcef)getProc("alSourcef"); 192 alSource3f = cast(pfalSource3f)getProc("alSource3f"); 193 alSourcefv = cast(pfalSourcefv)getProc("alSourcefv"); 194 alGetSourcei = cast(pfalGetSourcei)getProc("alGetSourcei"); 195 alGetSourcef = cast(pfalGetSourcef)getProc("alGetSourcef"); 196 alGetSourceiv = cast(pfalGetSourceiv)getProc("alGetSourceiv"); 197 alGetSourcefv = cast(pfalGetSourcefv)getProc("alGetSourcefv"); 198 alGetSource3f = cast(pfalGetSource3f)getProc("alGetSource3f"); 199 alSourcePlayv = cast(pfalSourcePlayv)getProc("alSourcePlayv"); 200 alSourceStopv = cast(pfalSourceStopv)getProc("alSourceStopv"); 201 alSourceRewindv = cast(pfalSourceRewindv)getProc("alSourceRewindv"); 202 alSourcePausev = cast(pfalSourcePausev)getProc("alSourcePausev"); 203 alSourcePlay = cast(pfalSourcePlay)getProc("alSourcePlay"); 204 alSourcePause = cast(pfalSourcePause)getProc("alSourcePause"); 205 alSourceRewind = cast(pfalSourceRewind)getProc("alSourceRewind"); 206 alSourceStop = cast(pfalSourceStop)getProc("alSourceStop"); 207 alGenBuffers = cast(pfalGenBuffers)getProc("alGenBuffers"); 208 alDeleteBuffers = cast(pfalDeleteBuffers)getProc("alDeleteBuffers"); 209 alIsBuffer = cast(pfalIsBuffer)getProc("alIsBuffer"); 210 alBufferData = cast(pfalBufferData)getProc("alBufferData"); 211 alGetBufferi = cast(pfalGetBufferi)getProc("alGetBufferi"); 212 alGetBufferf = cast(pfalGetBufferf)getProc("alGetBufferf"); 213 version(linux) 214 { 215 alGetBufferfv = cast(pfalGetBufferfv)getProc("pfalGetBufferfv"); 216 alGetBufferiv = cast(pfalGetBufferiv)getProc("pfalGetBufferiv"); 217 } 218 alSourceQueueBuffers = cast(pfalSourceQueueBuffers)getProc("alSourceQueueBuffers"); 219 alSourceUnqueueBuffers = cast(pfalSourceUnqueueBuffers)getProc("alSourceUnqueueBuffers"); 220 alDopplerFactor = cast(pfalDopplerFactor)getProc("alDopplerFactor"); 221 alDopplerVelocity = cast(pfalDopplerVelocity)getProc("alDopplerVelocity"); 222 alDistanceModel = cast(pfalDistanceModel)getProc("alDistanceModel"); 161 // al functions 162 alEnable = cast(pfalEnable)getProc("alEnable"); 163 alDisable = cast(pfalDisable)getProc("alDisable"); 164 alIsEnabled = cast(pfalIsEnabled)getProc("alIsEnabled"); 165 alHint = cast(pfalHint)getProc("alHint"); 166 alGetBooleanv = cast(pfalGetBooleanv)getProc("alGetBooleanv"); 167 alGetIntegerv = cast(pfalGetIntegerv)getProc("alGetIntegerv"); 168 alGetFloatv = cast(pfalGetFloatv)getProc("alGetFloatv"); 169 alGetDoublev = cast(pfalGetDoublev)getProc("alGetDoublev"); 170 alGetString = cast(pfalGetString)getProc("alGetString"); 171 alGetInteger = cast(pfalGetInteger)getProc("alGetInteger"); 172 alGetFloat = cast(pfalGetFloat)getProc("alGetFloat"); 173 alGetDouble = cast(pfalGetDouble)getProc("alGetDouble"); 174 alGetError = cast(pfalGetError)getProc("alGetError"); 175 alIsExtensionPresent = cast(pfalIsExtensionPresent)getProc("alIsExtensionPresent"); 176 alGetProcAddress = cast(pfalGetProcAddress)getProc("alGetProcAddress"); 177 alGetEnumValue = cast(pfalGetEnumValue)getProc("alGetEnumValue"); 178 alListenerf = cast(pfalListenerf)getProc("alListenerf"); 179 alListeneri = cast(pfalListeneri)getProc("alListeneri"); 180 alListener3f = cast(pfalListener3f)getProc("alListener3f"); 181 alListenerfv = cast(pfalListenerfv)getProc("alListenerfv"); 182 alGetListeneri = cast(pfalGetListeneri)getProc("alGetListeneri"); 183 alGetListenerf = cast(pfalGetListenerf)getProc("alGetListenerf"); 184 alGetListeneriv = cast(pfalGetListeneriv)getProc("alGetListeneriv"); 185 alGetListenerfv = cast(pfalGetListenerfv)getProc("alGetListenerfv"); 186 alGetListener3f = cast(pfalGetListener3f)getProc("alGetListener3f"); 187 alGenSources = cast(pfalGenSources)getProc("alGenSources"); 188 alDeleteSources = cast(pfalDeleteSources)getProc("alDeleteSources"); 189 alIsSource = cast(pfalIsSource)getProc("alIsSource"); 190 alSourcei = cast(pfalSourcei)getProc("alSourcei"); 191 alSourcef = cast(pfalSourcef)getProc("alSourcef"); 192 alSource3f = cast(pfalSource3f)getProc("alSource3f"); 193 alSourcefv = cast(pfalSourcefv)getProc("alSourcefv"); 194 alGetSourcei = cast(pfalGetSourcei)getProc("alGetSourcei"); 195 alGetSourcef = cast(pfalGetSourcef)getProc("alGetSourcef"); 196 alGetSourceiv = cast(pfalGetSourceiv)getProc("alGetSourceiv"); 197 alGetSourcefv = cast(pfalGetSourcefv)getProc("alGetSourcefv"); 198 alGetSource3f = cast(pfalGetSource3f)getProc("alGetSource3f"); 199 alSourcePlayv = cast(pfalSourcePlayv)getProc("alSourcePlayv"); 200 alSourceStopv = cast(pfalSourceStopv)getProc("alSourceStopv"); 201 alSourceRewindv = cast(pfalSourceRewindv)getProc("alSourceRewindv"); 202 alSourcePausev = cast(pfalSourcePausev)getProc("alSourcePausev"); 203 alSourcePlay = cast(pfalSourcePlay)getProc("alSourcePlay"); 204 alSourcePause = cast(pfalSourcePause)getProc("alSourcePause"); 205 alSourceRewind = cast(pfalSourceRewind)getProc("alSourceRewind"); 206 alSourceStop = cast(pfalSourceStop)getProc("alSourceStop"); 207 alGenBuffers = cast(pfalGenBuffers)getProc("alGenBuffers"); 208 alDeleteBuffers = cast(pfalDeleteBuffers)getProc("alDeleteBuffers"); 209 alIsBuffer = cast(pfalIsBuffer)getProc("alIsBuffer"); 210 alBufferData = cast(pfalBufferData)getProc("alBufferData"); 211 alGetBufferi = cast(pfalGetBufferi)getProc("alGetBufferi"); 212 alGetBufferf = cast(pfalGetBufferf)getProc("alGetBufferf"); 213 version(linux) 214 { 215 alGetBufferfv = cast(pfalGetBufferfv)getProc("pfalGetBufferfv"); 216 alGetBufferiv = cast(pfalGetBufferiv)getProc("pfalGetBufferiv"); 217 } 218 alSourceQueueBuffers = cast(pfalSourceQueueBuffers)getProc("alSourceQueueBuffers"); 219 alSourceUnqueueBuffers = cast(pfalSourceUnqueueBuffers)getProc("alSourceUnqueueBuffers"); 220 alDopplerFactor = cast(pfalDopplerFactor)getProc("alDopplerFactor"); 221 alDopplerVelocity = cast(pfalDopplerVelocity)getProc("alDopplerVelocity"); 222 alDistanceModel = cast(pfalDistanceModel)getProc("alDistanceModel"); 223 } 224 225 public void DerelictAL_Load(char[] libName) 226 { 227 if(hal !== null) 228 return; 229 230 if(ExeModule_Init() == -1) 231 throw new Exception("Exemodule initialization failed"); 232 233 exeModuleInited = true; 234 235 hal = ExeModule_Load(libName); 236 237 if(hal is null) 238 throw new Exception("Failed to load the OpenAL shared library."); 239 240 loadAL(); 223 241 } 224 242 225 243 public void DerelictAL_Load() 226 244 { 227 if(hal !== null) 228 return; 229 230 if(ExeModule_Init() == -1) 231 throw new Exception("Exemodule initialization failed"); 232 233 exeModuleInited = true; 234 235 version(Windows) 236 hal = ExeModule_Load("OpenAL32.dll"); 237 238 loadAL(); 245 version(Windows) 246 DerelictAL_Load("OpenAL32.dll"); 239 247 } 240 248 … … 243 251 public void DerelictAL_LoadALU() 244 252 { 245 aluF2L = cast(pfaluF2L)getProc("aluF2L");246 aluF2S = cast(pfaluF2S)getProc("aluF2S");247 aluCrossproduct = cast(pfaluCrossproduct)getProc("aluCrossproduct");248 aluDotproduct = cast(pfaluDotproduct)getProc("aluDotproduct");249 aluNormalize = cast(pfaluNormalize)getProc("aluNormalize");250 aluMatrixVector = cast(pfaluMatrixVector)getProc("aluMatrixVector");251 aluCalculateSourceParameters = cast(pfaluCalculateSourceParameters)getProc("aluCalculateSourceParameters");252 aluMixData = cast(pfaluMixData)getProc("aluMixData");253 aluSetReverb = cast(pfaluSetReverb)getProc("aluSetReverb");254 aluReverb = cast(pfaluReverb)getProc("aluReverb"); 255 } 256 } 253 aluF2L = cast(pfaluF2L)getProc("aluF2L"); 254 aluF2S = cast(pfaluF2S)getProc("aluF2S"); 255 aluCrossproduct = cast(pfaluCrossproduct)getProc("aluCrossproduct"); 256 aluDotproduct = cast(pfaluDotproduct)getProc("aluDotproduct"); 257 aluNormalize = cast(pfaluNormalize)getProc("aluNormalize"); 258 aluMatrixVector = cast(pfaluMatrixVector)getProc("aluMatrixVector"); 259 aluCalculateSourceParameters = cast(pfaluCalculateSourceParameters)getProc("aluCalculateSourceParameters"); 260 aluMixData = cast(pfaluMixData)getProc("aluMixData"); 261 aluSetReverb = cast(pfaluSetReverb)getProc("aluSetReverb"); 262 aluReverb = cast(pfaluReverb)getProc("aluReverb"); 263 } 264 } // version(Windows) 257 265 258 266 static ~this() 259 267 { 260 if(exeModuleInited)261 { 262 ExeModule_Release(hal);263 ExeModule_Uninit();264 }265 } 268 if(exeModuleInited) 269 { 270 ExeModule_Release(hal); 271 ExeModule_Uninit(); 272 } 273 } trunk/DerelictGL/derelict/opengl/gl.d
r78 r80 55 55 } 56 56 57 public void DerelictGL_Load( )57 public void DerelictGL_Load(char[] libName) 58 58 { 59 59 if(hgl !== null) … … 63 63 throw new Exception("ExeModule initialization failed"); 64 64 65 version(Windows) 66 hgl = ExeModule_Load("opengl32.dll"); 67 version(linux) 68 hgl = ExeModule_Load("libgl.so"); 65 exeModuleInited = true; 69 66 70 exeModuleInited = true; 67 hgl = ExeModule_Load(libName); 68 69 if(hgl is null) 70 throw new Exception("Failed to load the OpenGL shared library"); 71 72 71 73 72 74 loadPlatformGL(); 73 75 loadGL(); 76 } 77 78 public void DerelictGL_Load() 79 { 80 version(Windows) 81 DerelictGL_Load("opengl32.dll"); 82 version(linux) 83 DerelictGL_Load("libgl.so"); 74 84 } 75 85 trunk/DerelictGLFW/derelict/glfw/glfw.d
r76 r80 1 1 // ----------------------------------------------------------------------- 2 2 // FILE: glfw.d -- dynamic loader interface for the GLFW library 3 // 3 // 4 4 // 2005-02-09: Added to Derelict library for dynamic linking -- JJR 5 // 5 // 6 6 // *** Original header file copyright below *** 7 7 … … 46 46 //----------------------------------------------------------- 47 47 // glfw Types and Constants 48 //----------------------------------------------------------- 49 48 //----------------------------------------------------------- 49 50 50 const int GLFW_VERSION_MAJOR = 2; 51 51 const int GLFW_VERSION_MINOR = 4; 52 const int GLFW_VERSION_REVISION = 2; 52 const int GLFW_VERSION_REVISION = 2; 53 53 54 54 // Key and button state/action definitions … … 198 198 // Time spans longer than this (seconds) are considered to be infinity 199 199 const float GLFW_INFINITY = 100000.0; 200 200 201 201 extern(Windows) 202 202 { 203 // Intrinsic glfw funtion pointer types204 typedef void function(int, int) GLFWwindowsizefun;205 typedef void function(int, int) GLFWmousebuttonfun;206 typedef void function(int, int) GLFWmouseposfun;207 typedef void function(int) GLFWmousewheelfun;208 typedef void function(int, int) GLFWkeyfun;209 typedef void function(int, int) GLFWcharfun;210 alias void function(void*) GLFWthreadfun;203 // Intrinsic glfw funtion pointer types 204 typedef void function(int, int) GLFWwindowsizefun; 205 typedef void function(int, int) GLFWmousebuttonfun; 206 typedef void function(int, int) GLFWmouseposfun; 207 typedef void function(int) GLFWmousewheelfun; 208 typedef void function(int, int) GLFWkeyfun; 209 typedef void function(int, int) GLFWcharfun; 210 alias void function(void*) GLFWthreadfun; 211 211 } 212 212 213 213 struct GLFWvidmode 214 214 { 215 int Width, Height;216 int RedBits, BlueBits, GreenBits;215 int Width, Height; 216 int RedBits, BlueBits, GreenBits; 217 217 } 218 218 219 219 struct GLFWimage 220 220 { 221 int Width, Height;222 int Format;223 int BytesPerPixel;224 ubyte *Data;221 int Width, Height; 222 int Format; 223 int BytesPerPixel; 224 ubyte *Data; 225 225 } 226 226 … … 238 238 239 239 version(NO_PREFIX) 240 { 241 pfglfwInitinit;242 pfglfwTerminateterminate;243 pfglfwGetVersiongetVersion;244 245 pfglfwOpenWindowopenWindow;246 pfglfwOpenWindowHintopenWindowHint;247 pfglfwCloseWindowcloseWindow;248 pfglfwSetWindowTitlesetWindowTitle;249 pfglfwGetWindowSizegetWindowSize;250 pfglfwSetWindowSizesetWindowSize;251 pfglfwSetWindowPossetWindowPos;252 pfglfwIconifyWindowiconifyWindow;253 pfglfwRestoreWindowrestoreWindow;254 pfglfwSwapBuffersswapBuffers;255 pfglfwSwapIntervalswapInterval;256 pfglfwGetWindowParamgetWindowParam;257 pfglfwSetWindowSizeCallbacksetWindowSizeCallback;258 259 pfglfwGetVideoModesgetVideoModes;260 pfglfwGetDesktopModegetDesktopMode;261 262 pfglfwPollEventspollEvents;263 pfglfwGetKeygetKey;264 pfglfwGetMouseButtongetMouseButton;265 pfglfwGetMousePosgetMousePos;266 pfglfwSetMousePossetMousePos;267 pfglfwGetMouseWheelgetMouseWheel;268 pfglfwSetMouseWheelsetMouseWheel;269 pfglfwSetKeyCallbacksetKeyCallback;270 pfglfwSetCharCallbacksetCharCallback;271 pfglfwSetMouseButtonCallbacksetMouseButtonCallback;272 pfglfwSetMousePosCallbacksetMousePosCallback;273 pfglfwSetMouseWheelCallbacksetMouseWheelCallback;274 275 pfglfwGetJoystickParamgetJoystickParam;276 pfglfwGetJoystickPosgetJoystickPos;277 pfglfwGetJoystickButtonsgetJoystickButtons;278 279 pfglfwGetTimegetTime;280 pfglfwSetTimesetTime;281 pfglfwSleepsleep;282 283 pfglfwExtensionSupportedextensionSupported;284 pfglfwGetProcAddressgetProcAddress;285 pfglfwGetGLVersiongetGLVersion;286 287 pfglfwCreateThreadcreateThread;288 pfglfwDestroyThreaddestroyThread;289 pfglfwWaitThreadwaitThread;290 pfglfwGetThreadIDgetThreadID;291 pfglfwCreateMutexcreateMutex;292 pfglfwDestroyMutexdestroyMutex;293 pfglfwLockMutexlockMutex;294 pfglfwUnlockMutexunlockMutex;295 pfglfwCreateCondcreateCond;296 pfglfwDestroyConddestroyCond;297 pfglfwWaitCondwaitCond;298 pfglfwSignalCondsignalCond;299 pfglfwBroadcastCondbroadcastCond;300 pfglfwGetNumberOfProcessorsgetNumberOfProcessors;301 302 pfglfwEnableenable;303 pfglfwDisabledisable;304 305 pfglfwReadImagereadImage;306 pfglfwFreeImagefreeImage;307 pfglfwLoadTexture2DloadTexture2D;308 309 private void load()310 {311 init= cast(pfglfwInit) getProc("glfwInit");312 terminate= cast(pfglfwTerminate) getProc("glfwTerminate");313 getVersion= cast(pfglfwGetVersion) getProc("glfwGetVersion");314 315 openWindow= cast(pfglfwOpenWindow) getProc("glfwOpenWindow");316 openWindowHint = cast(pfglfwOpenWindowHint) getProc("glfwOpenWindowHint");317 closeWindow = cast(pfglfwCloseWindow) getProc("glfwCloseWindow");318 setWindowTitle = cast(pfglfwSetWindowTitle) getProc("glfwSetWindowTitle");319 getWindowSize = cast(pfglfwGetWindowSize) getProc("glfwGetWindowSize");320 setWindowSize = cast(pfglfwSetWindowSize) getProc("glfwSetWindowSize");321 setWindowPos = cast(pfglfwSetWindowPos) getProc("glfwSetWindowPos");322 iconifyWindow = cast(pfglfwIconifyWindow) getProc("glfwIconifyWindow");323 restoreWindow = cast(pfglfwRestoreWindow) getProc("glfwRestoreWindow");324 swapBuffers = cast(pfglfwSwapBuffers) getProc("glfwSwapBuffers");325 swapInterval = cast(pfglfwSwapInterval) getProc("glfwSwapInterval");326 getWindowParam = cast(pfglfwGetWindowParam) getProc("glfwGetWindowParam");327 setWindowSizeCallback = cast(pfglfwSetWindowSizeCallback) getProc("glfwSetWindowSizeCallback");328 329 getVideoModes = cast(pfglfwGetVideoModes) getProc("glfwGetVideoModes");330 getDesktopMode = cast(pfglfwGetDesktopMode) getProc("glfwGetDesktopMode");331 332 pollEvents = cast(pfglfwPollEvents) getProc("glfwPollEvents");333 getKey = cast(pfglfwGetKey) getProc("glfwGetKey");334 getMouseButton = cast(pfglfwGetMouseButton) getProc("glfwGetMouseButton");335 getMousePos = cast(pfglfwGetMousePos) getProc("glfwGetMousePos");336 setMousePos = cast(pfglfwSetMousePos) getProc("glfwSetMousePos");337 getMouseWheel = cast(pfglfwGetMouseWheel) getProc("glfwGetMouseWheel");338 setMouseWheel = cast(pfglfwSetMouseWheel) getProc("glfwSetMouseWheel");339 setKeyCallback = cast(pfglfwSetKeyCallback) getProc("glfwSetKeyCallback");340 setCharCallback = cast(pfglfwSetCharCallback) getProc("glfwSetCharCallback");341 setMouseButtonCallback = cast(pfglfwSetMouseButtonCallback) getProc("glfwSetMouseButtonCallback");342 setMousePosCallback = cast(pfglfwSetMousePosCallback) getProc("glfwSetMousePosCallback");343 setMouseWheelCallback = cast(pfglfwSetMouseWheelCallback) getProc("glfwSetMouseWheelCallback");344 345 getJoystickParam = cast(pfglfwGetJoystickParam) getProc("glfwGetJoystickParam");346 getJoystickPos = cast(pfglfwGetJoystickPos) getProc("glfwGetJoystickPos");347 getJoystickButtons = cast(pfglfwGetJoystickButtons) getProc("glfwGetJoystickButtons");348 349 getTime = cast(pfglfwGetTime) getProc("glfwGetTime");350 setTime = cast(pfglfwSetTime) getProc("glfwSetTime");351 sleep = cast(pfglfwSleep) getProc("glfwSleep");352 353 extensionSupported = cast(pfglfwExtensionSupported) getProc("glfwExtensionSupported");354 getProcAddress = cast(pfglfwGetProcAddress) getProc("glfwGetProcAddress");355 getGLVersion = cast(pfglfwGetGLVersion) getProc("glfwGetGLVersion");356 357 createThread = cast(pfglfwCreateThread) getProc("glfwCreateThread");358 destroyThread = cast(pfglfwDestroyThread) getProc("glfwDestroyThread");359 waitThread = cast(pfglfwWaitThread) getProc("glfwWaitThread");360 getThreadID = cast(pfglfwGetThreadID) getProc("glfwGetThreadID");361 createMutex = cast(pfglfwCreateMutex) getProc("glfwCreateMutex");362 destroyMutex = cast(pfglfwDestroyMutex) getProc("glfwDestroyMutex");363 lockMutex = cast(pfglfwLockMutex) getProc("glfwLockMutex");364 unlockMutex = cast(pfglfwUnlockMutex) getProc("glfwUnlockMutex");365 createCond = cast(pfglfwCreateCond) getProc("glfwCreateCond");366 destroyCond = cast(pfglfwDestroyCond) getProc("glfwDestroyCond");367 waitCond = cast(pfglfwWaitCond) getProc("glfwWaitCond");368 signalCond = cast(pfglfwSignalCond) getProc("glfwSignalCond");369 broadcastCond = cast(pfglfwBroadcastCond) getProc("glfwBroadcastCond");370 getNumberOfProcessors = cast(pfglfwGetNumberOfProcessors) getProc("glfwGetNumberOfProcessors");371 372 enable = cast(pfglfwEnable) getProc("glfwEnable");373 disable = cast(pfglfwDisable) getProc("glfwDisable");374 375 readImage = cast(pfglfwReadImage) getProc("glfwReadImage");376 freeImage = cast(pfglfwFreeImage) getProc("glfwFreeImage");377 loadTexture2D = cast(pfglfwLoadTexture2D) getProc("glfwLoadTexture2D");378 }240 { 241 pfglfwInit init; 242 pfglfwTerminate terminate; 243 pfglfwGetVersion getVersion; 244 245 pfglfwOpenWindow openWindow; 246 pfglfwOpenWindowHint openWindowHint; 247 pfglfwCloseWindow closeWindow; 248 pfglfwSetWindowTitle setWindowTitle; 249 pfglfwGetWindowSize getWindowSize; 250 pfglfwSetWindowSize setWindowSize; 251 pfglfwSetWindowPos setWindowPos; 252 pfglfwIconifyWindow iconifyWindow; 253 pfglfwRestoreWindow restoreWindow; 254 pfglfwSwapBuffers swapBuffers; 255 pfglfwSwapInterval swapInterval; 256 pfglfwGetWindowParam getWindowParam; 257 pfglfwSetWindowSizeCallback setWindowSizeCallback; 258 259 pfglfwGetVideoModes getVideoModes; 260 pfglfwGetDesktopMode getDesktopMode; 261 262 pfglfwPollEvents pollEvents; 263 pfglfwGetKey getKey; 264 pfglfwGetMouseButton getMouseButton; 265 pfglfwGetMousePos getMousePos; 266 pfglfwSetMousePos setMousePos; 267 pfglfwGetMouseWheel getMouseWheel; 268 pfglfwSetMouseWheel setMouseWheel; 269 pfglfwSetKeyCallback setKeyCallback; 270 pfglfwSetCharCallback setCharCallback; 271 pfglfwSetMouseButtonCallback setMouseButtonCallback; 272 pfglfwSetMousePosCallback setMousePosCallback; 273 pfglfwSetMouseWheelCallback setMouseWheelCallback; 274 275 pfglfwGetJoystickParam getJoystickParam; 276 pfglfwGetJoystickPos getJoystickPos; 277 pfglfwGetJoystickButtons getJoystickButtons; 278 279 pfglfwGetTime getTime; 280 pfglfwSetTime setTime; 281 pfglfwSleep sleep; 282 283 pfglfwExtensionSupported extensionSupported; 284 pfglfwGetProcAddress getProcAddress; 285 pfglfwGetGLVersion getGLVersion; 286 287 pfglfwCreateThread createThread; 288 pfglfwDestroyThread destroyThread; 289 pfglfwWaitThread waitThread; 290 pfglfwGetThreadID getThreadID; 291 pfglfwCreateMutex createMutex; 292 pfglfwDestroyMutex destroyMutex; 293 pfglfwLockMutex lockMutex; 294 pfglfwUnlockMutex unlockMutex; 295 pfglfwCreateCond createCond; 296 pfglfwDestroyCond destroyCond; 297 pfglfwWaitCond waitCond; 298 pfglfwSignalCond signalCond; 299 pfglfwBroadcastCond broadcastCond; 300 pfglfwGetNumberOfProcessors getNumberOfProcessors; 301 302 pfglfwEnable enable; 303 pfglfwDisable disable; 304 305 pfglfwReadImage readImage; 306 pfglfwFreeImage freeImage; 307 pfglfwLoadTexture2D loadTexture2D; 308 309 private void load() 310 { 311 init = cast(pfglfwInit) getProc("glfwInit"); 312 terminate = cast(pfglfwTerminate) getProc("glfwTerminate"); 313 getVersion = cast(pfglfwGetVersion) getProc("glfwGetVersion"); 314 315 openWindow = cast(pfglfwOpenWindow) getProc("glfwOpenWindow"); 316 openWindowHint = cast(pfglfwOpenWindowHint) getProc("glfwOpenWindowHint"); 317 closeWindow = cast(pfglfwCloseWindow) getProc("glfwCloseWindow"); 318 setWindowTitle = cast(pfglfwSetWindowTitle) getProc("glfwSetWindowTitle"); 319 getWindowSize = cast(pfglfwGetWindowSize) getProc("glfwGetWindowSize"); 320 setWindowSize = cast(pfglfwSetWindowSize) getProc("glfwSetWindowSize"); 321 setWindowPos = cast(pfglfwSetWindowPos) getProc("glfwSetWindowPos"); 322 iconifyWindow = cast(pfglfwIconifyWindow) getProc("glfwIconifyWindow"); 323 restoreWindow = cast(pfglfwRestoreWindow) getProc("glfwRestoreWindow"); 324 swapBuffers = cast(pfglfwSwapBuffers) getProc("glfwSwapBuffers"); 325 swapInterval = cast(pfglfwSwapInterval) getProc("glfwSwapInterval"); 326 getWindowParam = cast(pfglfwGetWindowParam) getProc("glfwGetWindowParam"); 327 setWindowSizeCallback = cast(pfglfwSetWindowSizeCallback) getProc("glfwSetWindowSizeCallback"); 328 329 getVideoModes = cast(pfglfwGetVideoModes) getProc("glfwGetVideoModes"); 330 getDesktopMode = cast(pfglfwGetDesktopMode) getProc("glfwGetDesktopMode"); 331 332 pollEvents = cast(pfglfwPollEvents) getProc("glfwPollEvents"); 333 getKey = cast(pfglfwGetKey) getProc("glfwGetKey"); 334 getMouseButton = cast(pfglfwGetMouseButton) getProc("glfwGetMouseButton"); 335 getMousePos = cast(pfglfwGetMousePos) getProc("glfwGetMousePos"); 336 setMousePos = cast(pfglfwSetMousePos) getProc("glfwSetMousePos"); 337 getMouseWheel = cast(pfglfwGetMouseWheel) getProc("glfwGetMouseWheel"); 338 setMouseWheel = cast(pfglfwSetMouseWheel) getProc("glfwSetMouseWheel"); 339 setKeyCallback = cast(pfglfwSetKeyCallback) getProc("glfwSetKeyCallback"); 340 setCharCallback = cast(pfglfwSetCharCallback) getProc("glfwSetCharCallback"); 341 setMouseButtonCallback = cast(pfglfwSetMouseButtonCallback) getProc("glfwSetMouseButtonCallback"); 342 setMousePosCallback = cast(pfglfwSetMousePosCallback) getProc("glfwSetMousePosCallback"); 343 setMouseWheelCallback = cast(pfglfwSetMouseWheelCallback) getProc("glfwSetMouseWheelCallback"); 344 345 getJoystickParam = cast(pfglfwGetJoystickParam) getProc("glfwGetJoystickParam"); 346 getJoystickPos = cast(pfglfwGetJoystickPos) getProc("glfwGetJoystickPos"); 347 getJoystickButtons = cast(pfglfwGetJoystickButtons) getProc("glfwGetJoystickButtons"); 348 349 getTime = cast(pfglfwGetTime) getProc("glfwGetTime"); 350 setTime = cast(pfglfwSetTime) getProc("glfwSetTime"); 351 sleep = cast(pfglfwSleep) getProc("glfwSleep"); 352 353 extensionSupported = cast(pfglfwExtensionSupported) getProc("glfwExtensionSupported"); 354 getProcAddress = cast(pfglfwGetProcAddress) getProc("glfwGetProcAddress"); 355 getGLVersion = cast(pfglfwGetGLVersion) getProc("glfwGetGLVersion"); 356 357 createThread = cast(pfglfwCreateThread) getProc("glfwCreateThread"); 358 destroyThread = cast(pfglfwDestroyThread) getProc("glfwDestroyThread"); 359 waitThread = cast(pfglfwWaitThread) getProc("glfwWaitThread"); 360 getThreadID = cast(pfglfwGetThreadID) getProc("glfwGetThreadID"); 361 createMutex = cast(pfglfwCreateMutex) getProc("glfwCreateMutex"); 362 destroyMutex = cast(pfglfwDestroyMutex) getProc("glfwDestroyMutex"); 363 lockMutex = cast(pfglfwLockMutex) getProc("glfwLockMutex"); 364 unlockMutex = cast(pfglfwUnlockMutex) getProc("glfwUnlockMutex"); 365 createCond = cast(pfglfwCreateCond) getProc("glfwCreateCond"); 366 destroyCond = cast(pfglfwDestroyCond) getProc("glfwDestroyCond"); 367 waitCond = cast(pfglfwWaitCond) getProc("glfwWaitCond"); 368 signalCond = cast(pfglfwSignalCond) getProc("glfwSignalCond"); 369 broadcastCond = cast(pfglfwBroadcastCond) getProc("glfwBroadcastCond"); 370 getNumberOfProcessors = cast(pfglfwGetNumberOfProcessors) getProc("glfwGetNumberOfProcessors"); 371 372 enable = cast(pfglfwEnable) getProc("glfwEnable"); 373 disable = cast(pfglfwDisable) getProc("glfwDisable"); 374 375 readImage = cast(pfglfwReadImage) getProc("glfwReadImage"); 376 freeImage = cast(pfglfwFreeImage) getProc("glfwFreeImage"); 377 loadTexture2D = cast(pfglfwLoadTexture2D) getProc("glfwLoadTexture2D"); 378 } 379 379 } 380 380 else // version(default) 381 381 { 382 pfglfwInitglfwInit;383 pfglfwTerminateglfwTerminate;384 pfglfwGetVersionglfwGetVersion;385 386 pfglfwOpenWindowglfwOpenWindow;387 pfglfwOpenWindowHintglfwOpenWindowHint;388 pfglfwCloseWindowglfwCloseWindow;389 pfglfwSetWindowTitleglfwSetWindowTitle;390 pfglfwGetWindowSizeglfwGetWindowSize;391 pfglfwSetWindowSizeglfwSetWindowSize;392 pfglfwSetWindowPosglfwSetWindowPos;393 pfglfwIconifyWindowglfwIconifyWindow;394 pfglfwRestoreWindowglfwRestoreWindow;395 pfglfwSwapBuffersglfwSwapBuffers;396 pfglfwSwapIntervalglfwSwapInterval;397 pfglfwGetWindowParamglfwGetWindowParam;398 pfglfwSetWindowSizeCallbackglfwSetWindowSizeCallback;399 400 pfglfwGetVideoModesglfwGetVideoModes;401 pfglfwGetDesktopModeglfwGetDesktopMode;402 pfglfwPollEventsglfwPollEvents;403 pfglfwGetKeyglfwGetKey;404 pfglfwGetMouseButtonglfwGetMouseButton;405 pfglfwGetMousePosglfwGetMousePos;406 pfglfwSetMousePosglfwSetMousePos;407 pfglfwGetMouseWheelglfwGetMouseWheel;408 pfglfwSetMouseWheelglfwSetMouseWheel;409 pfglfwSetKeyCallbackglfwSetKeyCallback;410 pfglfwSetCharCallbackglfwSetCharCallback;411 pfglfwSetMouseButtonCallbackglfwSetMouseButtonCallback;412 pfglfwSetMousePosCallbackglfwSetMousePosCallback;413 pfglfwSetMouseWheelCallbackglfwSetMouseWheelCallback;414 415 pfglfwGetJoystickParamglfwGetJoystickParam;416 pfglfwGetJoystickPosglfwGetJoystickPos;417 pfglfwGetJoystickButtonsglfwGetJoystickButtons;418 419 pfglfwGetTimeglfwGetTime;420 pfglfwSetTimeglfwSetTime;421 pfglfwSleepglfwSleep;422 423 pfglfwExtensionSupportedglfwExtensionSupported;424 pfglfwGetProcAddressglfwGetProcAddress;425 pfglfwGetGLVersionglfwGetGLVersion;426 427 pfglfwCreateThreadglfwCreateThread;428 pfglfwDestroyThreadglfwDestroyThread;429 pfglfwWaitThreadglfwWaitThread;430 pfglfwGetThreadIDglfwGetThreadID;431 pfglfwCreateMutexglfwCreateMutex;432 pfglfwDestroyMutexglfwDestroyMutex;433 pfglfwLockMutexglfwLockMutex;434 pfglfwUnlockMutexglfwUnlockMutex;435 pfglfwCreateCondglfwCreateCond;436 pfglfwDestroyCondglfwDestroyCond;437 pfglfwWaitCondglfwWaitCond;438 pfglfwSignalCondglfwSignalCond;439 pfglfwBroadcastCondglfwBroadcastCond;440 pfglfwGetNumberOfProcessorsglfwGetNumberOfProcessors;441 442 pfglfwEnableglfwEnable;443 pfglfwDisableglfwDisable;444 445 pfglfwReadImageglfwReadImage;446 pfglfwFreeImageglfwFreeImage;447 pfglfwLoadTexture2DglfwLoadTexture2D;448 449 private void load()450 { 451 glfwInit= cast(pfglfwInit) getProc("glfwInit");452 glfwTerminate= cast(pfglfwTerminate) getProc("glfwTerminate");453 glfwGetVersion= cast(pfglfwGetVersion) getProc("glfwGetVersion");454 455 glfwOpenWindow= cast(pfglfwOpenWindow) getProc("glfwOpenWindow");456 glfwOpenWindowHint = cast(pfglfwOpenWindowHint) getProc("glfwOpenWindowHint");457 glfwCloseWindow = cast(pfglfwCloseWindow) getProc("glfwCloseWindow");458 glfwSetWindowTitle = cast(pfglfwSetWindowTitle) getProc("glfwSetWindowTitle");459 glfwGetWindowSize = cast(pfglfwGetWindowSize) getProc("glfwGetWindowSize");460 glfwSetWindowSize = cast(pfglfwSetWindowSize) getProc("glfwSetWindowSize");461 glfwSetWindowPos = cast(pfglfwSetWindowPos) getProc("glfwSetWindowPos");462 glfwIconifyWindow = cast(pfglfwIconifyWindow) getProc("glfwIconifyWindow");463 glfwRestoreWindow = cast(pfglfwRestoreWindow) getProc("glfwRestoreWindow");464 glf
