FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
D3d10DeviceContextImpl.h
1 /**********************************************************\
2 Original Author: Gil Gonen
3 
4 Created: Jan 28, 2013
5 License: Dual license model; choose one of two:
6 New BSD License
7 http://www.opensource.org/licenses/bsd-license.php
8 - or -
9 GNU Lesser General Public License, version 2.1
10 http://www.gnu.org/licenses/lgpl-2.1.html
11 
12 Copyright 2013 Gil Gonen and the Firebreath development team
13 \**********************************************************/
14 
15 #pragma once
16 #ifndef H_FB_D3D10DEVICECONTEXTIMPL
17 #define H_FB_D3D10DEVICECONTEXTIMPL
18 
19 #include "D3d10DeviceContext.h"
20 
21 namespace FB
22 {
23  class D3d10DeviceContextImpl : public D3d10DeviceContext
24  {
25  public:
26  D3d10DeviceContextImpl();
27  virtual ~D3d10DeviceContextImpl();
28  virtual CComPtr<ID3D10Device1> device();
29 
30  // the actual call to D3D10CreateDevice1 can be overridden:
31  typedef HRESULT (WINAPI *D3D10CreateDevice1Func)(
32  IDXGIAdapter *pAdapter,
33  D3D10_DRIVER_TYPE DriverType,
34  HMODULE Software,
35  UINT Flags,
36  D3D10_FEATURE_LEVEL1 HardwareLevel,
37  UINT SDKVersion,
38  ID3D10Device1 **ppDevice
39  );
40  virtual HRESULT createDevice(D3D10CreateDevice1Func func, CComPtr<IDXGIAdapter1> adapter);
41 
42  protected:
43  CComPtr<ID3D10Device1> _dev;
44 
45  private:
46  HMODULE _d3d10;
47  HMODULE _dxgi;
48  };
49 }
50 
51 #endif