opengl-tutorials / ogl

http://www.opengl-tutorial.org
2.69k stars 925 forks source link

Tutorial 4: Output looks nothing like what I have. #114

Closed BlueStaggo closed 2 years ago

BlueStaggo commented 3 years ago

Here is what the tutorial shows: A messy coloured cube with no z buffer. And this is me at the same stage: A neat rainbow cube without a z buffer even though it looks like there is one there. I'm using similar code, so they shouldn't be different. Are the screenshots for Tutorial 4 outdated or is there another problem?

Garfield1002 commented 3 years ago

Quick Note 1 : If you don’t see the problem, change your camera position to (4,3,-3)

Did you follow this step ?

BlueStaggo commented 3 years ago

No. The tutorial said nothing about that step.

Garfield1002 commented 3 years ago

In the English version this step can be found line 222 of the markdown file Tutorial 4 : A Colored Cube.

Here is a screenshot of the webpage: image

It may be missing in other languages though, I did not check.

More importantly, did this additional step solve your issue?