Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
device.h
1 #pragma once
2 
3 #include "adapter.h"
4 #include "renderer/d3d12_includes.h"
5 #include "util/vector.h"
6 
7 namespace blowbox
8 {
14  class Device
15  {
16  public:
18  Device();
19 
21  ~Device();
22 
27  void Create();
28 
33  void Create(const Adapter& adapter);
34 
36  const Adapter& GetAdapter() const;
37 
39  ID3D12Device* Get() const;
40 
41  private:
43  ID3D12Device* device_;
44  };
45 }
Wraps the ID3D12Device.
Definition: device.h:14
Wraps an IDXGIAdapter.
Definition: adapter.h:27
Device()
Constructs a Device.
Definition: device.cc:10
const Adapter & GetAdapter() const
Definition: device.cc:58
~Device()
Destructs a Device.
Definition: device.cc:17
void Create()
Creates the actual Device.
Definition: device.cc:23
Adapter adapter_
The underlying Adapter that was used to construct the Device.
Definition: device.h:42
ID3D12Device * Get() const
Definition: device.cc:64
The main Blowbox namespace.
Definition: image.cc:8
ID3D12Device * device_
The underlying ID3D12Device.
Definition: device.h:43