Tatooine
context.h
Go to the documentation of this file.
1#ifndef TATOOINE_GL_CONTEXT_H
2#define TATOOINE_GL_CONTEXT_H
3//==============================================================================
6
7#include <array>
8#include <memory>
9#include <iostream>
10#include <list>
11#include <string>
12//==============================================================================
13namespace tatooine::gl {
14//==============================================================================
15class window;
16class context {
17 public:
18 //============================================================================
19 // members
20 //============================================================================
21 std::unique_ptr<glfw::context> m_glfw_context;
22
23 //============================================================================
24 // ctors / dtor
25 //============================================================================
26 public:
28 context(context&&) noexcept = default;
29 auto operator=(context&&) noexcept -> context& = default;
30 ~context() = default;
31 context(context& parent);
32 context(window& parent);
33
34 //============================================================================
35 // methods
36 //============================================================================
37 public:
40 void release();
41 auto get() -> auto& { return *m_glfw_context; }
42 auto get() const -> auto const& { return *m_glfw_context; }
43};
44//==============================================================================
45} // namespace tatooine::gl
46//==============================================================================
47#endif
Definition: context.h:16
context create_shared_context()
auto get() const -> auto const &
Definition: context.h:42
std::unique_ptr< glfw::context > m_glfw_context
Definition: context.h:21
context(context &&) noexcept=default
Definition: window.h:20
Definition: ansiformat.h:6
typename get_impl< Container, I >::type get
Definition: get.h:11