Problem with Texture mapping & GL_POINTS

Hi all,

I have been doing some terrain visualization with physical mass flows running over the terrain. I have developed my own
routines to visualize the terrain with texture mapping using GL_TRIANGLES. I was successful until that point seamlessly.
Depending upon the massflow data files I have been given, I would just need to display the points over the terrain.

For example, I have a static terrain texture map rendering properly. I have say 10 data files containing the x,y,z location of say
5000 points in each data file. I had this necessity of reading first datafile set, display it. Then read the second datafile, display it,
so on until the 10th file is read in and displayed over the terrain.

The mass flow datasets are so pre-calculated so that they run either on the surface or slightly above, but they dont reach below
the surface at any cost.

I would need to build this application in SGIs, Solaris, Windows and Linux platforms. I am successful in getting outputs in
these platforms, but each one of them shows a different kind of outputs when it comes to the massflows over the terrain.
I get a perfectly correct simulation that I wanted and expected on SGI Octane, SGI Octane2 and SGI Fuel. All these massflow
points from the datafiles flow above the terrain. But in all other machines - SGI O2, Windows(VC ++ executable), and Linux, I
can see points diving under the terrain, which should not happen.

I use OpenGL API using C for coding. I enable lighting when terrain is displayed, and disable it when I display the mass flow
over the terrain. I use GL_POINTS for points(mass flow) flowing over the terrain. When I read the datafiles to obtain the x,y,z
location of points, I first read them as strings, and using atof, I convert them to doubles. I double checked that the x,y,z values in
the data files are the same precision numbers when I display them too.

I have no clue as to whether its a problem with the code or a hardware issue. I am sure many people might have encountered
such issues. Could anyone throw me some light on this issue. It is very important that the massflow points shouldnt go under the
terrain.

Thanks in advance,
Vijay.

It is a bit difficult to know exactly what the problem is from your description. It could be either a Z precision issue, a transformation precison issue, or something else.

You mentioned that you are using doubles for the positions. Do you require this much precision to avoid the poke through problems. If so, then it is likely due to transformation precison.

-Evan