Diligent Engine API Reference
RenderDeviceD3D12.h
1 /* Copyright 2015-2018 Egor Yusov
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
12  *
13  * In no event and under no legal theory, whether in tort (including negligence),
14  * contract, or otherwise, unless required by applicable law (such as deliberate
15  * and grossly negligent acts) or agreed to in writing, shall any Contributor be
16  * liable for any damages, including any direct, indirect, special, incidental,
17  * or consequential damages of any character arising as a result of this License or
18  * out of the use or inability to use the software (including but not limited to damages
19  * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
20  * all other commercial damages or losses), even if such Contributor has been advised
21  * of the possibility of such damages.
22  */
23 
24 #pragma once
25 
28 
29 #include "RenderDevice.h"
30 
31 namespace Diligent
32 {
33 // {C7987C98-87FE-4309-AE88-E98F044B00F6}
34 static constexpr INTERFACE_ID IID_RenderDeviceD3D12 =
35 { 0xc7987c98, 0x87fe, 0x4309, { 0xae, 0x88, 0xe9, 0x8f, 0x4, 0x4b, 0x0, 0xf6 } };
36 
39 {
40 public:
41 
43 
46  virtual ID3D12Device* GetD3D12Device() = 0;
47 
49  virtual Uint64 GetNextFenceValue() = 0;
50 
53  virtual Bool IsFenceSignaled(Uint64 FenceValue) = 0;
54 
57  virtual void FinishFrame() = 0;
58 
60 
66  virtual void CreateTextureFromD3DResource(ID3D12Resource *pd3d12Texture, ITexture **ppTexture) = 0;
67 
69 
78  virtual void CreateBufferFromD3DResource(ID3D12Resource *pd3d12Buffer, const BufferDesc& BuffDesc, IBuffer **ppBuffer) = 0;
79 };
80 
81 }
Render device interface.
Definition: RenderDevice.h:55
virtual Bool IsFenceSignaled(Uint64 FenceValue)=0
Checks if the fence value has been signaled by the GPU. True means that all associated work has been ...
Namespace for the OpenGL implementation of the graphics engine.
Definition: BufferD3D11Impl.h:34
Buffer interface.
Definition: Buffer.h:200
Interface to the render device object implemented in D3D12.
Definition: RenderDeviceD3D12.h:38
Buffer description.
Definition: Buffer.h:57
virtual ID3D12Device * GetD3D12Device()=0
Returns ID3D12Device interface of the internal Direct3D12 device object.
virtual Uint64 GetNextFenceValue()=0
Returns the fence value that will be signaled by the GPU command queue next.
virtual void CreateBufferFromD3DResource(ID3D12Resource *pd3d12Buffer, const BufferDesc &BuffDesc, IBuffer **ppBuffer)=0
Creates a buffer object from native d3d12 resoruce.
virtual void CreateTextureFromD3DResource(ID3D12Resource *pd3d12Texture, ITexture **ppTexture)=0
Creates a texture object from native d3d12 resource.
virtual void FinishFrame()=0
Should be called at the end of the frame when attached to existing D3D12 device Otherwise the method ...
Texture inteface.
Definition: Texture.h:276