Dicewars-Siedler/src/engine/renderer/loader/TextureLoader.h
Sebastian Böckelmann 0e2805ed06
Some checks are pending
Tests / test (push) Waiting to run
FIXUP
2026-04-21 14:19:48 +02:00

29 lines
756 B
C++

//
// Created by sebastian on 07.02.26.
//
#ifndef TEXTURELOADER_H
#define TEXTURELOADER_H
#include <string>
#include "Texture2D.h"
#include "async/RawTextureData.h"
struct RawTextureData;
class TextureLoader {
public:
static Texture2D loadTexture(const std::string& path, bool flipVertically= true);
static RawTextureData loadRawTextureData(const std::string &path, bool flipVertically = true);
static TextureData loadTextureData(const std::string &path, bool flipVertically = true, TextureType textureType = TextureType::Diffuse);
static Texture2D uploadToGPU(const RawTextureData &rawTextureData);
static Texture2D uploadToGPU(TextureData& textureData);
static void free(Texture2D& texture);
};
#endif //TEXTURELOADER_H