Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
Latest commit
32 lines (24 loc) · 806 Bytes
/
Copy pathmain.cpp
File metadata and controls
32 lines (24 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include<Optikos.hpp>
#include<SERuntime.hpp>
#include<iostream>
#include"VulkanConfig.hpp"
intmain() {
Logger::add_logger();
Optikos::Optikos app("space", 800, 480);
SE::SERuntine runtime(SE::SeRender::Vulkan);
if (app.getRenderer()->setUpConfig(runtime.SeAskConfig()))
std::cout << "TRUE" << std::endl;
else
std::cout << "FALSE" << std::endl;
auto data = (SharedVulkanConfig *)runtime.SeAskConfig();
auto btn = std::make_unique<Optikos::Button>(120, 30, Optikos::Vec2(20, 20),
"Click me");
btn->setEvent([]() { std::cout << "Clicked!\n"; });
app.addWidget(1, std::move(btn));
while (!app.should_close()) {
app.begin();
std::cout << data->swapChainExtent->height << std::endl;
app.end();
}
return0;
}