Jump to content
  • Advertisement

OpenGL Opengl error drawing vertex (far)

Recommended Posts

Hello _Silence_, changed, but did not work.

My land is very big because I want to make an island with many "communities".
if I lower my drawdistance the ground does not render completely. 

Tell me one thing, what are the most common values?
I understand how dimensions of the world

Share this post

Link to post
Share on other sites

There are several things to check again, I guess. 

You told you are just studying OpenGL. Increasing depth-buffer size is normally not a thing beginners should need. Also, we still have very few information.

If you say that 1 unit in GL is the equivalent of 1 meter in real, then you are planning to see 600 kilometers far away. This is huge, very huge, even more for studying purposes. Even for an island. Usually the player will not have to see what is happening at the opposite end of the island.

3 hours ago, WhiskyAndCode said:

changed, but did not work.

What exactly did you try ? If you try what turanjki told and that did not work, this might reveal there are mistakes somewhere else, most probably in your code. If not, then do it.

When you reduced the far value of the perspective, did the triangles flashing stopped apart from the fact that the full obj did not rendered completely ? What is the dimensions of your obj file without any scale applied to it ? 

Finally, think about it: if you don't scale, you don't have the issue, but you still have exactly the same information rendered. One easy thing you can do is just reducing the speed of your moves. For example, if you scale your land by 10000 times, it will not make your scene bigger if you move 10000 times faster. But if you keep your land as it is (no scale) and you divide by 10 or 100 the speed of your moves, then your land will 'be' bigger. Then no needs for all these depth-buffer tricks (of course, you'll have to scale your objects accordingly).

Share this post

Link to post
Share on other sites

_Silence_, you're right! (and everyone who helped me)

My scale is too high, I decreased the speed of my camera and now it makes more sense, and it lowers my terrain by 70%. 😃


Thank u for all :)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!