Changeset 197
- Timestamp:
- 10/23/06 14:19:46 (2 years ago)
- Files:
-
- trunk/DerelictGLFW (deleted)
- trunk/docs/derelictify.html (modified) (1 diff)
- trunk/docs/glfw.html (deleted)
- trunk/docs/index_a.html (modified) (2 diffs)
- trunk/docs/selective.html (modified) (3 diffs)
- trunk/docs/toc.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/docs/derelictify.html
r195 r197 54 54 maintain. 55 55 </p> 56 <div class="note">Currently, DerelictGLFW declares all types, macros and functions57 in a single module. This will be changing in the near future, so do not do this58 with your own packages. You will also notice that DerelictSDLImage, DerelictSDLMixer,59 DerelictSDLNet, and DerelictSDLttf all use the single module approach. These60 projects are considered extensions of DerelictSDL. If you were to copy each of61 them to the DerelictSDL package tree, they would match the existing SDL modules.</div>62 56 63 57 <h4>Macros</h4> trunk/docs/index_a.html
r195 r197 20 20 <li><a href="http://www.opengl.org/">OpenGL</a></li> 21 21 <li><a href="http://rush3d.com/reference/opengl-bluebook-1.0/ch06.html">OpenGL Utility Library (GLU)</a></li> 22 <li><a href="http://www.glfw.sourcforge.net/">GLFW</a>23 22 <li><a href="http://openil.sourceforge.net/">DevIL, ILU, and ILUT</a></li> 24 23 <li><a href="http://www.libsdl.org/">SDL</a></li> … … 175 174 <li><a href="gl.html">DerelictGL</a></li> 176 175 <li><a href="glfw.html">DerelictGLFW</a></li> 177 <li><a href="glu.html">DerelictGLU</a></li>178 176 <li><a href="il.html">DerelictIL</a></li> 179 177 <li><a href="ilu.html">DerelictILU</a></li> trunk/docs/selective.html
r195 r197 33 33 and the name of the missing symbol as arguments. If a callback has not been set, 34 34 then a <tt>SharedLibProcLoadException</tt> is thrown instead. Callbacks can be 35 set using the function <tt>Derelict_SetMissingProcCallback</tt>. Following is a 36 complete example of using this feature to load a version of GLFW that does not 37 have the function <tt>glfwSetTime</tt> compiled in (a known issue with a precompiled 38 GLFW 2.4.2 shared library that was available on the GLFW homepage). 35 set using the function <tt>Derelict_SetMissingProcCallback</tt>. 36 </p> 37 <p> 38 Following is a complete example of using this feature. Older versions of SDL 39 did not include functions to test for CPU capabilities. 40 <a href="sdl.html">DerelictSDL</a> always attempts to load those functions since 41 they are present in the latest versions. It is possible to load older versions 42 of the SDL shared library by ignoring the CPU related functions. This example 43 demonstrates how to do that. 39 44 </p> 40 45 41 46 <pre> 42 47 import derelict.util.exception; // MissingProcCallback interface declared here 43 import derelict. glfw.glfw;48 import derelict.sdl.sdl; 44 49 45 50 import std.string; … … 47 52 bool myMissingProcCallback(char[] libName, char[] procName) 48 53 { 49 50 if(procName.cmp("glfwSetTime") == 0) // some glfw shared libs are missing glfwSetTime 51 return true; // continue loading 52 53 return false; // throw an exception for any other missing functions 54 // there are 8 functions as part of SDL's CPU interface - test for them all. 55 // If the procName matches any one of them, return true to ignore the missing 56 // function. 57 if( procName.cmp("SDL_HasRDTSC") == 0 || 58 procName.cmp("SDL_HasMMX") == 0 || 59 procName.cmp("SDL_HasMMXExt") == 0 || 60 procName.cmp("SDL_Has3DNow") == 0 || 61 procName.cmp("SDL_Has3DNowExt") == 0 || 62 procName.cmp("SDL_HasSSE") == 0 || 63 procName.cmp("SDL_HasSSE2") == 0 || 64 procName.cmp("SDL_HasAltiVec") == 0) 65 return true; // ignore the error and throw no exception 66 67 // a function other than one of those above failed to load - return false 68 // to indicate that an exception should be thrown. 69 return false; 54 70 } 55 71 … … 58 74 // the callback must be set before loading the library(ies) you want the callback to handle 59 75 Derelict_SetMissingProcCallback(&myMissingProcCallback); 60 Derelict GLFW.load();76 DerelictSDL.load(); 61 77 } 62 78 </pre> trunk/docs/toc.html
r195 r197 20 20 <li><a target="view_frame" href="al.html">DerelictAL</a></li> 21 21 <li><a target="view_frame" href="gl.html">DerelictGL</a></li> 22 <li><a target="view_frame" href="glfw.html">DerelictGLFW</a></li>23 22 <li><a target="view_frame" href="glu.html">DerelictGLU</a></li> 24 23 <li><a target="view_frame" href="il.html">DerelictIL</a></li>
