cleaned up renderer
This commit is contained in:
parent
afe23851f0
commit
d661c88ee2
58 changed files with 3030 additions and 4722 deletions
|
|
@ -2,18 +2,19 @@ import Crafter.Graphics;
|
|||
import std;
|
||||
using namespace Crafter;
|
||||
|
||||
constexpr std::uint32_t width = 1280;
|
||||
constexpr std::uint32_t height = 720;
|
||||
|
||||
int main() {
|
||||
constexpr std::uint_fast32_t width = 1280;
|
||||
constexpr std::uint_fast32_t height = 720;
|
||||
Device::Initialize();
|
||||
Window window(width, height, "Hello Drawing!");
|
||||
|
||||
WindowWayland window(width, height, "Hello Drawing!");
|
||||
|
||||
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;
|
||||
for(std::uint32_t x = 0; x < width; x++) {
|
||||
for(std::uint32_t y = 0; y < height; y++) {
|
||||
window.renderer.buffer[x*height+y].r = 255;
|
||||
window.renderer.buffer[x*height+y].g = 0;
|
||||
window.renderer.buffer[x*height+y].b = 0;
|
||||
window.renderer.buffer[x*height+y].a = 255;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue