mirror of
https://github.com/encounter/aurora.git
synced 2026-07-09 18:19:33 -07:00
f7f3d52cfc
* Implement PNG & arb texture replacements Fixes #119 For arb textures it's just making sure the file parsing can handle them. Idk if we need to do something special for it. * Allow non-mipmapped textures to be replaced by mipmapped textures Some of Henriko's textures (like the cuttable grass) rely on this. The mipmap bool is no longer part of the runtime key. * Make texture name the texture replacement key Might as well? Helped me debug some stuff * Oops that broke it bad * libpng instead of spng * I did it again * Update libpng fetch * Add zlib fetch * Forgot to set the hash * Add zlib redirect * Add INCLUDE_DIR(S) to redirect * Prefer shared for libpng * Set CMAKE_FIND_PACKAGE_TARGETS_GLOBAL --------- Co-authored-by: Luke Street <luke@street.dev>
18 lines
644 B
C++
18 lines
644 B
C++
#pragma once
|
|
|
|
#include "common.hpp"
|
|
#include "texture_convert.hpp"
|
|
|
|
#include <filesystem>
|
|
#include <optional>
|
|
|
|
namespace aurora::gfx::dds {
|
|
std::optional<ConvertedTexture> parse_dds_bytes(ArrayRef<uint8_t> bytes) noexcept;
|
|
std::optional<ConvertedTexture> load_dds_file(const std::filesystem::path& path) noexcept;
|
|
ByteBuffer encode_rgba8_dds(uint32_t width, uint32_t height, ArrayRef<uint8_t> pixels);
|
|
bool write_rgba8_dds(const std::filesystem::path& path, uint32_t width, uint32_t height, ArrayRef<u8> pixels) noexcept;
|
|
|
|
std::optional<ByteBuffer> read_binary_file(const std::filesystem::path& path) noexcept;
|
|
|
|
} // namespace aurora::gfx::dds
|