View Full Version : How can I get the current matrix in OpenGL ?
I_am_root
06-08-2006, 04:16 PM
I am a *bit* new to OpenGL and would like to know how I can get the current matrix (after a series of rotations and translations) and put it in an array(or variable). NOTE : I use FreePASCAL. Thanks in advance for your answers.
____________________
Regards,
Eduard
Srki_82
06-08-2006, 04:39 PM
You can use glGetFloatv (http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/get.html) function.
First parameter defines which matrix you want to get (GL_MODELVIEW_MATRIX, GL_PROJECTION_MATRIX or GL_TEXTURE_MATRIX).
Second parameter is 4x4 matrix that will be filled with data.
I_am_root
06-08-2006, 10:00 PM
Thank you very much, Srki_82 !
__________________
Regards,
Eduard
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.