Files
tyra-linux/engine/inc/loaders/texture/base/texture_loader.hpp
T
2022-08-11 10:20:35 +02:00

36 lines
1.0 KiB
C++

/*
# _____ ____ ___
# | \/ ____| |___|
# | | | \ | |
#-----------------------------------------------------------------------
# Copyright 2022, tyra - https://github.com/h4570/tyra
# Licensed under Apache License 2.0
# Sandro Sobczyński <sandro.sobczynski@gmail.com>
*/
#pragma once
#include "loaders/loader.hpp"
#include "loaders/texture/builder/texture_builder_data.hpp"
#include "renderer/core/texture/models/texture_bpp.hpp"
#include <string>
namespace Tyra {
class TextureLoader : public Loader {
public:
/**
* @brief Loads texture data from file.
* Sets size, name and data.
* @param fullpath Full path to texture file. Example: "host:texture.png"
*/
virtual TextureBuilderData* load(const char* fullpath) = 0;
inline TextureBuilderData* load(const std::string& fullpath) {
return load(fullpath.c_str());
}
u32 getTextureSize(const u32& width, const u32& height,
const TextureBpp& bpp);
};
} // namespace Tyra