| 136 | } |
| 137 | |
| 138 | void 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 | |
| 152 | void ImguiRenderer::UpdateBuffers() |
| 153 | { |