FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Latest Changes (Old)
Goto page 1, 2, 3, 4  Next
 
Post new topic   This topic is locked: you cannot edit posts or make replies.     Forum Index -> Derelict
View previous topic :: View next topic  
Author Message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Mon Feb 14, 2005 12:23 am    Post subject: Latest Changes (Old) Reply with quote

Now that I can stickify topics, I will use this thread to post details of the latest changes to the trunk, rather than starting a new topic each time. If you wish to comment on any posts in this thread, please start a new thread for it.

I just added a new load function to each package. It takes the name of a shared library as an argument. So now, instead of accepting the default library names the packages attempt to load, you now can specify your own.In addition to giving more flexibility, this is laying the groundwork for some changes to how the default loaders work on the Linux side.

I also fixed a major bug I can't believe I overlooked so for so long. While all packages were properly handling errors in loading function symbols, DerelictSDL was the only package that actually verified that the library was loaded into memory. This would have caused an Access Violation by the function loader if a library had failed to load. Now, all packages will throw an exception if the call to ExeModule_Load fails.


Last edited by aldacron on Sun Dec 24, 2006 11:47 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Sun Feb 20, 2005 12:19 am    Post subject: Reply with quote

I just added Derelict*_Unload functions to each package. This will allow switching between libraries on the fly if it is needed. It is not mandatory to call the Unload functions if you never need to unload a lib during an application's lifecycle, as the module destructor will still clean up for you.

Now that utility package is looking more attractive than ever. I really would like to eliminate the redundant lib loading/unloading code, and implement some custom exceptions to distinguish between the failure to load a library (library missing/not found) and the failure to load a symbol from a library (library corrupt/incompatible version).
Back to top
View user's profile Send private message Send e-mail
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Sat Feb 26, 2005 11:16 am    Post subject: Reply with quote

I have added the DerelictUtil package and converted all existing packages to use it. See this announcement for details.
Back to top
View user's profile Send private message Send e-mail
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Mon Feb 28, 2005 9:27 pm    Post subject: Reply with quote

* Added more linux makefiles for Derelict sub-projects.

* Tested current build process on linux: all sub-projects verified to build without error using make -fMakefile.linux

* Completed some minor source fixes for linux.
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Thu Mar 03, 2005 12:12 pm    Post subject: Reply with quote

SDL_Quit was incorrectly prototyped to return an int. It now has the correct void return.
Back to top
View user's profile Send private message Send e-mail
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Thu Mar 10, 2005 4:35 am    Post subject: Reply with quote

I added a callback mechanism to DerelictUtil that allows apps to ignore missing library symbols. If the app does not set a callback, an exception of type SharedLibProcLoadException is thrown by default. If a callback is set, it will be called when a symbol fails to load. To let the library continue loading, the callback should return true. Otherwise, returning false will cause the normal exception to be thrown. To use the callback mechanism, import derelict.util.exception and call Derelict_SetMissingProcCallback with a function pointer argument. The prototype for the callback function is:

typedef bool function(char[] libName, char[] procName) MissingProcCallback;

libName is the name of the currently loading library (so that you may use the same callback for multiple libraries and avoid function name conflicts), and procName is the name of the symbol that failed to load. Here's an example:

Code:

import derelict.util.exception;
import derelict.glfw.glfw;

import std.string;

void myMissingProcCallback(char[] libName, char[] procName)
{
 // some glfw shared libs are missing glfwSetTime
   if(procName.cmp("glfwSetTime") == 0)
      return true;   // continue loading

   return false; // throw an exception for any other missing functions
}

void main()
{
   // the callback must be set before loading the library(ies) you want the callback to handle
   Derelict_SetMissingProcCallback(&myMissingProcCallback);
   DerelictGLFW_Load();
}


Remember, callbacks are not required. Also, if you do use a callback then you must set it before loading the library the callback is meant handle:

Code:

// in this case, the callback is called for both GLFW and GL when symbols are missing
Derelict_SetMissingProcCallback(&myMissingProcCallback);
DerelictGLFW_Load();
DerelictGL_Load();

// in this case, the callback is only called for GLFW missing symbols (GL missing symbols throw the exception by default)
DerelictGL_Load();
Derelict_SetMissingProcCallback(&myMissingProcCallback);
DerelictGLFW_Load();


You can 'unset' the callback by passing a null to Derelict_SetMissingProcCallback.
Back to top
View user's profile Send private message Send e-mail
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Wed Mar 16, 2005 7:01 am    Post subject: Reply with quote

A couple of minor changes:

All of the makefiles now pass the -w and -release flags to the compiler by default. The -v flag has been removed to make seeing warnings easier.

Recompiling each package with the -w flag highlighted some implicit int to bit and int to ushort conversions in SDL and SDLNet. I fixed those up with the proper casts, and also changed all bit declarations to use the bool alias instead.

index.html in the doc directory was missing a closing body tag. Added that. I would have gotten started on more documentation, but I just purchased the extended version of Return of the King DVD today and plan to keep busy with the special features for the next few hours Smile
Back to top
View user's profile Send private message Send e-mail
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Mon Mar 28, 2005 7:16 am    Post subject: Reply with quote

