Hi...again,
I am now trying to get the vertex weighting extension working with my CVA code.
I saw on this board that somebody else had the same problem but nobody replied.
Anyway, I have a player mesh that has textures on it and also has weights. I have set up all of my array pointers and enabled the weighting extension, but the player is still breaking up - it looks the same with and without the extension on.
BTW, I do have the extension in my driver ;-)
So, here's the code to set the world matrix:
void CDriver::SetWorldMatrix(const C3DMatrix *c_pmtxWorld, const DWORD c_dwMatrices)
{
Msg("OpenGL", "[CDriver::SetWorldMatrix (2nd)]");
GLfloat fMatrix[16];
C3DMatrix mtxTM;
C3DMatrix::MultiplyMatrix(c_pmtxWorld[0], m_mtxViewMatrix, mtxTM);
ConvertMatrix(mtxTM, fMatrix);
glMatrixMode(GL_MODELVIEW);
glLoadMatrixf(fMatrix);
if (m_bHasVertexWeightingExtension == true && c_dwMatrices == 2)
{
C3DMatrix::MultiplyMatrix(c_pmtxWorld[1], m_mtxViewMatrix, mtxTM);
ConvertMatrix(mtxTM, fMatrix);
glMatrixMode(GL_MODELVIEW1_EXT);
glLoadMatrixf(fMatrix);
// glMatrixMode(GL_MODELVIEW);
}
}
We store the view matrix, because we need to combine it with the world matrix to get the real model view matrix.
Thanks for the help,
Luke A. Guest.




