CCTexture2D - NSCoding
So I have implemented the NSCoding protocol into almost all of the classes except for CCTexture2D (Cocos2D), which is needed for the CCSprite class.
I know NSCoding support is on the roadmap for 1.0, but I would like it for a project.
I am stuck as to how I should implement NSCoding for CCTexture2D. Maybe encode a UIImage, but how would I get a UIImage from a texture?
I know nothing about OpenGL. Is it possible to get the buffer, get the data from the buffer, convert it to NSData, and make a UIImage from that or am I too hopeful?
Thanks.
__________________
17 year old nerd.
Send me a PM. Maybe I can help.
|