CyBBe
10-10-2000, 07:05 AM
Hi!
I'm thinking about doing a strategy engine, I want to use heightmaps, quadtrees or octrees or something like that... And I tought that I could do some own heightmap system that works like this:
RGBA, Alpha is the height, so high alpha value means higher y coord... Then I could use the colors to split the map into different parts...
Like this:
You read all the pixels, and then you bind a texture and draw all the vertexes with a specific color (e.g. 1.0f, 0.0f, 0.0f) and then you map another texture and draw all the vertexes with that color and so on, this way, I could do water, land, mountain and so on... And then I could do so the boates just could go on that specific color and so on... :P
Will this work? Does this seem like a good idea? I'm not sure, but I want YOUR opinion, so plz, start posting.
Question: If I would do like this, when I draw the vertexes which type should I use glBegin(???) GL_POLYGON or GL_TRIANGLE_STRIP or what???
I'm thinking about doing a strategy engine, I want to use heightmaps, quadtrees or octrees or something like that... And I tought that I could do some own heightmap system that works like this:
RGBA, Alpha is the height, so high alpha value means higher y coord... Then I could use the colors to split the map into different parts...
Like this:
You read all the pixels, and then you bind a texture and draw all the vertexes with a specific color (e.g. 1.0f, 0.0f, 0.0f) and then you map another texture and draw all the vertexes with that color and so on, this way, I could do water, land, mountain and so on... And then I could do so the boates just could go on that specific color and so on... :P
Will this work? Does this seem like a good idea? I'm not sure, but I want YOUR opinion, so plz, start posting.
Question: If I would do like this, when I draw the vertexes which type should I use glBegin(???) GL_POLYGON or GL_TRIANGLE_STRIP or what???