I'm writing a ray caster in C++, which outputs its results to regular image files. Now, I want to render the internal RGBA-representation (4 integers) to an OpenGL window, provided by GLUT.
I already know that I have to use glTexImage2D to generate a texture, assign that texture to a quad, and then render this quad right in front of the camera.
http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml
The problem I'm having is that I don't know how I should present the data to the glTexImage2D function: how do I construct this gluByte data chunk containing my data, coming from a simple 4-integer RGBA representation?