29 lines
756 B
C++
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
|