I am learning OpenGL and have a problem with gluPerspective. Here is the code I use in Init ()
gluPerspective(45.0f,(GLfloat)width/(GLfloat)height, 0.5f, 3000.0f);
My scene is working correctly ... but as soon as I move a little away from my objects, they disappear (like red balls in the image) .:
Web, where I took the graph from
I understand that red balls are out of sight and will not be shown. Therefore, I want to increase the distance at which he stops drawing. I tried to increase 3000.0f but it does not work!
gluPerspective(45.0f,(GLfloat)width/(GLfloat)height, 0.5f, 3000000.0f);
So my question is: How to increase the distance where openGL stops drawing objects?
Some photos about the problem:
Pic1
Pic2
source
share