// // TextureComposeTask // bool ParaEngine::TextureComposeTask::UpdateToStaticTexture(CRenderTarget* pRenderTarget, Color colorKey) { ImageEntity* image = pRenderTarget->NewImage(true, colorKey); bool res = false; if (image) { if (image->IsValid()) { TextureEntity* pTexture = GetTexture(); if (pTexture) { if (pTexture->LoadFromImage(image, D3DFMT_DXT3)) res = true; else { OUTPUT_LOG("warning: failed to save render target to static texture : %s\n", m_name.c_str()); } } } SAFE_DELETE(image); } return res; }