Elevate Engine 1
Loading...
Searching...
No Matches
GraphicsContext.h
Go to the documentation of this file.
1#pragma once
2
3namespace Elevate {
10
12 {
13 public:
16
17 virtual void Init()
18 {
19 s_context->m_state = GraphicsContextState::ACTIVE;
20 }
21
22 virtual void SwapBuffers() = 0;
23
25 {
26 return s_context;
27 }
28
29 static bool Valid()
30 {
31 return s_context != nullptr;
32 }
33
34 static bool CanUseContext()
35 {
36 return Valid() && s_context->m_state == GraphicsContextState::ACTIVE;
37 }
38 private:
40
41 static GraphicsContext* s_context;
42 };
43}
virtual void SwapBuffers()=0
static GraphicsContext * Get()