Code: Select all
video->img.loadDynamicImage((unsigned char*)video->videoBuffer, videoX, videoY, format);
video->texture = TextureManager::getSingleton().loadImage("MovieTexture##" + StringConverter::toString(video->source), video->img, TEX_TYPE_2D);
TextureUnitState* t = mat->getTechnique(0)->getPass(0)->createTextureUnitState("MovieTexture##" + StringConverter::toString(video->source));
as i saw in the code, the image i'm creating is setting the autoDelete to false so i have to delete this pointer at the end. But when i try to do that, i get an assertion that says that this pointer wasnt allocated this way and it cannot be deleted by this mem manager... (the memory appears in the leaks file)
how can i delete this pointer?
(i tried to delete the material, then the texture, then delete the pointer but it doesnt work - the same assert)