rixed posted on May 16 2006 at 05:11 PM said:
For now it's not compilable because I'm in the process of rewriting the handling of memory buffers.
It's written in C (some very few routines in ARM asm). Obviously this lacks a documentation.
This is the same place i'm at with mine, all in C/C++ at the mo. I'm about to drop the windows version for a bit, its getting i the way. May get it working again when the GPU is sorted but before the hand rolled asm stage. Yours sounds like its going for higher quality, and that web page is far better than mine! I'm going for out and out speed. Hence the 8bit FB, no Zbuffer, and no lighting(yet). I did a few flight sims and other games with no zbuffer so have some tricks up my sleves.
Will be some egg on my face if yours is still faster than mine. The race is on! B)
You got a precompiled version of your prog?
Dzz, you look like you've gone for more of a methodical approach. I've not done the clipping yet, optimisation, err, in the future.
I've been concentration on the frame work and API. Lovely name spaces
Here is a snip of my matrix class def, when I really start to use it i'll get an idea if its any good. My fixed point is using 17:15 format. Bit odd but means that +-1 can fit in 16bits, so I may do a mini matrix 3x3 class that does not support scales or have a translation. But would only take up 9*sizeof(short) or 20 bytes(with alignment) Just one of my many mad ideas.
struct Matrix
{
// m[0][0],m[0][1],m[0][2] x axis
// m[1][0],m[1][1],m[1][2] y axis
// m[2][0],m[2][1],m[2][2] Z axis
// m[3][0],m[3][1],m[3][2] Transform in here.
f32 m[4][3];
Matrix &operator = (const Matrix &pIn);
void SetTranslation(f32 pX,f32 pY,f32 pZ);//Sets the translation set to x,y,z, leaves what ever is in the rotation.
void Set(f32 pX,f32 pY,f32 pZ);//Sets as identity with translation set to x,y,z.
void SetIdentity();
void SetScale(f32 pScale);
void SetScale(f32 pX,f32 pY,f32 pZ);
void SetRotationX(a16 pX);
void SetRotationY(a16 pY);
void SetRotationZ(a16 pZ);
void SetRotation(a16 pX,a16 pY,a16 pZ);
//Rotation stuff.
void ApplyRotationXPost(a16 pX);
void ApplyRotationYPost(a16 pY);
void ApplyRotationZPost(a16 pZ);
void ApplyRotationXPre(a16 pX);
void ApplyRotationYPre(a16 pY);
void ApplyRotationZPre(a16 pZ);
//Same as above, but the translation is not effected/changed etc.. Uses Mul3x3
void ApplyRotationXPost3x3(a16 pX);
void ApplyRotationYPost3x3(a16 pY);
void ApplyRotationZPost3x3(a16 pZ);
void ApplyRotationXPre3x3(a16 pX);
void ApplyRotationYPre3x3(a16 pY);
void ApplyRotationZPre3x3(a16 pZ);
void Mul(const Matrix &pA,const Matrix &pB); //Does this = pA * pB
void Mul(const Matrix &pIn); //Does this = this * pIn
void MulPre(const Matrix &pIn); //Does this = pIn * this
//This treats the matrix as a 3x3 not a 4x3 so no translation.
//This means that any translation that there is, is not changed or overwritten
void Mul3x3(const Matrix &pA,const Matrix &pB);
void Mul3x3(const Matrix &pIn);//Does this = this * pIn
void MulPre3x3(const Matrix &pIn); //Does this = pIn * this
};