I have troble for this code:
Code: Select all
ITexture* renderTarget = driver->createRenderTargetTexture(dimension2d<s32>(100,100),0);
driver->setRenderTarget(renderTarget);
smgr->drawAll();
stringc imageFile;
imageFile = "rumah_user/";
imageFile+=namaFileX;
imageFile+=".jpg";
IImage* im = driver->createImageFromData(renderTarget->getColorFormat() ,dimension2d<s32>(100,100),renderTarget);
driver->writeImageToFile(im,(c8*)imageFile.c_str());
im->drop();
driver->setRenderTarget(0);
driver->removeTexture(renderTarget);
anybody know what is my fault?
Sorry for my bad english. Thanks.