-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDrawDevice.h
More file actions
43 lines (34 loc) · 1.5 KB
/
DrawDevice.h
File metadata and controls
43 lines (34 loc) · 1.5 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
/************************************************************************
* *
* device.h -- Manages the Direct3D device *
* *
* Copyright (c) Microsoft Corp. All rights reserved. *
* *
* This code is licensed under the terms of the *
* Microsoft Kinect for Windows SDK (Beta) *
* License Agreement: http://kinectforwindows.org/KinectSDK-ToU *
* *
************************************************************************/
#pragma once
#include <d3d9.h>
// DrawDevice class
class DrawDevice
{
private:
HWND m_hwnd;
IDirect3D9 *m_pD3D;
IDirect3DDevice9 *m_pDevice;
IDirect3DSwapChain9 *m_pSwapChain;
// Format information
UINT m_height;
LONG m_lDefaultStride;
RECT m_rcDest; // Destination rectangle
public:
DrawDevice();
virtual ~DrawDevice();
// Implied bits per pixel is 32
HRESULT SetVideoType( int Width, int Height, int Stride );
HRESULT DrawFrame( BYTE * pBits );
HRESULT CreateDevice(HWND hwnd);
void DestroyDevice();
};