shadPS4/src/imgui/imgui_texture.h
Vinicius Rangel cef795b80b
devtools: persist fsr configs (#2852)
Saves FSR config to imgui.ini so it won't reset every startup
2025-04-27 13:32:29 -03:00

48 lines
No EOL
1.1 KiB
C++

// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <filesystem>
#include <vector>
#include <imgui.h>
#include "common/types.h"
namespace ImGui {
namespace Core::TextureManager {
struct Inner;
} // namespace Core::TextureManager
class RefCountedTexture {
Core::TextureManager::Inner* inner;
explicit RefCountedTexture(Core::TextureManager::Inner* inner);
public:
struct Image {
ImTextureID im_id;
u32 width;
u32 height;
};
static RefCountedTexture DecodePngTexture(std::vector<u8> data);
static RefCountedTexture DecodePngFile(std::filesystem::path path);
RefCountedTexture();
RefCountedTexture(const RefCountedTexture& other);
RefCountedTexture(RefCountedTexture&& other) noexcept;
RefCountedTexture& operator=(const RefCountedTexture& other);
RefCountedTexture& operator=(RefCountedTexture&& other) noexcept;
virtual ~RefCountedTexture();
[[nodiscard]] Image GetTexture() const;
explicit(false) operator bool() const;
};
}; // namespace ImGui