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

Method setTexture

Source/Node/Grid.cpp:58–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void Grid::setTexture(Texture2D* var) {
59 _texture = var;
60 if (!_texture) return;
61 _texSize = Size{
62 s_cast<float>(_texture->getWidth()),
63 s_cast<float>(_texture->getHeight())};
64 if (_textureRect == Rect::zero) {
65 _textureRect.set(0, 0, s_cast<float>(var->getWidth()), s_cast<float>(var->getHeight()));
66 updateUV();
67 }
68}
69
70Texture2D* Grid::getTexture() const noexcept {
71 return _texture;

Callers 3

grabMethod · 0.45
updateMethod · 0.45
grid_set_textureFunction · 0.45

Calls 3

setMethod · 0.65
getWidthMethod · 0.45
getHeightMethod · 0.45

Tested by

no test coverage detected