I am creating a 2d heightfield, I wish to import a picture of a map(done), then draw a grid over the top(done).
But I also wish to make both map & the grid user transparent, via a slider.
I have the slider control implemented, I simply wish to know how you would make both the grid and pictures transparency gradually change with the manipulation of the slider control?
I assume you are displaying the map by drawing a textured polygon. If this is the case, simply set the texture mode to modulate with glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE) and use glColor4f(r,g,b,a) to set the alpha value of the polygon.