stripped down all pixwerx code to a minimal istic subset
This commit is contained in:
commit
612677c52d
398 changed files with 164811 additions and 0 deletions
60
src/main.cpp
Normal file
60
src/main.cpp
Normal file
|
@ -0,0 +1,60 @@
|
|||
/**
|
||||
* paradiso - Paradigmen der Softwareentwicklung
|
||||
*
|
||||
* (c) Copyright 2023 Hartmut Seichter
|
||||
*
|
||||
*/
|
||||
|
||||
#include "bitmap.hpp"
|
||||
#include "context.hpp"
|
||||
#include "geometry.hpp"
|
||||
#include "sprite.hpp"
|
||||
#include "window.hpp"
|
||||
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
|
||||
auto main() -> int {
|
||||
|
||||
|
||||
auto checker_board =
|
||||
|
||||
|
||||
auto window = paradiso::Window();
|
||||
|
||||
window.set_size(paradiso::Size{.width = 1280, .height = 720})
|
||||
.set_position(paradiso::Point{.x = 100, .y = 100})
|
||||
.set_title("PardiSO")
|
||||
.set_visible(true);
|
||||
|
||||
auto ctx = paradiso::Context{};
|
||||
|
||||
auto sprite = paradiso::Sprite {
|
||||
//
|
||||
};
|
||||
|
||||
bool want_close{false};
|
||||
|
||||
window.set_keyboardcallback(
|
||||
[&](auto& w, int key, int scancode, int action, int mods) {
|
||||
if (key == 'Q' || key == 256)
|
||||
want_close = true;
|
||||
});
|
||||
|
||||
while (window.update([&](auto& w) -> bool {
|
||||
|
||||
static uint8_t green_slider = 0x00;
|
||||
ctx.set_clearcolor(paradiso::RGBA::from_rgb(0xFF, green_slider, 0x00));
|
||||
|
||||
|
||||
|
||||
ctx.clear();
|
||||
|
||||
green_slider++;
|
||||
|
||||
return !want_close;
|
||||
})) {
|
||||
};
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue