i have to write simple software 3d renderer and i want to do it in opengl way (without matrix stack so far), so i've go two matrices: projection and modelview, opengl keeps matrices in column-major order. all transformations are done (as i think) this way: M' = M * transform_matrix which is transposed (to be in column-major order)
so, let's imagine some object in local his coordinates. after multiplying by modelview matrix we'll have this object with world coordinates (am i right?)
so there is my first problem: how to do it (multiply) correctly (or how it's done by OpenGL)?
'v = M * v ? or maybe the are any transpositions/inversions needed (to matrix)?
after that, we have to project vertex on the screen (and i'm afraid it's more complicated)
and to be honest i don't understand exactly what to do.
i've got projection matrix (exact like after glFrustum or glOtho) and i have to multiply (yeah, same problem, is it the same situation ?)
after that, i have to (as i think) normalize (but how exactly?) these coordinates to screen coordinates (ok, i can do it like glViewport), but somethere i've found some dividing by w viewpoint' and i don't know what to do with it and where (after which step) to do it
(do i have to add any clipping to triangle fill routine?)
thx for you attention