Okay, so here is my new update function...
Code:
void Update()
{
this->GetFinalMatrix() = ParentNode->GetFinalMatrix() * LocalMatrix;
glPushMatrix();
glLoadMatrixf(this->FinalMatrix.readArray());
CSceneNode::Update();
glPopMatrix();
}
This updates the transformation to be relative to the parents final transformation (kinda like car wheels, or the flame on a torch, etc etc..)...
Everything is multiplying correctly, all the matrices (4x4 matrices) are initialized as identity matrices, I havn't done any rotation or translation yet, this->GetFinalMatrix() should look like this when we send it to the glLoadMatrixf function:
[1 0 0 0]
[0 1 0 0]
[0 0 1 0]
[0 0 0 1]
This should be the same as calling glTranslatef(0.0, 0.0, 0.0) in place of the glLoadMatrix function...
Unfortunately this isn't working, the model isn't showing up on the screen, I've debugged and made sure that the final matrix being send to the gl pipeline IS a 4x4 identity matrix..
Now I'm getting to the point where I believe that this is an opengl issue I'm having, maybe misunderstanding the functions?
What am I doing wrong to not have my model show up on my screen?
EDIT: Could it be that the final matrix is an identity matrix, but is in the form of FinalMatrix[16] and not FinalMatrix[4][4] ?