I am new to this forum and I have a problem regarding OpenGL heightmaps.
My goal is to create an image reading function then create a 3D terrain from the image read.
/* load an image as a heightmap, forcing greyscale (so channels should be 1) */
int width, height, channels;
unsigned char *ht_map = SOIL_load_image
&width, &height, &channels,
I could probably work out drawing code from an array, but how do I load an image into an array?
If anyone knows anything about the SOIL library, or a useable alternative, please help.
Thanks in advance