root/trunk/docs/sdlimg.html

Revision 255, 2.1 kB (checked in by aldacron, 2 years ago)

[Docs]
* corrected several spelling mistakes
* tweaked the wording of a few passages to make for clarity or to just make them more proper
* fixed a couple of glaring bugs that caused some bits of text to be invisible
* deleted a some things that were no longer relevant

  • Property svn:mime-type set to text/html
  • Property svn:mim-type set to text/html
Line 
1 <html lang="en">
2 <head>
3     <title>DerelictSDLImage</title>
4     <link rel="stylesheet" type="text/css" href="styles.css">
5 </head>
6 <body>
7 <hr>
8 <hr>
9 <h2 align="center">DerelictSDLImage</h2>
10 <hr>
11 <hr>
12 <h3>Introduction</h3>
13 DerelictSDLImage is a D binding to Sam Lantinga's
14 <a href="http://www.libsdl.org/projects/SDL_image/">SDL_image</a>, a cross
15 platform image loading library designed to be used together with
16 <a href="http://www.libsdl.org/">SDL</a>.
17 <p>
18 <div class="important">This version of DerelictSDLImage requires SDL_image 1.2.3 or later.</div>
19 </p>
20 <h3>Using</h3>
21 <ol>
22 <li>Always make sure the DerelictSDLImage source modules are available on your import
23 path.</li>
24 <li>In modules that make use of DerelictSDLImage, you will need to import the
25 derelict.SDLImage.SDLImage module.</li>
26 <li>Before calling any SDLImage functions, you need to make a call to <tt>DerelictSDLImage.load</tt>.
27 This will load the shared library.</li>
28 </ol>
29
30 <p>
31 The following is a complete program that loads DerelictSDLImage:
32 </p>
33
34 <pre>
35 import derelict.sdl.image;
36
37 void main()
38 {
39     DerelictSDLImage.load();
40    
41     // now you can call SDL_image functions
42 }
43 </pre>
44 <p>
45 As with other Derelict packages, DerelictSDLImage will throw an exception if an error
46 occurs while loading the shared library. For more information on Derelict
47 exceptions, see the documentation for
48 <a href="loading.html">Loading/Unloading Shared Libraries</a>.
49 </p>
50 <div class="note">In any module that calls SDL_image functions, you will also need
51 to import derelict.sdl.sdl. This is not required to load the library, as shown
52 above.</div>
53
54 <p>
55 Finally, the method <tt>DerelictSDLImage.unload()</tt> is provided for convenience. In normal
56 practice you do not need to call this function, as Derelict will unload the library
57 automatically when the app exits. You generally should only use this function if
58 you need to unload DerelictSDL while the application is running.
59 </p>
60
61 <h3>Dependencies</h3>
62 <a href="util.html">DerelictUtil</a>
63 <br /><a href="sdl.html">DerelictSDL</a>
64
65 </body>
66 </html>
Note: See TracBrowser for help on using the browser.