MCPcopy Create free account
hub / github.com/axmolengine/axmol / setTextureWithRect

Method setTextureWithRect

core/2d/ParticleSystemQuad.cpp:222–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220}
221
222void ParticleSystemQuad::setTextureWithRect(Texture2D* texture, const Rect& rect)
223{
224 // Only update the texture if is different from the current one
225 if (!_texture || texture->getBackendTexture() != _texture->getBackendTexture())
226 {
227 ParticleSystem::setTexture(texture);
228
229 auto programState = _quadCommand.getPipelineDescriptor().programState;
230 programState->setTexture(_texture->getBackendTexture());
231 }
232
233 this->initTexCoordsWithRect(rect);
234}
235
236void ParticleSystemQuad::setTexture(Texture2D* texture)
237{

Callers 4

setTextureMethod · 0.95
setDisplayFrameMethod · 0.95
onEnterMethod · 0.80
updateQuadsMethod · 0.80

Calls 3

initTexCoordsWithRectMethod · 0.95
getBackendTextureMethod · 0.80
setTextureMethod · 0.45

Tested by 2

onEnterMethod · 0.64
updateQuadsMethod · 0.64