I'm not very experienced with OpenGL. Now I have the rgb data and that's what I use with glDraPixels. How can I do what you suggest?

Thanks!