digitalmars.D - Derelict 0.1 Released
- Mike Parker (10/10) Jun 14 2004 Derelict 0.1 provides D bindings for OpenGL, GLU, and SDL. I have also
- Gifford Hesketh (5/15) Jun 15 2004 I know next to nothing about SDL; is there a way to use SDL_WaitEvent()
- Mike Parker (11/14) Jun 15 2004 Ahem, not to be rude, but that sort of question really doesn't belong
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
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
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