root/trunk/docs/sdlnet.html

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