PDA

View Full Version : Vertex precision?



metalac
12-29-2010, 01:47 PM
So i'm plotting a bunch of points on the screen. The problem is that if I read them from a file and center them around (0,0,0) everything works fine. If I instead use their values (very large numbers) and don't center around (0,0,0) then it looks like I loose some precision in x and y direction, not depth. I use gltransform to bring the points in view after they're plotted.

Basically the points are very random in nature, but when they're plotted without centering there is a line pattern that they form as if there is not enough precision.

Is there any way to increase the precision and fix this?

Thanks.

Alfonse Reinheart
12-29-2010, 05:37 PM
Not unless you're using OpenGL 4.0-based hardware, which is capable of double-precision math.

The better alternative is to, as you suggest, center them.