Hi. I have a c++ app that I'm trying to port to iPhone and to start off I'm trying to replace my c++ texture loader with an obj-c++ texture loader so that I can make use of the cocoa libraries.
A lot of my c++ files (.cpp files) call the texture loader with something like:
GLuint mTexture = TextureLoader::LoadTexture("file.png") //LoadTexture is a static method
but whenever I try to make a TextureLoader class (inside a .mm file) that has Obj-C code, I'm forced to make the calling class also a .mm file.
I want to avoid a creep of .mm usage. How can I do it? Is it even possible?
Basically I have a .mm file that has...
GLuint TextureLoader::LoadTexture(const char* path)
{
//...lots of c and obj-c code
return texture
}
and is apart of a c++ class (or is it obj-c++ at this point?)
I want to be able to use it from a .cpp file without having to make the calling class also .mm
Is there anyway to do this?
Cheers guys.