annotate DirectX11.h @ 2402:8cee51ce4382

included directx 11
author Ritor1
date Mon, 14 Jul 2014 10:03:44 +0600
parents
children b29880e9ee79
rev   line source
2402
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
1 #define WIN32_LEAN_AND_MEAN
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
2 #include <windows.h>
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
3
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
4 #include <MMSystem.h>
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
5
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
6 #include <d3d11.h>
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
7 #pragma comment(lib, "d3d11.lib")
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
8 #pragma comment(lib, "winmm.lib")
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
9
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
10 class D3D11
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
11 {
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
12 HINSTANCE g_hInst;
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
13 HWND g_hWnd;
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
14 D3D_DRIVER_TYPE g_driverType; //Этот параметр указывает, производить вычисления в видеокарте или в центральном процессоре.
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
15 D3D_FEATURE_LEVEL g_featureLevel; //параметр, указывающий, какую версию DirectX поддерживает наша видеокарта.
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
16 ID3D11Device* g_pd3dDevice;
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
17 ID3D11DeviceContext* g_pImmediateContext;
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
18 IDXGISwapChain* g_pSwapChain;
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
19 ID3D11RenderTargetView* g_pRenderTargetView;
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
20
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
21
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
22 public:
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
23
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
24 D3D11():
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
25 g_hInst(NULL), g_hWnd(NULL), g_driverType(D3D_DRIVER_TYPE_NULL), g_featureLevel(D3D_FEATURE_LEVEL_11_0),
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
26 g_pd3dDevice(NULL), g_pImmediateContext(NULL), g_pSwapChain(NULL), g_pRenderTargetView(NULL){}
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
27
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
28 HRESULT InitDevice(); // Инициализация устройств DirectX
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
29 void CleanupDevice(); // Удаление созданнных устройств DirectX
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
30 void Render(); // Функция рисования
8cee51ce4382 included directx 11
Ritor1
parents:
diff changeset
31 };