Skip to main content
GameDev.net gamedev.net
🔒 Locked

Retrieving current modelview matrix...

Started by Prozak Mar 27, 2004 at 11:36 AM 0 replies 300+ views
Original Post
Prozak
Prozak
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
Monder
Monder

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?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.