MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / DrawToAtlasNode

Method DrawToAtlasNode

Source/Graphics/textureatlas.cpp:91–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91void TextureAtlas::DrawToAtlasNode(const std::string& rel_path, const AtlasNodeTree::AtlasNode& node) {
92 TextureAssetRef tex = Engine::Instance()->GetAssetManager()->LoadSync<TextureAsset>(rel_path);
93
94 if (!rel_path.empty()) {
95 Textures::Instance()->subImage(atlas_texture, tex->GetTextureRef(), node.pos[0], node.pos[1]);
96 } else {
97 // Texture::Instance()->subImageTestPattern( atlas_texture, node.pos[0], node.pos[1] );
98 }
99}
100
101void TextureAtlas::Draw() {
102 // Let's load one texture per frame to even out the load a little between frames.

Callers

nothing calls this directly

Calls 4

GetAssetManagerMethod · 0.80
subImageMethod · 0.80
GetTextureRefMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected