- TEST_SPEC.md: Updated test directory structure to reflect Core/Asset, Core/IO, and Resources/<Type> subdirectories - TEST_SPEC.md: Updated module names and test counts (852 total) - TEST_SPEC.md: Updated build commands for new Resources subdirectories - README.md: Updated engine structure with Core/Asset/ and Core/IO/ - README.md: Updated Resources section with layered architecture - README.md: Updated test coverage table with accurate counts
92 lines
3.2 KiB
C++
92 lines
3.2 KiB
C++
#pragma once
|
|
|
|
#include <XCEngine/Core/Asset/ImportSettings.h>
|
|
#include <XCEngine/Resources/Texture/Texture.h>
|
|
#include <XCEngine/Core/Math/Vector3.h>
|
|
|
|
namespace XCEngine {
|
|
namespace Resources {
|
|
|
|
enum class MipmapFilter {
|
|
Box,
|
|
Kaiser
|
|
};
|
|
|
|
enum class CompressionQuality {
|
|
Low,
|
|
Medium,
|
|
High,
|
|
Ultra
|
|
};
|
|
|
|
class TextureImportSettings : public ImportSettings {
|
|
public:
|
|
TextureImportSettings();
|
|
virtual ~TextureImportSettings() override;
|
|
|
|
Core::UniqueRef<ImportSettings> Clone() const override;
|
|
bool LoadFromJSON(const Containers::String& json) override;
|
|
Containers::String SaveToJSON() const override;
|
|
|
|
void SetTextureType(TextureType type) { m_textureType = type; }
|
|
TextureType GetTextureType() const { return m_textureType; }
|
|
|
|
void SetTargetFormat(TextureFormat format) { m_targetFormat = format; }
|
|
TextureFormat GetTargetFormat() const { return m_targetFormat; }
|
|
|
|
void SetGenerateMipmaps(bool generate) { m_generateMipmaps = generate; }
|
|
bool GetGenerateMipmaps() const { return m_generateMipmaps; }
|
|
|
|
void SetMipmapFilter(MipmapFilter filter) { m_mipmapFilter = filter; }
|
|
MipmapFilter GetMipmapFilter() const { return m_mipmapFilter; }
|
|
|
|
void SetMaxAnisotropy(Core::uint32 anisotropy) { m_maxAnisotropy = anisotropy; }
|
|
Core::uint32 GetMaxAnisotropy() const { return m_maxAnisotropy; }
|
|
|
|
void SetSRGB(bool srgb) { m_sRGB = srgb; }
|
|
bool GetSRGB() const { return m_sRGB; }
|
|
|
|
void SetFlipVertical(bool flip) { m_flipVertical = flip; }
|
|
bool GetFlipVertical() const { return m_flipVertical; }
|
|
|
|
void SetFlipHorizontal(bool flip) { m_flipHorizontal = flip; }
|
|
bool GetFlipHorizontal() const { return m_flipHorizontal; }
|
|
|
|
void SetBorderColor(const Math::Vector3& color) { m_borderColor = color; }
|
|
const Math::Vector3& GetBorderColor() const { return m_borderColor; }
|
|
|
|
void SetCompressionQuality(CompressionQuality quality) { m_compressionQuality = quality; }
|
|
CompressionQuality GetCompressionQuality() const { return m_compressionQuality; }
|
|
|
|
void SetUseHardwareCompression(bool use) { m_useHardwareCompression = use; }
|
|
bool GetUseHardwareCompression() const { return m_useHardwareCompression; }
|
|
|
|
void SetMaxSize(Core::uint32 size) { m_maxSize = size; }
|
|
Core::uint32 GetMaxSize() const { return m_maxSize; }
|
|
|
|
void SetGenerateNormalMap(bool generate) { m_generateNormalMap = generate; }
|
|
bool GetGenerateNormalMap() const { return m_generateNormalMap; }
|
|
|
|
void SetNormalMapStrength(float strength) { m_normalMapStrength = strength; }
|
|
float GetNormalMapStrength() const { return m_normalMapStrength; }
|
|
|
|
private:
|
|
TextureType m_textureType = TextureType::Texture2D;
|
|
TextureFormat m_targetFormat = TextureFormat::Unknown;
|
|
bool m_generateMipmaps = true;
|
|
MipmapFilter m_mipmapFilter = MipmapFilter::Box;
|
|
Core::uint32 m_maxAnisotropy = 16;
|
|
bool m_sRGB = false;
|
|
bool m_flipVertical = false;
|
|
bool m_flipHorizontal = false;
|
|
Math::Vector3 m_borderColor = Math::Vector3::Zero();
|
|
CompressionQuality m_compressionQuality = CompressionQuality::High;
|
|
bool m_useHardwareCompression = true;
|
|
Core::uint32 m_maxSize = 0;
|
|
bool m_generateNormalMap = false;
|
|
float m_normalMapStrength = 1.0f;
|
|
};
|
|
|
|
} // namespace Resources
|
|
} // namespace XCEngine
|