17 lines
345 B
C++
17 lines
345 B
C++
#pragma once
|
|
|
|
#include <array>
|
|
#include <glm/glm.hpp>
|
|
|
|
template<class T, int Width, int Height> class Image {
|
|
public:
|
|
void reset() {
|
|
array = {};
|
|
}
|
|
|
|
decltype(auto) operator[](this auto& self, const int32_t x, const int32_t y) {
|
|
return self.array[y * Width + x];
|
|
}
|
|
|
|
std::array<T, Width * Height> array = {};
|
|
};
|