Quantcast
Channel: Cemetech
Viewing all articles
Browse latest Browse all 75370

General Programming :: RE: Need help with basics of 3d programming and OpenGL

$
0
0
Author: SoulofDeity
Posted: 24 Dec 2012 01:45:05 am (GMT -5)

jammasterz wrote:
Still cant see it.

EDIT: I solved it by setting up some random camera position and simply rotating it.

EDIT2 : I have updated the code few post back with the new code. My problem with it this time isn't actually as stiupid as my previous problems.

When i start the program the quad is perfectly aligned. But when i rotate it a few times it gets off. After few 360 rotations its off by more than 90 degrees! Also when i change the rotation direction from one to the other the quad flickers for some reason. I assume that my problems are because the answers of trig functions is getting rounded each time i perform a rotation, but how can i fix it?



You need to call glLoadIdentity before translating or rotating to reset the transformation. Remember, the code is being called every frame.


Viewing all articles
Browse latest Browse all 75370

Trending Articles