Hello everybody!
I have a question for you.
I have to make a program that takes a TGA image ( an house plan ) create with that image the house using the color information.
I allready have a way to read a TGA and I have a method( called pixels() ) that returns the pointer to the memory area that has the information on the pixels stored as an RGB.
The question is, how can I turn this info into the geometry?
Let’s say have the initialization method on wich I load the TGA file called img.
Than I probly will use the method img.pixels() to load the info about the RGB colors, something like this:
*punt = img.pixel();
array[0] = punt;
array[1] = (punt+1);
array[2] = (punt+2);
//every memory cell has his int(from 0 to 255) value and they are stored like this: RGBRGBRGBRGB…
The problem is that of course I don’t have this variable img declared on the display method tha I use to “draw”…
How can I handle this?
Thanks for your help and sorry for my english.