www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Derelict 0.1 Released

reply Mike Parker <aldacron71 yahoo.com> writes:
Derelict 0.1 provides D bindings for OpenGL, GLU, and SDL. I have also 
incorporated Joel Anderson's GLee port. The difference between these and 
the other OGL/SDL bindings that are out there is that the shared 
libraries are loaded manually. This allows the application to act 
appropriately if a library is corrupt or missing, without the user 
seeing that nasty missing DLL message on Windows. Currently, only the 
Windows version is available.

Future versions of Derelict will include OpenAL, DirectX and more. You 
can download the latest version and find out more about the project in 
the Derelict forums at dsource.org.
Jun 14 2004
parent reply "Gifford Hesketh" <gifford.hesketh savvis.net> writes:
I know next to nothing about SDL; is there a way to use SDL_WaitEvent()
instead of SDL_PollEvent() to make the event loop not consume as much CPU
time as possible ?

"Mike Parker" <aldacron71 yahoo.com> wrote in message
news:cam5sk$sfh$1 digitaldaemon.com...
 Derelict 0.1 provides D bindings for OpenGL, GLU, and SDL. I have also
 incorporated Joel Anderson's GLee port. The difference between these and
 the other OGL/SDL bindings that are out there is that the shared
 libraries are loaded manually. This allows the application to act
 appropriately if a library is corrupt or missing, without the user
 seeing that nasty missing DLL message on Windows. Currently, only the
 Windows version is available.

 Future versions of Derelict will include OpenAL, DirectX and more. You
 can download the latest version and find out more about the project in
 the Derelict forums at dsource.org.

Jun 15 2004
parent Mike Parker <aldacron71 yahoo.com> writes:
Gifford Hesketh wrote:
 I know next to nothing about SDL; is there a way to use SDL_WaitEvent()
 instead of SDL_PollEvent() to make the event loop not consume as much CPU
 time as possible ?

Ahem, not to be rude, but that sort of question really doesn't belong here. SDL related questions should go to the SDL mailing list (which you can find somewhere at http://www.libsdl.org). I'll give a quick answer anyway since I can squeeze something D-ish into it <g>. In a real time app, you *want* to be calling SDL_PollEvent each frame. SDL_WaitEvent is more useful for apps that only update based upon user input. If your app is real time (which I assume it is), yielding the remainder of your timeslice at the end of each frame will prevent you from hogging the cpu when you don't really need to. In D, you can import std.thread and use the static method Thread.yield().
Jun 15 2004