Skip to content

Commit a80ca25

Browse files
committed
Merge pull request cocos2d#14576 from mogemimi/fix-deprecation-warns-particle3d
Fix deprecation warnings in PU
2 parents 2f4867c + 3bb9a37 commit a80ca25

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

extensions/Particle3D/PU/CCPUBillboardChain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,9 +734,9 @@ void PUBillboardChain::setBlendFunc(const BlendFunc& blendFunc)
734734

735735
GLuint PUBillboardChain::getTextureName()
736736
{
737-
if (TextureCache::getInstance()->isDirty())
737+
if (Director::getInstance()->getTextureCache()->isDirty())
738738
{
739-
if (TextureCache::getInstance()->getTextureForKey(_texFile) == nullptr)
739+
if (Director::getInstance()->getTextureCache()->getTextureForKey(_texFile) == nullptr)
740740
{
741741
_texture = nullptr;
742742
this->init("");

extensions/Particle3D/PU/CCPURender.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,9 +589,9 @@ bool PUParticle3DEntityRender::initRender( const std::string &texFile )
589589

590590
GLuint PUParticle3DEntityRender::getTextureName()
591591
{
592-
if (TextureCache::getInstance()->isDirty())
592+
if (Director::getInstance()->getTextureCache()->isDirty())
593593
{
594-
if (TextureCache::getInstance()->getTextureForKey(_texFile) == nullptr)
594+
if (Director::getInstance()->getTextureCache()->getTextureForKey(_texFile) == nullptr)
595595
{
596596
_texture = nullptr;
597597
this->initRender("");

0 commit comments

Comments
 (0)