c++ - Draw World Map [WGS84] with OpenGL in a wide Range -


I want to create a map, which contains 256x256 pixel tiles ( lot of them) Cover an large area.

Changes to changing latitude (from the world) x. Y (map) produces very large values. Accuracy with these big values ​​and so on, if I go too far from 0/0 point, I have the impurity of several pixels between the texture of two tiles located next to each other (like 2E8 | 0 and 2E8 -1 | 0).

How can I fix these dirty unwanted grid appeals? Float is used to attract the current failed implementation priorities (this should not be a difference, since all tiles are stuck in both coordinate directions for multiples of 256).

Note: I have tried to use glTranslate to all D for offset but the accuracy of the double is also not enough, or it is not the cause of glitches.

Actually, I recently implemented the implementation of the launch of the entire planet from land to land. Exact is run in the same problem In fact, what you have to do is create a new position structure that splits the accuracy between different floats. For example,

  structure space {vec3 meter; VC3 megramar; Vec3 terametre; Vec3 examination; VC3 Yommetre; };  

Then you code all operators and types of tasks for this structure (+, -, *, /, toVec3), then you place the location structure of your camera and each When you provide grid tile time, you do not translate the camera, but instead you translate the tile with the difference. For example:

  zero render () {// ... location diff = this-> position- camera.provisation; Vec3 diffvec = diff.toVec3 (); GlPushMatrix (); GlTranslatef (diffvec.x, diffvec.y, diffvec.z); // tile glPopMatrix render (); }  

What this does is remove the differential calculation from the OpenGL pipeline, which is only up to double exact and puts work on your program which can be essentially infinite precise. Now precision and accuracy goes forward, you are not ahead of the camera.

Happy coding.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -