| 1 |
================================================================================ |
|---|
| 2 |
Derelict |
|---|
| 3 |
================================================================================ |
|---|
| 4 |
|
|---|
| 5 |
-------------------------------------------------------------------------------- |
|---|
| 6 |
INFO |
|---|
| 7 |
-------------------------------------------------------------------------------- |
|---|
| 8 |
Derelict is (or will be) a collection of D packages which provide access to |
|---|
| 9 |
several C libraries useful to multimedia/graphic applications (games, image |
|---|
| 10 |
editors, video playback software, etc...). Each individual package is designed |
|---|
| 11 |
to stand alone without introducing any extra dependencies other than those |
|---|
| 12 |
of D's Phobos library and the shared library the package interfaces with. In |
|---|
| 13 |
fact, Derelict completely eliminates the dependency on import libraries for |
|---|
| 14 |
each package by loading the shared libraries dynamically. Unfortuantely, there |
|---|
| 15 |
is one tiny drawback that prevents Derelict from loading shared libraries |
|---|
| 16 |
automatically (something I would ultimately like it to do). |
|---|
| 17 |
|
|---|
| 18 |
While it is possible in D to make use of module constructors to load system |
|---|
| 19 |
resources automatically, DerelictGL does not do this at present. The reason is |
|---|
| 20 |
that it is currently not possible to catch exceptions thrown from a module |
|---|
| 21 |
constructor when your application entry point is the main() method. For Win32 |
|---|
| 22 |
GUI apps this is not a problem, since D requires you to manually initialize the |
|---|
| 23 |
module constructors yourself when using WinMain as an entry point, thereby allowing |
|---|
| 24 |
you to catch any exceptions thrown from a module constructor. When you have a main() |
|---|
| 25 |
entry point however, the module constructors are initialized by the runtime, giving |
|---|
| 26 |
you no chance to catch any exceptions they throw. |
|---|
| 27 |
|
|---|
| 28 |
If the Derelict packages loaded the shared libs in their module contructors, |
|---|
| 29 |
applications with a main() entry point would not be able to handle the case of |
|---|
| 30 |
missing or corrupted shared libs in an application-specific manner. This would |
|---|
| 31 |
defeat the whole purpose of Derelict's creation. So each Derelict package |
|---|
| 32 |
requires you to manually call a load function (named accordingly for the |
|---|
| 33 |
package) which loads the shared lib and all exported functions. If there ever |
|---|
| 34 |
becomes a way to handle exceptions thrown by module constructors when using a |
|---|
| 35 |
main() entry point, then this requirement will be eliminated. |
|---|
| 36 |
|
|---|
| 37 |
Note that there is no equivalent requirement to unload shared libs in Derelict, |
|---|
| 38 |
as this is handled automatically with module destructors. |
|---|
| 39 |
|
|---|
| 40 |
Derelict packages may be used independently of each other, or collectively. |
|---|
| 41 |
|
|---|
| 42 |
-------------------------------------------------------------------------------- |
|---|
| 43 |
DERELICT 1.0 GOALS |
|---|
| 44 |
-------------------------------------------------------------------------------- |
|---|
| 45 |
For a 1.0 release, Derelict will include the following packages: |
|---|
| 46 |
|
|---|
| 47 |
DerelictGL - OpenGL interface |
|---|
| 48 |
DerelictGLU - GLU interface |
|---|
| 49 |
DerelictSDL - SDL interface |
|---|
| 50 |
DerelictAL - OpenAL interface |
|---|
| 51 |
DerelictDX - DirectX 5 ~ 9 intefaces |
|---|
| 52 |
DerelictOGG - libogg interface |
|---|
| 53 |
DerelictVorbis -libvorbis interface |
|---|
| 54 |
DerelictPNG - libpng interface |
|---|
| 55 |
DerelictJPEG - libjpeg interface |
|---|
| 56 |
|
|---|
| 57 |
I am sure that after 1.0, Derelict will continue to grow with new packages. |
|---|
| 58 |
|
|---|
| 59 |
-------------------------------------------------------------------------------- |
|---|
| 60 |
LICENSE |
|---|
| 61 |
-------------------------------------------------------------------------------- |
|---|
| 62 |
Each individual package in Derelict is released under the same license as the |
|---|
| 63 |
library it interfaces with. |
|---|
| 64 |
|
|---|
| 65 |
-- |
|---|
| 66 |
Mike Parker (Aldacron) |
|---|