I have some questions regarding glPush/Pop and I was wondering if anyone could point me to the right direction.I am trying to make a 3D model viewer but It seems my program is quite buggy. Now and then I get this unwanted translations and rotations as well as other annoying little things that mess up the whole thing. I did some research and asked a few people around on the internet but I could not solve my problem in any case. Sometimes it made it better and other times even worse than it was. It seems that I am not using glPush/Pop properly but I cant seem to be finding the error. I’ve read a lot about glPush/Pop,how they work and how to use them. Whenever I am about to do some changes(draw objects etc) in the current Matrix I save it and then restore it. The maximum number of nested Push/Pops I have is I think 3. I do not know if that should cause any problems,just that it would make my program a bit slower. If anybody could please give me some insight on what is the best way to use glPush/Pop it would be much appreciated.
Thanks in advance