#include "rendering/TextureFormat.h"

TextureFormat::TextureFormat(const GL::TextureFormat& tf, bool linear,
                             bool depth)
    : format(tf), linear(linear), depth(depth) {
}

TextureFormat TextureFormat::color8(int channels, bool linear) {
    return TextureFormat(GL::TextureFormat::color8(channels), linear);
}

TextureFormat TextureFormat::float16(int channels, bool linear) {
    return TextureFormat(GL::TextureFormat::float16(channels), linear);
}

TextureFormat TextureFormat::float32(int channels, bool linear) {
    return TextureFormat(GL::TextureFormat::float32(channels), linear);
}

TextureFormat TextureFormat::depth16(bool linear) {
    return TextureFormat(GL::TextureFormat::depth16(), linear, true);
}

TextureFormat TextureFormat::depth32(bool linear) {
    return TextureFormat(GL::TextureFormat::depth32(), linear, true);
}

TextureFormat TextureFormat::unknown() {
    return TextureFormat(GL::TextureFormat::unknown(), false, false);
}