Graphics Library for D

Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com> Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Mon Jan 6 13:58:00 PST 2014


On Monday, 6 January 2014 at 21:14:16 UTC, Ross Hays wrote:
> That's basically what I have been doing as well. I have a 
> platform.window object that basically just wraps some SDL into 
> a nice interface using properties, but I only allow the one 
> object accessed with platform.window rather than allowing users 
> to create more windows (platform.window (game.platform.window 
> technically) is just created when a game is created.

Yes, and you don't really need all that many properties or event 
listeners for a basic canvas window: width, height, onResize, 
onClose, onPreRedraw, onRedraw (realtime), fullscreen…?

If the filerequester/menubar is optional then it should work out 
for most platforms too with some opportunities for code sharing 
between them:

iOS: runtime in Objective-C++

Android NDK: runtime in C++
http://developer.android.com/tools/sdk/ndk/index.html

Windows Phone 8 Native Code: runtime in C++
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj681687(v=vs.105).aspx

Chrome/Pepper Native Client/webGL: runtime in C++
https://developers.google.com/native-client/dev/

> I really do need to clean that code up and maybe just release 
> it all...

:-)


More information about the Digitalmars-d mailing list