mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2024-09-21 20:45:35 +02:00
30 lines
569 B
C++
30 lines
569 B
C++
|
#pragma once
|
||
|
|
||
|
#include "./texture.hpp"
|
||
|
#include <utility>
|
||
|
|
||
|
// fwd
|
||
|
namespace MM {
|
||
|
class Engine;
|
||
|
}
|
||
|
|
||
|
namespace MM::OpenGL {
|
||
|
|
||
|
struct TextureLoaderFile final {
|
||
|
std::shared_ptr<Texture> load(Engine& engine, const std::string& path) const;
|
||
|
};
|
||
|
|
||
|
struct TextureLoaderConstBuffer final {
|
||
|
std::shared_ptr<Texture> load(const uint8_t* data, size_t size) const;
|
||
|
};
|
||
|
|
||
|
struct TextureLoaderEmpty final {
|
||
|
template<typename... Args>
|
||
|
std::shared_ptr<Texture> load(Args&& ... args) const {
|
||
|
return Texture::createEmpty(std::forward<Args>(args)...);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
} // MM::OpenGL
|
||
|
|