gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > glMultMatrix4x4

#174725 - iainprice - Sat Jul 10, 2010 3:38 pm

Hi,

I am in model model. I want to apply glMultMatrix4x4, do I need to load an identity or normalised matrix etc? or do I just push, glMultMatrix4x4, draw, pop?

#174728 - Ruben - Sat Jul 10, 2010 10:10 pm

When calling glMultMatrix, you need to push, draw, multiply and pop [push/pop can be skipped if it's global].

The actual matrix is a .12 fixed-point array of 4x4 elements. These elements are what are used in the 3D engine to process most everything.

The actual matrix doesn't NEED to be normalized for it to work, either (because it usually is =P).
And usually, you want to load the identity matrix before doing any work on the current matrix, unless that is what you want.