Karma Engine
Loading...
Searching...
No Matches
Layer.h
1#pragma once
2
3#include "krpch.h"
4
5#include "Karma/Events/Event.h"
6#include "Renderer/Scene.h"
7
8namespace Karma
9{
10 class KARMA_API Layer
11 {
12 public:
13 Layer(const std::string& name = "Layer");
14 virtual ~Layer();
15
16 virtual void OnAttach() = 0;
17 virtual void OnDetach() = 0;
18 virtual void OnUpdate(float deltaTime) = 0;
19 // If we want DearImGui to render the scene
20 virtual void ImGuiRender(float deltaTime) = 0;
21
22 virtual void OnEvent(Event& event)
23 {
24 }
25
26 inline const std::string& GetName() const
27 {
28 return m_DebugName;
29 }
30
31 protected:
32 std::string m_DebugName;
33 };
34}
Definition Event.h:35
Definition Layer.h:11