MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / updateTexture

Method updateTexture

Source/Node/TIC80Node.cpp:577–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

575}
576
577void TIC80Node::updateTexture() {
578 auto tic = s_cast<TIC80*>(_tic80.get())->tic;
579 if (!tic || !tic->screen) return;
580
581 auto texture = getTexture();
582 if (!texture || texture->getWidth() < TIC80_FULLWIDTH || texture->getHeight() < TIC80_FULLHEIGHT) {
583 return;
584 }
585
586 const bgfx::Memory* mem = bgfx::copy(tic->screen, s_cast<uint32_t>(TIC80_FULLWIDTH * TIC80_FULLHEIGHT * sizeof(u32)));
587 bgfx::updateTexture2D(texture->getHandle(), 0, 0, 0, 0,
588 TIC80_FULLWIDTH,
589 TIC80_FULLHEIGHT,
590 mem);
591}
592
593bool TIC80Node::update(double deltaTime) {
594 if (!_tic80) return true;

Callers

nothing calls this directly

Calls 7

updateTexture2DFunction · 0.85
getMethod · 0.65
getTextureFunction · 0.50
copyFunction · 0.50
getWidthMethod · 0.45
getHeightMethod · 0.45
getHandleMethod · 0.45

Tested by

no test coverage detected