I need a height map algo. based on triangles

Hello,

Im using a height map loader based on quads, but I got a strange problem… sometimes the vertices changes… in redraw(). So I divided this quad in 2 triangles and a I got the same problem, but now its diferent, everything is moving. so, do you guys have some example of a functional height map loader?

HEY!!!

I think i found the problem! its on auto texture genetarion, I disabled then i had no problems, WHY???

/* glBindTexture(GL_TEXTURE_2D, texture[STerrain[QUAD_ID].texture_id]);
glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
glTexGenfv(GL_S, GL_OBJECT_PLANE,sPlane);
glTexGenfv(GL_T, GL_OBJECT_PLANE, tPlane);*/