Changeset 108
- Timestamp:
- 05/28/05 00:27:56 (3 years ago)
- Files:
-
- trunk/DerelictGL/README (modified) (1 diff)
- trunk/DerelictGLFW/README (modified) (4 diffs)
- trunk/DerelictGLU/README (modified) (1 diff)
- trunk/docs/al.html (modified) (3 diffs)
- trunk/docs/build.html (added)
- trunk/docs/gl.html (modified) (3 diffs)
- trunk/docs/glfw.html (added)
- trunk/docs/glu.html (added)
- trunk/docs/index.html (modified) (4 diffs)
- trunk/docs/loading.html (modified) (1 diff)
- trunk/docs/sdl.html (added)
- trunk/docs/selective.html (modified) (1 diff)
- trunk/docs/util.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/DerelictGL/README
r105 r108 20 20 21 21 1) ensure that both dmd and gcc are on your path 22 2) from a command prompt, cd to <derelict_dir>/Derelict FL22 2) from a command prompt, cd to <derelict_dir>/DerelictGL 23 23 3) type 'make -fMakefule.linux' or 'make -fMakefule.linux all' to build libderelictGL.a 24 24 4) optionally type 'make -fMakefule.linux clean' to delete all object files OR trunk/DerelictGLFW/README
r105 r108 1 ================================================================= 1 ================================================================================ 2 2 DerelictGLFW 3 ================================================================= 3 ================================================================================ 4 4 5 DerelictGLFW is a D interface to the GLFW programming framework by Marcus Geelnard. GLFW is designed to be a free, open source, portable framework for OpenGL application development. The Derelict interface to this framework allows you to dynamically load the library into your program, negating the need to link with it directly. Like the other Derelict libraries, this also allows you to handle the case where the GLFW shared library is not available on the user's machine. 6 7 Currently DerelictGLFW supports both Win32 and Linux. Note that the Linux version requires GLFW 2.4.2 (see glfw.sourceforge.net). You will need to compile the GLFW source to create a local copy of the shared libraries. Since GLFW currently does not include a shared library build process on Linux, a few modifications to the GLFW source will be necessary to get things working on that platform. GLFW includes a glfw.dll for win32 pre-built. 8 9 ----------------------------------------------------------------- 10 USING 11 ----------------------------------------------------------------- 12 In order to use DerelictGLFW in your project, you must first add the Derelict source path to your compile command line with dmd's -I switch (-I<derelict_dir>/DerelictGLFW). You will need to can include the source/object files in your project's makefile ; or just build the DerelictGLFW makefile to produce derelictGLFW.lib (derelictGLFW.a on Linux) and link this library in with your D project. 13 14 If you find that you use DerelictGLFW or any of the other Derelict libraries often, you may want to add the import path to your global config file for dmd (sc.ini on Win32; dmd.conf on Linux). This allows the compiler to find these imports automatically whenever the compile process is initiated removing the necessity to include the "-I" on every build. 15 16 Here is a code example showing how to import the derelict.glfw module: 17 18 +++++++++++++++++++++++++++++ CODE ++++++++++++++++++++++++++++++ 19 20 import derelict.glfw.glfw; 21 22 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 23 24 As in all the Derelict modules, you need to make a call to a loader function called DerelictGLU_Load prior to using any of the GLFW functions. This function loads the shared library and its associated functions. Encasing this call in a try/catch block allows to handle cases where the library does not load: 25 26 +++++++++++++++++++++++++++++ CODE ++++++++++++++++++++++++++++++ 27 28 // load the shared library - try/catch block is optional 29 30 try 31 { 32 DerelictGLFW_Load() 33 } 34 catch(Exception e) 35 { 36 ... 37 } 38 39 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 40 41 If the call is successful, you now may use all glfw functions. Note that if you also want to call OpenGL functions, you must also call DerelictGL_Load() if you are using the Derelict libraries. Or you may use an independent OpenGL implementation. There is no requirement to use the DerelictGL and DerelictGLU modules. 42 43 44 -----------------------------------------------------------------BUILDING 45 ----------------------------------------------------------------- 5 -------------------------------------------------------------------------------- 6 BUILDING 7 -------------------------------------------------------------------------------- 46 8 47 9 To build DerelictGLFW on Windows: … … 59 21 60 22 On Linux: 61 62 1) make sure your dmd executable is available and working. (a good place for the dmd package is in /opt/dmd). 63 2) make sure your libphobos.a is suitable installed either in /usr/lib or /usr/lib/local or /home/<name>/lib direcories (if you do not have 'root' access, you will need to install everything somewhere in your home directory). 64 3) cd to <derelict_dir>/DerelictGLFW 65 4) type 'make' or 'make all' to build derelictGLFW.a 66 5) optionally type 'make clean' to delete all object files OR 67 6) optionally type 'make cleanall' to delete all object and lib files. 23 1) ensure that both dmd and gcc are on your path 24 2) from a command prompt, cd to <derelict_dir>/DerelictGLFW 25 3) type 'make' or 'make all' to build derelictGLFW.a 26 4) optionally type 'make clean' to delete all object files OR 27 optionally type 'make cleanall' to delete all object and lib files. 68 28 69 29 ----------------------------------------------------------------- … … 71 31 ----------------------------------------------------------------- 72 32 73 On Windows, simply follow the instructions included with the GLFW 2.4.2 distribuition. You want to use the dll version of the library. The build process is fairly straight forward. Install the glfw.dll in an appropriate directory, typically the same as your application. 33 On Windows, simply follow the instructions included with the GLFW 2.4.2 distribuition. 34 You want to use the dll version of the library. The build process is fairly 35 straight forward. Install the glfw.dll in an appropriate directory, typically 36 the same as your application. 74 37 75 On Linux, since a shared library is not currently part of the package, you will need to modify the generated makefile by following the instructions below. Eventually the GLFW package might be updated with the appropriate changes for shared library creation. As of the now, the GLFW source will also have to be modified to disable CPU detection or the shared library build process will not work: 38 On Linux, since a shared library is not currently part of the package, you will 39 need to modify the generated makefile by following the instructions below. 40 Eventually the GLFW package might be updated with the appropriate changes for 41 shared library creation. For now, the GLFW source will also have to be 42 modified to disable CPU detection or the shared library build process will not work: 76 43 77 1) Install the package (in a 'home' directory if you don not have root privileges). Follow the included GLFW instructions for configuring for your system. The process will generate a Makefile tailored to your linux system. 44 1) Install the package (in a 'home' directory if you don not have root privileges). 45 Follow the included GLFW instructions for configuring for your system. The 46 process will generate a Makefile tailored to your linux system. 78 47 2) 'cd' to the 'glfw-2.4.2/lib/x11' directory. 79 48 3) open x11_time.c and comment out lines 73-76 and save file … … 107 76 6) Then just type make -fMakefile.x11 in this directory 108 77 109 The libglfw.so.2.4.2 library will now be available. It needs to be installed in either a local home directory or a system directory (preferably /usr/local/lib). If you do not have root privileges, you will once again need to install it in your home directory in a place where the system loader can find it. 78 The libglfw.so.2.4.2 library will now be available. It needs to be installed 79 in either a local home directory or a system directory (preferably /usr/local/lib). 80 If you do not have root privileges, you will once again need to install it in 81 your home directory in a place where the system loader can find it. 110 82 111 Further instructions to follow for shared lib installation for system-wide access. This is a little more involved since you have to get ldconfig to re-cache newly installed shared libraries and you also need system level privileges. Preferably, an install script should be created to take care of all these intricacies for the user. 83 Further instructions to follow for shared lib installation for system-wide access. 84 This is a little more involved since you have to get ldconfig to re-cache newly 85 installed shared libraries and you also need system level privileges. Preferably, 86 an install script should be created to take care of all these intricacies for the user. 112 87 113 The complexities above are likely a temporary measure and are designed for those that want to just get the Linux version working. 88 The complexities above are likely a temporary measure and are designed for those 89 who just want to get the Linux version working. trunk/DerelictGLU/README
r105 r108 2 2 DerelictGLU 3 3 ================================================================================ 4 DerelictGLU is a D package which allows you to use glu in your D programs5 without the need to link to an import library. This gives you control over how6 to handle the case where the glu shared library is not available on the7 user's machine.8 9 Please note that the Linux version is not yet implemented. Anyone who would like10 to do so please let me know in the forum!11 12 --------------------------------------------------------------------------------13 USING14 --------------------------------------------------------------------------------15 You can use DerelictGLU in your project by first adding the Derelict source path16 to your compile command line with the -I switch (-I<derelict_dir>/DerelictGLU) and17 either by adding all the source/obj files to your makefile, or by building and18 linking with derelictGLU.lib (see the section entitled 'BUILDING' below for build19 instructions).20 21 In your code, you need to import the derelict.opengl.glu module.22 23 ++++++++++++++++++++++++++ CODE +++++++++++++++++++++++++++++++++++++++++++++24 25 import derelict.opengl.glu;26 27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++28 29 Before you attemtp to call any GLU functions, you need to make a call to30 DerelictGLU_Load. This will load the shared library.31 32 ++++++++++++++++++++++++++ CODE +++++++++++++++++++++++++++++++++++++++++++++33 34 // load the shared library - the try...catch block is optional of course35 try36 {37 DerelictGLU_Load();38 }39 catch(Exception e)40 {41 ...42 }43 44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++45 46 From that point you can call glu functions as normal.47 48 49 4 -------------------------------------------------------------------------------- 50 5 BUILDING 51 6 -------------------------------------------------------------------------------- 7 Before building, ensure you have DerelictUtil and DerelictGL on your system. Both 8 are required by DerelictGLU imports and links with both packages. 52 9 53 10 -------------------------------------------------------------------------------- trunk/docs/al.html
r103 r108 1 <html >1 <html lang="en"> 2 2 <head><title>DerelictAL</title></head> 3 3 <body> … … 51 51 <p> 52 52 As with other Derelict packages, DerelictAL will throw an exception if an error 53 occurs. For more information on Derelict exceptions, see the documentation for 53 occurs while loading the shared library. For more information on Derelict 54 exceptions, see the documentation for 54 55 <a href="loading.html">Loading/Unloading Shared Libraries</a>.</p> 55 56 … … 61 62 62 63 <h3>Building</h3> 64 Before building, ensure you have DerelictUtil on your system. It is required by 65 DerelictSDL for importing and linking. 66 <p> 67 To build DerelictAL on Windows: 68 </p><p><ol> 69 <li> ensure that Derek Parnell's Build utility is on your path OR that the path 70 to it is configured in buildconfig.bat in your toplevel Derelict directory 71 (henceforth known as < derelict_dir >). See the documentation about 72 <a href="build.html">Derek Parnell's Build Utility</a> for more information on 73 setting up Build and configuring Derelict's Build scripts.</li> 74 <li>from a command prompt, cd to < derelict_dir >\DerelictAL</li> 75 <li>type buildme.bat</li> 76 <li>when the build completes, your command prompt will be back in < derelict_dir >, 77 and the file derelictAL.lib will be located in < derelict_dir >\lib.</li> 78 </ol> 79 <p> 80 On Linux: 81 </p> 82 <p><ol> 83 <li>ensure that both dmd and gcc are on your path</li> 84 <li>from a command prompt, cd to < derelict_dir >/DerelictAL</li> 85 <li>type 'make' or 'make all' to build derelictAL.a</li> 86 <li>optionally type 'make clean' to delete all object files OR 87 optionally type 'make cleanall' to delete all object and lib files.</li> 88 </ol></p> 63 89 64 For information on how to use the supplied Makefiles to build DerelictAL, see the65 supplied <a href="../DerelictAL/README">README</a> in the DerelictAL directory.66 90 67 91 </body> trunk/docs/gl.html
r103 r108 1 <html >1 <html lang="en"> 2 2 <head><title>DerelictGL</title></head> 3 3 <body> … … 28 28 </p> 29 29 30 <p><hr> 31 <pre> 30 <p><hr><pre> 32 31 import derelict.opengl.gl; 33 32 … … 38 37 // now you can call OpenGL functions 39 38 } 40 </pre> 41 <hr></p> 39 </pre><hr></p> 42 40 43 41 44 42 <p> 45 43 As with other Derelict packages, DerelictGL will throw an exception if an error 46 occurs . For more information on Derelict exceptions, see the documentation for47 <a href="loading.html">Loading/Unloading Shared Libraries</a>.</p> 48 49 < p>44 occurs while loading the shared library. For more information on Derelict 45 exceptions, see the documentation for 46 <a href="loading.html">Loading/Unloading Shared Libraries</a>. 47 </p><p> 50 48 Finally, the function DerelictGL_Unload is provided for convenience. In normal 51 49 practice you do not need to call this function, as Derelict will unload the library 52 50 automatically when the app exits. You generally should only use this function if 53 51 you need to unload DerelictGL while the application is running. 52 </p> 54 53 55 54 <h3>Building</h3> 56 57 For information on how to use the supplied Makefiles to build DerelictGL, see the 58 supplied <a href="../DerelictGL/README">README</a> in the DerelictGL directory. 55 Before building, ensure you have DerelictUtil on your system. It is required by 56 DerelictGL for importing and linking. 57 <p> 58 To build DerelictGL on Windows: 59 </p><p><ol> 60 <li> ensure that Derek Parnell's Build utility is on your path OR that the path 61 to it is configured in buildconfig.bat in your toplevel Derelict directory 62 (henceforth known as < derelict_dir >). See the documentation about 63 <a href="build.html">Derek Parnell's Build Utility</a> for more information on 64 setting up Build and configuring Derelict's Build scripts.</li> 65 <li>from a command prompt, cd to < derelict_dir >\DerelictGL</li> 66 <li>type buildme.bat</li> 67 <li>when the build completes, your command prompt will be back in < derelict_dir >, 68 and the file derelictGL.lib will be located in < derelict_dir >\lib.</li> 69 </ol> 70 <p> 71 On Linux: 72 </p> 73 <p><ol> 74 <li>ensure that both dmd and gcc are on your path</li> 75 <li>from a command prompt, cd to < derelict_dir >/DerelictGL</li> 76 <li>type 'make' or 'make all' to build derelictGL.a</li> 77 <li>optionally type 'make clean' to delete all object files OR 78 optionally type 'make cleanall' to delete all object and lib files.</li> 79 </ol></p> 59 80 60 81 </body> trunk/docs/index.html
r103 r108 1 <html >1 <html lang="en"> 2 2 <head><title>Derelict Documentation</title></head> 3 3 … … 12 12 <li><a href="http://www.opengl.org/">OpenGL</a></li> 13 13 <li><a href="http://rush3d.com/reference/opengl-bluebook-1.0/ch06.html">OpenGL Utility Library (GLU)</a></li> 14 <li><a href="http://www.glfw.sourcforge.net">GLFW</a> 14 15 <li><a href="http://www.libsdl.org/">SDL</a></li> 15 16 <li><a href="http://www.libsdl.org/projects/SDL_image/">SDL_image</a></li> … … 88 89 <li><a href="loading.html">Loading/Unloading Shared Libraries</a></li> 89 90 <li><a href="selective.html">Selective Symbol Exceptions</a></li> 91 <li><a href-"build.html">Derek Parnell's Build Utility</a></li> 90 92 <li>Contributors</li> 91 93 <li>Licenses</li> … … 95 97 <li><a href="al.html">DerelictAL</a></li> 96 98 <li><a href="gl.html">DerelictGL</a></li> 97 <li> DerelictGLFW</li>98 <li> DerelictGLU</li>99 <li> DerelictSDL</li>99 <li><a href="glfw.html">DerelictGLFW</a></li> 100 <li><a href="glu.html">DerelictGLU</a></li> 101 <li><a href="sdl.html">DerelictSDL</a></li> 100 102 <li>DerelictSDLImage</li> 101 103 <li>DerelictSDLMixer</li> trunk/docs/loading.html
r102 r108 1 <html >1 <html lang="en"> 2 2 <head><title>Loading/Unloading Shared Libraries</title></head> 3 3 <body> trunk/docs/selective.html
r102 r108 1 <html >1 <html lang="en"> 2 2 <head><title>Selective Symbol Exceptions</title></head> 3 3 <body> trunk/docs/util.html
r102 r108 1 <html >1 <html lang="en"> 2 2 <head><title>DerelictUtil</title></head> 3 3 <body> … … 82 82 be thrown. However, if an invalid shared library handle is passes to this function, 83 83 no exception is thrown and the function is a no-op. 84 85 86 84 </body> 87 85 </html>
