@@ -76,12 +76,12 @@ void RenderTexture::listenToBackground(EventCustom* /*event*/)
7676
7777 if (_UITextureImage)
7878 {
79- const Size& s = _texture ->getContentSizeInPixels ();
80- VolatileTextureMgr::addDataTexture (_texture , _UITextureImage->getData (), s.width * s.height * 4 , Texture2D::PixelFormat::RGBA8888, s);
79+ const Size& s = _texture2D ->getContentSizeInPixels ();
80+ VolatileTextureMgr::addDataTexture (_texture2D , _UITextureImage->getData (), s.width * s.height * 4 , Texture2D::PixelFormat::RGBA8888, s);
8181
82- if ( _textureCopy )
82+ if ( _texture2DCopy )
8383 {
84- VolatileTextureMgr::addDataTexture (_textureCopy , _UITextureImage->getData (), s.width * s.height * 4 , Texture2D::PixelFormat::RGBA8888, s);
84+ VolatileTextureMgr::addDataTexture (_texture2DCopy , _UITextureImage->getData (), s.width * s.height * 4 , Texture2D::PixelFormat::RGBA8888, s);
8585 }
8686 }
8787 else
@@ -94,16 +94,17 @@ void RenderTexture::listenToBackground(EventCustom* /*event*/)
9494void RenderTexture::listenToForeground (EventCustom* /* event*/ )
9595{
9696#if CC_ENABLE_CACHE_TEXTURE_DATA
97- const Size& s = _texture->getContentSizeInPixels ();
98- if (_depthAndStencilFormat != 0 )
99- {
100- setupDepthAndStencil (s.width , s.height );
101- }
97+ const Size& s = _texture2D->getContentSizeInPixels ();
98+ // TODO new-renderer: field _depthAndStencilFormat removal
99+ // if (_depthAndStencilFormat != 0)
100+ // {
101+ // setupDepthAndStencil(s.width, s.height);
102+ // }
102103
103- _texture ->setAntiAliasTexParameters ();
104- if (_textureCopy )
104+ _texture2D ->setAntiAliasTexParameters ();
105+ if (_texture2DCopy )
105106 {
106- _textureCopy ->setAntiAliasTexParameters ();
107+ _texture2DCopy ->setAntiAliasTexParameters ();
107108 }
108109#endif
109110}
0 commit comments