This repository has been archived on 2022-05-21. You can view files and clone it, but cannot push or open issues or pull requests.
glyphs-juke/src/Texture.h

37 lines
578 B
C
Raw Normal View History

2021-08-25 03:27:39 +00:00
#pragma once
#include <algorithm>
#include "thirdparty/linalg.h"
#include "iDrawable.h"
#include "Rasterbuffer.h"
namespace gj {
class Texture : public DrawableBase {
public:
Texture() = delete;
Texture(Texture&&) = default;
Texture(const Texture&) = default;
Texture& operator=(Texture&&) = default;
Texture& operator=(const Texture&) = default;
Texture(Colorbuffer&& src) : src_(std::move(src)) {
}
void Draw(Colorbuffer& fb) const override;
void SetSource(Colorbuffer&& src) {
src_ = std::move(src);
}
private:
Colorbuffer src_;
};
}