View Full Version : World coordinate problem

08-20-2002, 01:50 PM
I have some world coordinates (~11000 points)like:
All coordinates fall with in a box with dimensions 2km x 3km x 100m. I am used to work in the area around (0,0,0) and can not get the points visible on screen. Keep getting a black screen. Any source or pseudocode to guide me om this problem is very welcome http://www.opengl.org/discussion_boards/ubb/smile.gif

08-20-2002, 02:59 PM
Did you make your viewport big enough?

08-20-2002, 08:18 PM
Passing large values to GL is bad, because GL often works internally in floating-point precision, and thus suffers horrible truncation problems with large values in the transform matrices.

Pick a center. Say, 533900.0,6178625.0,65.9 (or just calculate the average of all the vertices). Then subtract this value from each of your double-precision vertices on load, and store them in single precision floats in your vertex array.

08-20-2002, 11:14 PM
The subtraction and some scaleing really did clear the problem with the coordinate size, thanx http://www.opengl.org/discussion_boards/ubb/wink.gif