I have a P6 PPM image file format.
It stores each value as a byte.
As I understand I need to read it into a char * array, and feed it to OpenGL, but I'm not sure how to go about reading it in.
will something like this work?
for (i number of pixels to read)
char toAdd;
image.read(&toAdd, 1);
charArray[i] = toAdd
The main problem seems to be that it isn't reading the file format properly. And I don't quite understand why.