Grid texture problem

In reference to the heightmap rendering code I posted on Snipplets at

I generated the texture coordinates of the grid so that the U/V range was [0,1]. I loaded a texture and applied it to the grid. I see no evidence that the texture is being applied in the finished product. Anyone see what I am doing wrong?

Code and data is at

Thanks peeps,

I loaded your code and issued the following commands:

n = CreateRandomHeightmapNode(20, 20, 1)
print n.getGeom(0).getVertexData()

In the resulting output, I observed that all of the texture coordinates appear to be in the range -0.001 to 0.001, so you are looking at a very small part of your texture–probably only one pixel of it, in fact.


Change this …

	ty = y*yTexSlope
                tx = x*xTexSlope

to this

	ty = yRow*yTexSlope
		tx = xCol*xTexSlope