This topic is now archived and is closed to further replies.


Retrieving current modelview matrix...

Recommended Posts

Prozak    898
I''ve made a few similar posts here recently, but i think this one still deserves a thread of its own. Under OpenGL, how do I retrive the current Matrices in the stack? I want to simulate the transformations a vertex goes by till it is rasterized... ... I''ve got a well designed Excel page with macros for matrix & vertex math, cause I''m trying not only to understand the graphics pipeline, but to understand some of the math used in shaders, specificly, knowing in which "space" to put a vertex to perform a certain calculation (ex: put the vertex in world-space to do lighting calculation, or x-space to do this/that...) I''m also adding stuff to my engine to be able to visualy see the impact it has when I alter a value in a matrix, etc... Thanks for any inputs on this... Salsa cooked it, your eyes eat it!
[Hugo Ferreira][Positronic Dreams][Colibri 3D Engine][Entropy HL2 MOD][My DevDiary]
[Yann L.][Enginuity] [Penny Arcade] [MSDN][VS RoadMap][Humus][BSPs][UGP][NeHe]
                          Prozak - The GameDever formally known as pentium3id

Share this post

Link to post
Share on other sites
Monder    993

float ModelView[16];
glGetFloatv(GL_MODELVIEW_MATRIX, ModelView);

Will get the matrix on the top of the modelview matrix stack and shouldn''t this be in the OpenGL forum?

Share this post

Link to post
Share on other sites