MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / create

Method create

src/Core/Graphics/Texture.cpp:44–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 }
43
44 bool Texture::create(unsigned width, unsigned height)
45 {
46 if (std::holds_alternative<sf::Texture>(m_texture))
47 {
48 return std::get<sf::Texture>(m_texture).create(width, height);
49 }
50 if (std::holds_alternative<std::shared_ptr<sf::Texture>>(m_texture))
51 {
52 return std::get<std::shared_ptr<sf::Texture>>(m_texture)->create(
53 width, height);
54 }
55 if (std::holds_alternative<const sf::Texture*>(m_texture))
56 {
57 throw Exceptions::ReadOnlyTexture("create", EXC_INFO);
58 }
59 return false;
60 }
61
62 bool Texture::loadFromFile(const std::string& filename)
63 {

Callers 2

MakeNullTextureFunction · 0.45
CanvasMethod · 0.45

Calls 1

ReadOnlyTextureClass · 0.85

Tested by

no test coverage detected