View Full Version : How to get the position of the object inserted in displaylist?
....//do some other change but can't get the matrix(such as glGetFloatv(GL_MODELVIEW_MATRIX, matrix))here!
//The displayList's position will changed at any time.how can we get the position of the object inserted in the list?
02-14-2004, 03:18 AM
a) This not advanced question.
b) You posted the same questions on GameDev
c) Don't post 3 questions in row like that
d) Learn to search for the anwsers
I'm sorry very much.
I'really can't get the matrix before call the displayList.So I think it's a advance question.
Any particular reason why you can't get the matrix?
Because I have inserted this displayList into another displayList:
//translation,rotation,and some other things
will changed at sometime.
But if you have transformations inside the display list, you know that these transformations are static, so you always know what kind of transformations are done to the object inside the display list before the object is drawn. So get the matrix before callig the display list and multiply this by matrix by the matrix formed by all transformations in side the display lists, and you will get the matrix at the point you draw the object.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.