what I want to do is to calculate some deviations on a surface and then index them with colors. Is there a possibility to map this color information to a texture, so the computation has to be done only once for each model. The models are pretty big (150.000 - 250.000 verts, calculated in 5x5-matrices)so it takes a certain amount of time after loading the model. I'm looking for a solution for a pretty long time but there is nothing I could use on the web. The other problem is due to the way the data is arranged I always have only the upper point list and the next point list, meaning I can draw the model only in strips. You might imagine this looks crappy when the colors are interpolated.
You can write directly to a texture by
calculating the u, v coordinates interpolating max_u and max_v in 0.0 to 1.0
numeric space. The question is how to
calculate the interpolation information?
Pretty difficult if your surface is not
Anyway, having the u and v coordinates, you can write directly in texture space with
address of given pixel being the following:
addr= u * max_u + v; where u=y, and v=x
The only thing is that you would have to
do this PRIOR to assigning a raw texture to
Hope this helps.