PDA

View Full Version : glPushMatrix()



kazmalak
01-06-2005, 01:20 AM
I have started to learn OpenGL by reading the Redbook. I am using C++ Builder 5.By changing one of its examples I was planning to create two isocohedrons with different scales and in different places.
For this purpose I have created a display function and in this display function, I have done scaling and translating in between glPushMatrix and glPopMatrix.I was expecting the code would ignore the first scaling and translating that I have performed and make the new ones in the second display call independent of the first call. But it didnt happen. I really wonder what I am doing wrong.
Thanks in advance.
Please help!!!!

WardVT
01-06-2005, 01:29 AM
Another great site with good tutorials is
http://nehe.gamedev.net

(These tutorials start from a examples and then explaining the code.)

kazmalak
01-06-2005, 03:44 AM
I tested the same codes not in a seperate function (display in my example) directly in the main function. This time it works.

And I still dont know why it doesnt work in a fuction called.