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

Method UpdateTexture

dev_sandbox/imgui_renderer.cpp:138–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138void ImguiRenderer::UpdateTexture()
139{
140 std::lock_guard<std::mutex> lock(m_textureMutex);
141 unsigned char * pixels;
142 int width, height;
143 ImGui::GetIO().Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);
144
145 auto const sizeInBytes = width * height * sizeof(uint32_t);
146 m_textureData.resize(sizeInBytes);
147 memcpy(m_textureData.data(), pixels, sizeInBytes);
148 m_textureWidth = static_cast<uint32_t>(width);
149 m_textureHeight = static_cast<uint32_t>(height);
150}
151
152void ImguiRenderer::UpdateBuffers()
153{

Callers

nothing calls this directly

Calls 2

resizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected