1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-29 22:45:34 +00:00

transparency fix

This commit is contained in:
scrawl 2012-04-09 15:36:51 +02:00
parent 944654f263
commit 33f360f52f

View file

@ -54,7 +54,7 @@ void ImageRotate::rotate(const std::string& sourceImage, const std::string& dest
TEX_TYPE_2D,
width, height,
0,
PF_R8G8B8,
PF_A8R8G8B8,
TU_RENDERTARGET);
RenderTarget* rtt = destTexture->getBuffer()->getRenderTarget();
@ -62,6 +62,8 @@ void ImageRotate::rotate(const std::string& sourceImage, const std::string& dest
Viewport* vp = rtt->addViewport(camera);
vp->setOverlaysEnabled(false);
vp->setShadowsEnabled(false);
vp->setBackgroundColour(ColourValue(0,0,0,0));
vp->setClearEveryFrame(true, FBT_DEPTH);
rtt->update();
rtt->writeContentsToFile(destImage);