New documentation added: Loading/Unloading Shared Libraries (loading.html)

It describes the common *_Load/*_Unload interface all Derelict packages share. There are a couple of links which reference documents I haven't yet implemented. I'd appreciate any feedback on the documentation thus far.

I should note that I will probably change index.html to create a frame set for easier navigation.
Back to top
View user's profile Send private message Send e-mail
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Mon Mar 28, 2005 10:58 pm    Post subject: Reply with quote

I've added two new documentation pages: selective.html covers selective symbol exceptions (the MissingProcCallback feature) and util.html covers the DerelictUtil package.

I've also added a new exception type to DerelictUtil: InvalidSharedLibHandleException. This exception is thrown when calling Derelict_GetProc on a library that has already been unloaded. For general Derelict use, this will never happen as you never interact with derelict.util.loader yourself. It's all hidden behind the Derelict*_Load functions. However, derelict.util.loader can be used outside of derelict to provide functionality beyond that of std.loader. As such, it seemed a good idea to add this exception for those who use it so.

I also went through derelict.util.loader and reduced the amount of platform-specific code. This cuts down on the amount of code duplication when adding new platforms or features.
Back to top
View user's profile Send private message Send e-mail
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Sun Apr 17, 2005 9:50 am    Post subject: Reply with quote

The doc pages for DerelictAL and DerelictGL are now in. The format I am following for each package (DerelictUtil excluded) is to take the USING section from the readme and rewrite it in the new html docs. The BUILDING sections remain in the READMEs, and are linked to from the html docs.

15 mins here, 30 mins there, and this will all be wrapped up eventually.
Back to top
View user's profile Send private message Send e-mail
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Tue May 24, 2005 10:12 am    Post subject: Reply with quote

All Windows Makefiles have been deleted from the trunk. From here on out, Derelict is only set up to be built with Derek Parnell's Build utility on Windows. If you wish to work with Makefiles, you'll have to do your own. The Linux Makefiles will be gone before too much longer (after I get the build scripts in and tested).

The Windows build instructions have been updated in the README for each package to reflect the new build system.

In DerelictGL, the GDI declarations in wgl.d have been split out into wingdi.d (derelict.opengl.wingdi). The wgl module privately imports the wingdi module. This is to avoid any conflicts with other 3rd party D ports of GDI. Now, anyone wishing to set up OpenGL via Win32 API calls rather than through GLFW or SDL and whos is NOT using a 3rd party GDI port will need to import std.c.windows.windows, derelict.opengl.wgl, AND derelict.opengl.wgl to get everything pulled in. If you ARE using a 3rd party GDI port, you will need to additionally import derelict.opengl.wgl.
Back to top
View user's profile Send private message Send e-mail
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Fri May 27, 2005 10:39 pm    Post subject: Doc updates! Reply with quote

Added HTML docs for the following packages: DerelictGLFW, DerelictGLU, and DerelictSDL. The relevant README files now only contain build instructions.

All package docs now contain formatted build instructions (same as the unformatted versions in the READMEs) and dependency information (i.e. all package docs mention the dependency upon DerelictUtil, the docs for DerelictGLU also mention DerelictGL, etc...).

Also, where relevant, I've added additional information specific to each package. For example, the SDL docs now have a big, red, warning about the difference between the SDL_VideoInfo declarations in DerelictSDL and the original C version.
Back to top
View user's profile Send private message Send e-mail
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Sat May 28, 2005 7:26 am    Post subject: More docs Reply with quote

Added html docs for the remaining packages (DerelictSDLImage, DerelictSDLMixer, DerelictSDLNet, DerelictSDLttf).

Added documentation explaining how to obtain Build, how to configure Derelict to build with it, and how to use it to build Derelict.

Added a (probably incomplete) list of contributors and their contributions.

Tweaked the Windows build scripts.
Back to top
View user's profile Send private message Send e-mail
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Mon May 30, 2005 7:11 am    Post subject: Reply with quote

Added basic examples to each package except DerelictUtil.

Corrected a bug in the Selective Symbol Exceptions documentation: the example MissingProcCallback was declared with void signature rather than a bool.

DerelictAL: Removed the declarations and associated loading code for the following functions: alHint, alGetListeneriv, alGetSourceiv. It turns out that these functions are Linux-only. Googling led me to a post in the OpenAL Mailing List archives that alGetListeneriv and alGetSourceiv would be removed in a future version. alHint might get implemented as a dummy function on Windows in the future. Expect that alHint will likely get added back into DerelictAL later.

Removed /bin from the trunk, as it isn't being used by anything.
Back to top
View user's profile Send private message Send e-mail
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Wed Jun 01, 2005 4:07 am    Post subject: Reply with quote

Added a new 'example' directory to the trunk, along with sdl_ex1.d as the first example. It's a port of some code from Jari Komppa's Graphics For Beginners tutorials (tutorial 02 SDL Skeleton And Putting Pixels, used by permission).
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.     Forum Index -> Derelict All times are GMT - 6 Hours
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group