RetroArch
libretro_d3d.h
Go to the documentation of this file.
1 /* Copyright (C) 2010-2018 The RetroArch team
2  *
3  * ---------------------------------------------------------------------------------------------
4  * The following license statement only applies to this libretro API header (libretro_d3d.h)
5  * ---------------------------------------------------------------------------------------------
6  *
7  * Permission is hereby granted, free of charge,
8  * to any person obtaining a copy of this software and associated documentation files (the
9  * "Software"),
10  * to deal in the Software without restriction, including without limitation the rights to
11  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
12  * and to permit persons to whom the Software is furnished to do so, subject to the following
13  * conditions:
14  *
15  * The above copyright notice and this permission notice shall be included in all copies or
16  * substantial portions of the Software.
17  *
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
19  * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22  * LIABILITY,
23  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25  */
26 
27 #ifndef LIBRETRO_DIRECT3D_H__
28 #define LIBRETRO_DIRECT3D_H__
29 
30 #include "libretro.h"
31 
32 #ifdef HAVE_D3D11
33 
34 #include <d3d11.h>
35 #include <D3Dcompiler.h>
36 
37 #define RETRO_HW_RENDER_INTERFACE_D3D11_VERSION 1
38 
39 struct retro_hw_render_interface_d3d11
40 {
41  /* Must be set to RETRO_HW_RENDER_INTERFACE_D3D11. */
42  enum retro_hw_render_interface_type interface_type;
43  /* Must be set to RETRO_HW_RENDER_INTERFACE_D3D11_VERSION. */
44  unsigned interface_version;
45 
46  /* Opaque handle to the d3d11 backend in the frontend
47  * which must be passed along to all function pointers
48  * in this interface.
49  */
50  void* handle;
52  ID3D11DeviceContext *context;
53  D3D_FEATURE_LEVEL featureLevel;
55 };
56 
57 
58 #endif
59 
60 #endif /* LIBRETRO_DIRECT3D_H__ */
D3D_FEATURE_LEVEL
Definition: d3dcommon.h:79
interface ID3D11Device ID3D11Device
Definition: d3d11.h:329
retro_hw_render_interface_type
Definition: libretro.h:1203
HRESULT WINAPI D3DCompile(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData, _In_ SIZE_T SrcDataSize, _In_opt_ LPCSTR pSourceName, _In_reads_opt_(_Inexpressible_(pDefines->Name !=NULL)) CONST D3D_SHADER_MACRO *pDefines, _In_opt_ ID3DInclude *pInclude, _In_opt_ LPCSTR pEntrypoint, _In_ LPCSTR pTarget, _In_ UINT Flags1, _In_ UINT Flags2, _Out_ ID3DBlob **ppCode, _Always_(_Outptr_opt_result_maybenull_) ID3DBlob **ppErrorMsgs)
interface ID3D11DeviceContext ID3D11DeviceContext
Definition: d3d11.h:252
HRESULT(WINAPI * pD3DCompile)(LPCVOID pSrcData, SIZE_T SrcDataSize, LPCSTR pFileName, CONST D3D_SHADER_MACRO *pDefines, ID3DInclude *pInclude, LPCSTR pEntrypoint, LPCSTR pTarget, UINT Flags1, UINT Flags2, ID3DBlob **ppCode, ID3DBlob **ppErrorMsgs)
Definition: d3dcompiler.h:227
struct nk_device device
Definition: nk_common.c:44