mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-05-07 13:04:58 +00:00
32 lines
730 B
C++
32 lines
730 B
C++
#pragma once
|
|
|
|
#include "Image/D3DFormat.h"
|
|
#include "Image/Texture.h"
|
|
|
|
#include <memory>
|
|
|
|
class Dx9TextureLoader
|
|
{
|
|
public:
|
|
Dx9TextureLoader();
|
|
|
|
Dx9TextureLoader& Format(oat::D3DFORMAT format);
|
|
Dx9TextureLoader& Type(TextureType textureType);
|
|
Dx9TextureLoader& HasMipMaps(bool hasMipMaps);
|
|
Dx9TextureLoader& Width(unsigned width);
|
|
Dx9TextureLoader& Height(unsigned height);
|
|
Dx9TextureLoader& Depth(unsigned depth);
|
|
|
|
std::unique_ptr<Texture> LoadTexture(const void* data);
|
|
|
|
private:
|
|
[[nodiscard]] const ImageFormat* GetFormatForDx9Format() const;
|
|
|
|
oat::D3DFORMAT m_format;
|
|
TextureType m_type;
|
|
bool m_has_mip_maps;
|
|
unsigned m_width;
|
|
unsigned m_height;
|
|
unsigned m_depth;
|
|
};
|