MCPcopy Create free account
hub / github.com/comaps/comaps / UpdateState

Method UpdateState

libs/drape/dynamic_texture.hpp:39–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37 }
38
39 void UpdateState(ref_ptr<GraphicsContext> context) override
40 {
41 // Create texture before first uploading.
42 if (!m_isInitialized)
43 {
44 std::vector<uint8_t> initData(m_params.m_width * m_params.m_height * GetBytesPerPixel(m_params.m_format), 0);
45 Create(context, m_params, initData.data());
46 m_isInitialized = true;
47 }
48
49 ASSERT(m_indexer != nullptr, ());
50 Bind(context);
51 m_indexer->UploadResources(context, make_ref(this));
52 }
53
54 TextureFormat GetFormat() const override { return m_params.m_format; }
55

Callers

nothing calls this directly

Calls 6

GetBytesPerPixelFunction · 0.85
CreateFunction · 0.85
ASSERTFunction · 0.85
make_refFunction · 0.85
dataMethod · 0.45
UploadResourcesMethod · 0.45

Tested by

no test coverage detected