D game engine -- Any suggestions?

Mineko uminekorox at gmail.com
Wed Nov 20 14:16:36 PST 2013


On Wednesday, 20 November 2013 at 09:15:41 UTC, Rene Zwanenburg 
wrote:
>
> Hi,
>
> A few things jumped out at me:
>
> Camera.d:
>
> - The use of x, y, z and rx, ry, rz. These should really be in 
> some vector struct. Since you're using Dub, you can easily use 
> gl3n [1][2]. While it's still pretty basic, should be more than 
> enough to get you started.
>
> - Use Quaternions to store your rotations instead of euler 
> angles.
>
> - You can use @property instead of trivial getters and setters
>
> - You may want to store your camera matrices in the camera 
> class, and pass them to OpenGL when rendering. These matrices 
> can be useful, and you don't want to use glGet* functions ever 
> if you care about performance ;). gl3n provides matrix structs 
> and facilities to create projection matrices and the like.
>
> Oops, I have to run.. Will take a look at the rest later.
>
> [1] http://dav1dde.github.io/gl3n/index.html
> [2] http://code.dlang.org/packages/gl3n

After a bit of careful study I figured out how @property works, I 
just implemented it wrong last time, very helpful, thanks.


More information about the Digitalmars-d-learn mailing list