Problem rendering heightmap with screenshots

Started by
16 comments, last by jake_Ghost 18 years, 9 months ago
Yea that's what I did, but it had no effect. So I had to put the - 16 in.

Jake
Advertisement
Might sound a bit random, but did you try -15? :)
- 15 has no effect. I put - 16 because then it doesn't draw the last 16 pixels of terrain. I think it might have to do with the loading of the terrain or something cause the heightmap data seems to be wrong.

Jake

PS. you can see that it is wrong from the second picture in the first post I made
Here's a comparison of the data I made in photoshop and the data loaded in my game...



for (int x = terrain[TerrainCount - 1].x; x < MAP_SIZE + terrain[TerrainCount - 1].x - 16; x += STEP_SIZE) {
glBegin(GL_TRIANGLE_STRIP); <----- this should be between these lines, not after the next one (move glEnd() too)
for (int y = terrain[TerrainCount - 1].y; y < MAP_SIZE + terrain[TerrainCount - 1].y - 16; y += STEP_SIZE) {
Ok I did that no effect. I'm learning toward a problem loading the data as you can see by the comparison I made in my last post. Becuase it seems to be rendering properly now but it is drawn improperly because the data loaded seems to be messed up.

Jake
Ok. Well.. I never used .raw files.. so you'll have to hope someone else comes along to give you a hand with that.
Well thanks anyways.

Jake

This topic is closed to new replies.

Advertisement