CG-Project2
Loading...
Searching...
No Matches
Layer.hpp
1
#pragma once
2
3
#include <string>
4
5
namespace
ogl {
6
class
Layer {
7
public
:
8
Layer(
const
std::string &name) : m_name(std::move(name)) {}
9
Layer() : Layer(
"Simple Layer"
) {}
10
Layer(
const
Layer &other) =
delete
;
11
virtual
~Layer() =
default
;
12
13
virtual
void
onAttach() {}
14
virtual
void
onDetach() {}
15
16
virtual
void
onUpdate() {}
17
virtual
void
onRender() {}
18
19
virtual
void
begin() {}
20
virtual
void
end() {}
21
22
std::string getName()
const
{
return
this->m_name; }
23
24
bool
isAttached()
const
{
return
this->m_attached; }
25
26
protected
:
27
std::string m_name{
"Layer"
};
28
bool
m_attached =
false
;
29
};
30
}
// namespace ogl
Opengl-Core
include
Core
Layer.hpp
Generated by
1.14.0