quark/sandbox/src/Application.cpp

33 lines
468 B
C++
Raw Normal View History

2025-01-03 10:26:53 +00:00
#include <memory>
#include <quark.hpp>
2025-01-03 09:21:31 +00:00
2025-01-05 14:53:52 +00:00
class ExampleLayer :
public qk::Layer
{
public:
ExampleLayer() :
Layer("Example")
{ }
void OnUpdate() override {
QK_TRACE("ExampleLayer::Update");
}
void OnEvent(qk::Event& event) override {
QK_TRACE(event);
}
};
2025-01-03 10:26:53 +00:00
class Sandbox :
public qk::Application
{
public:
2025-01-05 14:53:52 +00:00
Sandbox() {
PushLayer(new ExampleLayer);
}
2025-01-03 10:26:53 +00:00
};
std::unique_ptr<qk::Application> qk::CreateApplication() {
return std::make_unique<Sandbox>();
2025-01-03 09:21:31 +00:00
}