Sign in to follow this  

what's the best way to draw a height map

This topic is 3416 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a grid of floats, and I want to draw it as a height map. so like float grid[100][100]; where each grid[x][y] represents the height of that (x,y) I have been using glBegin(GL_QUAD_STRIP) to draw the rows of the map, but I am duplicating vertices on the edges where the rows join. This wouldn't be such a big deal except that I am making display lists of several huge maps, and the memory is just too much. Please help!

Share this post


Link to post
Share on other sites
Quote:
Original post by tstandley
I have a grid of floats, and I want to draw it as a height map.

so like

float grid[100][100]; where each grid[x][y] represents the height of that (x,y)

I have been using glBegin(GL_QUAD_STRIP) to draw the rows of the map, but I am duplicating vertices on the edges where the rows join. This wouldn't be such a big deal except that I am making display lists of several huge maps, and the memory is just too much.

Please help!


How much memory are you using per vertex? How much for the entire terrain? 100MB, 200MB, 2GB?

Share this post


Link to post
Share on other sites

This topic is 3416 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this