Tatooine
gl
include
tatooine
gl
context.h
Go to the documentation of this file.
1
#ifndef TATOOINE_GL_CONTEXT_H
2
#define TATOOINE_GL_CONTEXT_H
3
//==============================================================================
4
#include <
tatooine/gl/glfw/context.h
>
5
#include <
tatooine/gl/glincludes.h
>
6
7
#include <array>
8
#include <memory>
9
#include <iostream>
10
#include <list>
11
#include <string>
12
//==============================================================================
13
namespace
tatooine::gl
{
14
//==============================================================================
15
class
window;
16
class
context
{
17
public
:
18
//============================================================================
19
// members
20
//============================================================================
21
std::unique_ptr<glfw::context>
m_glfw_context
;
22
23
//============================================================================
24
// ctors / dtor
25
//============================================================================
26
public
:
27
context
();
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:
38
context
create_shared_context
();
39
void
make_current
();
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
tatooine::gl::context
Definition:
context.h:16
tatooine::gl::context::create_shared_context
context create_shared_context()
tatooine::gl::context::make_current
void make_current()
tatooine::gl::context::context
context()
tatooine::gl::context::get
auto get() const -> auto const &
Definition:
context.h:42
tatooine::gl::context::m_glfw_context
std::unique_ptr< glfw::context > m_glfw_context
Definition:
context.h:21
tatooine::gl::context::release
void release()
tatooine::gl::context::context
context(context &&) noexcept=default
tatooine::gl::window
Definition:
window.h:20
context.h
glincludes.h
tatooine::gl
Definition:
ansiformat.h:6
tatooine::get
typename get_impl< Container, I >::type get
Definition:
get.h:11
Generated by
1.9.5