-
Notifications
You must be signed in to change notification settings - Fork 152
Expand file tree
/
Copy pathDevice.cpp
More file actions
103 lines (83 loc) · 2.26 KB
/
Device.cpp
File metadata and controls
103 lines (83 loc) · 2.26 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#include <Babylon/Graphics/Device.h>
#include "DeviceImpl.h"
namespace Babylon::Graphics
{
Device::Device(const Configuration& config)
: m_impl{new DeviceImpl{config}}
{
}
Device::~Device() = default;
// Move semantics
Device::Device(Device&&) noexcept = default;
Device& Device::operator=(Device&&) noexcept = default;
void Device::UpdateDevice(DeviceT device)
{
m_impl->UpdateDevice(device);
}
void Device::UpdateWindow(WindowT window)
{
m_impl->UpdateWindow(window);
}
void Device::UpdateSize(size_t width, size_t height)
{
m_impl->UpdateSize(width, height);
}
void Device::UpdateMSAA(uint8_t value)
{
m_impl->UpdateMSAA(value);
}
void Device::UpdateAlphaPremultiplied(bool enabled)
{
m_impl->UpdateAlphaPremultiplied(enabled);
}
#ifdef GRAPHICS_BACK_BUFFER_SUPPORT
void Device::UpdateBackBuffer(BackBufferColorT backBufferColor, BackBufferDepthStencilT backBufferDepthStencil)
{
m_impl->UpdateBackBuffer(backBufferColor, backBufferDepthStencil);
}
#endif
void Device::AddToJavaScript(Napi::Env env)
{
m_impl->AddToJavaScript(env);
}
Napi::Value Device::CreateContext(Napi::Env env)
{
return m_impl->CreateContext(env);
}
void Device::EnableRendering()
{
m_impl->EnableRendering();
}
void Device::DisableRendering()
{
m_impl->DisableRendering();
}
void Device::StartRenderingCurrentFrame()
{
m_impl->StartRenderingCurrentFrame();
}
void Device::FinishRenderingCurrentFrame()
{
m_impl->FinishRenderingCurrentFrame();
}
void Device::SetDiagnosticOutput(std::function<void(const char* output)> outputFunction)
{
m_impl->SetDiagnosticOutput(std::move(outputFunction));
}
void Device::SetHardwareScalingLevel(float level)
{
m_impl->SetHardwareScalingLevel(level);
}
float Device::GetHardwareScalingLevel()
{
return m_impl->GetHardwareScalingLevel();
}
float Device::GetDevicePixelRatio() const
{
return m_impl->GetDevicePixelRatio();
}
PlatformInfo Device::GetPlatformInfo() const
{
return m_impl->GetPlatformInfo();
}
}