How to make source code "images"

Started by
2 comments, last by Stani R 14 years, 5 months ago
I have some very simple 1-bit images (black and white) that I want to store in the source code of my OpenGL program itself rather than having to load it from a file. Anyone have any ideas on how to do this? And, on that note, is there any software out there that can convert images to cpp code? Cheers.
Advertisement
The byte consist of 8 bits.
I think there is no way to make a bit of pixel size in OpenGL.

Try to email them...
Save your image as XPM, then you can include it directly into your program.
Palib, for DS coding has a program that does this for you. See here it makes a .c file that has an array of the color values and a color pallette to index if needed.
Try this

This topic is closed to new replies.

Advertisement