Sign in to follow this  
tstandley

what's the best way to draw a height map

Recommended Posts

tstandley    132
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
V-man    813
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

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