like this:
viewtopic.php?f=25&t=83037&p=518003&#p518003
I tried this:
Code: Select all
Ogre::Image2 img;
std::ifstream ifs(texture->mTextureData.mFileName.c_str(), std::ios::binary|std::ios::in);
//create image from texture buffer
Ogre::DataStreamPtr data_stream(new Ogre::FileStreamDataStream(texture->mTextureData.mFileName, &ifs, false));
img.load( data_stream );
img.uploadTo(ogreTexture, 0, 0); //mip 0 just to test
Also related:
I will going to need to use Ogre::Image2 later because we are working on encripting the texture files... so using Ogre::Image2 for the mip thing would be ideal, but the (second) question is: If I use img.uploadTo(ogreTexture... is there a way to AutomaticBatching these textures?
thanks!