22 lines
551 B
C++
22 lines
551 B
C++
import Crafter.Graphics;
|
|
import std;
|
|
using namespace Crafter;
|
|
|
|
int main() {
|
|
constexpr std::uint_fast32_t width = 1280;
|
|
constexpr std::uint_fast32_t height = 720;
|
|
|
|
Window<true, false, false, false> window(width, height);
|
|
|
|
for(std::uint_fast32_t x = 0; x < width; x++) {
|
|
for(std::uint_fast32_t y = 0; y < height; y++) {
|
|
window.framebuffer[x*height+y].r = 255;
|
|
window.framebuffer[x*height+y].g = 0;
|
|
window.framebuffer[x*height+y].b = 0;
|
|
window.framebuffer[x*height+y].a = 255;
|
|
}
|
|
}
|
|
|
|
window.Render();
|
|
window.StartSync();
|
|
}
|