inline bool LoadImageByMemory(ID3D11Device* device, unsigned char* image, size_t image_size, ID3D11ShaderResourceView** result) { D3DX11_IMAGE_LOAD_INFO information; ID3DX11ThreadPump* thread = nullptr; auto hres = D3DX11CreateShaderResourceViewFromMemory(device, image, image_size, &information, thread, result, 0); return (hres == S_OK); } inline ImFont* other_font = nullptr; inline ImFont* icons_font = nullptr; inline bool Initialize(ID3D11Device* device) { bool result = LoadImageByMemory(device, Logo, sizeof(Logo), &Logotype); if (!result) return false; ImGuiIO io = ImGui::GetIO(); ImGuiStyle& style = ImGui::GetStyle(); auto& colors = style.Colors; io.LogFilename = nullptr; io.IniFilename = nullptr; } ImVec2 image_size{ 770 / 2, 78 }; ImGui::SameLine((ImGui::GetContentRegionAvail().x / 2) - (image_size.x / 2)); ImGui::Image((void*)Logotype, image_size);