This repository was archived by the owner on Apr 16, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrender_context.hpp
More file actions
67 lines (55 loc) · 1.71 KB
/
Copy pathrender_context.hpp
File metadata and controls
67 lines (55 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#pragma once
#include <memory>
namespace bnb::oep::interfaces
{
class render_context;
}
using render_context_sptr = std::shared_ptr<bnb::oep::interfaces::render_context>;
namespace bnb::oep::interfaces
{
class render_context
{
public:
/**
* Create the rendering context.
*
* @return - shared pointer to the rendering context
*
* @example bnb::oep::interfaces::render_context::create()
*/
static render_context_sptr create();
virtual ~render_context() = default;
/**
* Create and initialize a rendering context. Should be called in offscreen render target.
*
* @example create_context()
*/
virtual void create_context() = 0;
/**
* Make the rendering context active on the current thread. Should be called in
* offscreen render target.
*
* @example activate()
*/
virtual void activate() = 0;
/**
* Turn off rendering context on current thread. Should be called in offscreen render target.
*
* @example deactivate()
*/
virtual void deactivate() = 0;
/**
* Delete a rendering context. Should be called in offscreen render target.
*
* @example delete_context()
*/
virtual void delete_context() = 0;
/**
* Returns a raw pointer to the rendering context. This pointer is interpreted differently
* on each platform.
*
* @example get_sharing_context();
*/
virtual void* get_sharing_context() = 0;
}; /* class render_context INTERFACE */
} /* namespace bnb::oep::interfaces */