cloudy
08-03-2009, 11:46 AM
Hi All-
I am new to OpenGL and was wondering if anyone could offer some suggestions. I coded up a pyramid (rectangular base, triangular sides) by plotting all the vertices and currently each side is a different color. Hypothetically, we start with a red side and as it rotates it should go away in the back and then come back up as it makes the full 360. However, when I used glRotate it looks fine at first, but before the pyramid does a full rotation the front side somehow becomes transparent and I can see that red face in the back before it comes around. To avoid this problem, I thought I might be able to move the "camera" around, to view different parts of the pyramid to simulate a rotation instead of using glRotate. Any help is greatly appreciated! Thanks :)
I am new to OpenGL and was wondering if anyone could offer some suggestions. I coded up a pyramid (rectangular base, triangular sides) by plotting all the vertices and currently each side is a different color. Hypothetically, we start with a red side and as it rotates it should go away in the back and then come back up as it makes the full 360. However, when I used glRotate it looks fine at first, but before the pyramid does a full rotation the front side somehow becomes transparent and I can see that red face in the back before it comes around. To avoid this problem, I thought I might be able to move the "camera" around, to view different parts of the pyramid to simulate a rotation instead of using glRotate. Any help is greatly appreciated! Thanks :)