Crafter.Graphics/examples/HelloWindow/main.cpp

20 lines
793 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Crafter.Graphics;
import std;
using namespace Crafter;
int main() {
/*
This creates a window titled "HelloWindow" with a size of 1280x720 pixels.
The WindowWaylandWayland class is a specialized window implementation
that uses the Wayland display server protocol and renderer (hence the name "WaylandWayland").
*/
Window window("HelloWindow", 1280, 720);
/*
This starts the windows main event loop, allowing it to respond to user input and system events.
The window will remain open and responsive until it is closed.
You can hook into various events through the event system.
This call blocks the current thread; to run the event loop asynchronously, use StartAsync instead.
*/
window.StartSync();
}