Files
dolphin/Source/Core/VideoCommon/Assets/CustomTextureData.h
T
WalterCool e951de438f Fix build failure on libc++/clang 23
libc++ 23 enforces the dependency from certain stdlib.

In this case, we need <vector> here or build will fail.

Signed-off-by: WalterCool <waltercool@slash.cl>
2026-10-12 00:25:54 -04:00

40 lines
1.0 KiB
C++

// Copyright 2023 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <span>
#include <string>
#include <vector>
#include "Common/Buffer.h"
#include "Common/CommonTypes.h"
#include "VideoCommon/TextureConfig.h"
namespace VideoCommon
{
class CustomTextureData
{
public:
struct ArraySlice
{
struct Level
{
Common::UniqueBuffer<u8> data;
AbstractTextureFormat format = AbstractTextureFormat::RGBA8;
u32 width = 0;
u32 height = 0;
u32 row_length = 0;
};
std::vector<Level> m_levels;
};
std::vector<ArraySlice> m_slices;
};
bool LoadDDSTexture(CustomTextureData* texture, const std::string& filename);
bool LoadDDSTexture(CustomTextureData::ArraySlice::Level* level, const std::string& filename,
u32 mip_level);
bool LoadPNGTexture(CustomTextureData::ArraySlice::Level* level, const std::string& filename);
bool LoadPNGTexture(CustomTextureData::ArraySlice::Level* level, std::span<const u8> buffer);
} // namespace VideoCommon