@@ -784,8 +784,8 @@ void CubismShader_Cocos2dx::SetupShaderProgramForMask(CubismCommandBuffer_Cocos2
784784
785785
786786 // テクスチャ設定
787- const csmInt32 textureNo = model.GetDrawableTextureIndex (index);
788- cocos2d::Texture2D* texture = renderer->GetBindedTexture (textureNo );
787+ const csmInt32 textureIndex = model.GetDrawableTextureIndex (index);
788+ cocos2d::Texture2D* texture = renderer->GetBindedTexture (textureIndex );
789789 programState->setTexture (shaderSet->SamplerTexture0Location , 0 , texture->getBackendTexture ());
790790
791791 // 頂点配列の設定
@@ -794,8 +794,8 @@ void CubismShader_Cocos2dx::SetupShaderProgramForMask(CubismCommandBuffer_Cocos2
794794 programState->getVertexLayout ()->setAttribute (" a_texCoord" , shaderSet->AttributeTexCoordLocation , cocos2d::backend::VertexFormat::FLOAT2, sizeof (csmFloat32) * 2 , false );
795795
796796 // チャンネル
797- const csmInt32 channelNo = renderer->GetClippingContextBufferForMask ()->_layoutChannelNo ;
798- CubismRenderer::CubismTextureColor* colorChannel = renderer->GetClippingContextBufferForMask ()->GetClippingManager ()->GetChannelFlagAsColor (channelNo );
797+ const csmInt32 channelIndex = renderer->GetClippingContextBufferForMask ()->_layoutChannelIndex ;
798+ CubismRenderer::CubismTextureColor* colorChannel = renderer->GetClippingContextBufferForMask ()->GetClippingManager ()->GetChannelFlagAsColor (channelIndex );
799799 csmFloat32 colorFlag[4 ] = { colorChannel->R , colorChannel->G , colorChannel->B , colorChannel->A };
800800 programState->setUniform (shaderSet->UnifromChannelFlagLocation , colorFlag, sizeof (float ) * 4 );
801801
@@ -901,15 +901,15 @@ void CubismShader_Cocos2dx::SetupShaderProgramForDraw(CubismCommandBuffer_Cocos2
901901 sizeof (float ) * 16 );
902902
903903 // 使用するカラーチャンネルを設定
904- const csmInt32 channelNo = renderer->GetClippingContextBufferForDraw ()->_layoutChannelNo ;
905- CubismRenderer::CubismTextureColor* colorChannel = renderer->GetClippingContextBufferForDraw ()->GetClippingManager ()->GetChannelFlagAsColor (channelNo );
904+ const csmInt32 channelIndex = renderer->GetClippingContextBufferForDraw ()->_layoutChannelIndex ;
905+ CubismRenderer::CubismTextureColor* colorChannel = renderer->GetClippingContextBufferForDraw ()->GetClippingManager ()->GetChannelFlagAsColor (channelIndex );
906906 csmFloat32 colorFlag[4 ] = { colorChannel->R , colorChannel->G , colorChannel->B , colorChannel->A };
907907 programState->setUniform (shaderSet->UnifromChannelFlagLocation , colorFlag, sizeof (float ) * 4 );
908908 }
909909
910910 // テクスチャ設定
911- const csmInt32 textureNo = model.GetDrawableTextureIndex (index);
912- cocos2d::Texture2D* texture = renderer->GetBindedTexture (textureNo );
911+ const csmInt32 textureIndex = model.GetDrawableTextureIndex (index);
912+ cocos2d::Texture2D* texture = renderer->GetBindedTexture (textureIndex );
913913 programState->setTexture (shaderSet->SamplerTexture0Location , 0 , texture->getBackendTexture ());
914914
915915 // 座標変換
0 commit comments