Incremental Engine  1.0.6
A 2D Game Engine to create Idle Games
IncrementalEngine::D3DImplementation Class Reference

#include <D3DImplementation.h>

Public Member Functions

 D3DImplementation (Config config)
 
virtual ~D3DImplementation ()
 
HRESULT Init (RenderWindow *renderWindow)
 
void BeginScene (float red, float green, float blue, float alpha)
 
void EndScene ()
 
ID3D11Device * GetDevice ()
 
ID3D11DeviceContext * GetDeviceContext ()
 
void GetProjectionMatrix (D3DXMATRIX &projectionMatrix)
 
void GetWorldMatrix (D3DXMATRIX &worldMatrix)
 
void SetWorldMatrix (D3DXMATRIX &worldMatrix)
 
void GetOrthoProjectionMatrix (D3DXMATRIX &orthoMatrix)
 
void GetVideoCardInfo (char *cardName, int &memory)
 
void TurnZBufferOn ()
 
void TurnZBufferOff ()
 

Private Member Functions

HRESULT SetupAdapterOutput (unsigned int &numerator, unsigned int &denominator)
 
HRESULT CreateDeviceAndSwapChain (unsigned int numerator, unsigned int denominator)
 
HRESULT SetupRenderTarget ()
 
HRESULT SetupDepthStencilBufferAndState ()
 
HRESULT CreateDepthStencilState (ID3D11DepthStencilState *&depthStencilState, bool enableZBuffer)
 
HRESULT SetupDeviceRasterizerState ()
 
void SetupViewport ()
 
void SetupD3DMatrices ()
 

Private Attributes

RenderWindow_renderWindow
 
Config _config
 
int _videoCardMemory
 
char _videoCardDescription [128]
 
IDXGISwapChain * _swapChain
 
ID3D11Device * _device
 
ID3D11DeviceContext * _deviceContext
 
ID3D11RenderTargetView * _renderTargetView
 
ID3D11Texture2D * _depthStencilBuffer
 
ID3D11DepthStencilState * _depthStencilState
 
ID3D11DepthStencilView * _depthStencilView
 
ID3D11RasterizerState * _rasterState
 
D3DXMATRIX _projectionMatrix
 
D3DXMATRIX _worldMatrix
 
D3DXMATRIX _orthoProjectionMatrix
 
ID3D11DepthStencilState * _depthDisabledStencilState
 

Detailed Description

Definition at line 21 of file D3DImplementation.h.

Constructor & Destructor Documentation

◆ D3DImplementation()

IncrementalEngine::D3DImplementation::D3DImplementation ( Config  config)

Definition at line 9 of file D3DImplementation.cpp.

9  :
10  _swapChain(0),
11  _device(0),
12  _deviceContext(0),
17  _rasterState(0),
19  _config(config)
20  {
21  }

◆ ~D3DImplementation()

IncrementalEngine::D3DImplementation::~D3DImplementation ( )
virtual

Definition at line 23 of file D3DImplementation.cpp.

24  {
25  if (_swapChain)
26  {
27  _swapChain->SetFullscreenState(FALSE, NULL);
28  }
29 
30  if (_deviceContext)
31  {
32  _deviceContext->ClearState();
33  }
34 
35  CHECKED_RELEASE(_depthDisabledStencilState);
36  CHECKED_RELEASE(_rasterState);
37  CHECKED_RELEASE(_depthStencilView);
38  CHECKED_RELEASE(_depthStencilState);
39  CHECKED_RELEASE(_depthStencilBuffer);
40  CHECKED_RELEASE(_renderTargetView);
41  CHECKED_RELEASE(_deviceContext);
42  CHECKED_RELEASE(_device);
43  CHECKED_RELEASE(_swapChain);
44  }

Member Function Documentation

◆ BeginScene()

void IncrementalEngine::D3DImplementation::BeginScene ( float  red,
float  green,
float  blue,
float  alpha 
)

Definition at line 98 of file D3DImplementation.cpp.

99  {
100  float color[4] = { red, green, blue, alpha };
101  TurnZBufferOff();
102  _deviceContext->ClearRenderTargetView(_renderTargetView, color);
103  _deviceContext->ClearDepthStencilView(_depthStencilView, D3D11_CLEAR_DEPTH, 1.0f, 0);
104  }

◆ CreateDepthStencilState()

HRESULT IncrementalEngine::D3DImplementation::CreateDepthStencilState ( ID3D11DepthStencilState *&  depthStencilState,
bool  enableZBuffer 
)
private

Definition at line 439 of file D3DImplementation.cpp.

440  {
441  HRESULT result;
442  D3D11_DEPTH_STENCIL_DESC depthStencilDesc;
443 
444  ZeroMemory(&depthStencilDesc, sizeof(depthStencilDesc));
445 
446  depthStencilDesc.DepthEnable = enableZBuffer;
447  depthStencilDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL;
448  depthStencilDesc.DepthFunc = D3D11_COMPARISON_LESS;
449  depthStencilDesc.StencilEnable = true;
450  depthStencilDesc.StencilReadMask = 0xFF;
451  depthStencilDesc.StencilWriteMask = 0xFF;
452  depthStencilDesc.FrontFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
453  depthStencilDesc.FrontFace.StencilDepthFailOp = D3D11_STENCIL_OP_INCR;
454  depthStencilDesc.FrontFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
455  depthStencilDesc.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS;
456  depthStencilDesc.BackFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
457  depthStencilDesc.BackFace.StencilDepthFailOp = D3D11_STENCIL_OP_DECR;
458  depthStencilDesc.BackFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
459  depthStencilDesc.BackFace.StencilFunc = D3D11_COMPARISON_ALWAYS;
460 
461  result = _device->CreateDepthStencilState(&depthStencilDesc, &depthStencilState);
462  if (FAILED(result))
463  {
464  return CO_E_ERRORINAPP;
465  }
466 
467  return S_OK;
468  }

◆ CreateDeviceAndSwapChain()

HRESULT IncrementalEngine::D3DImplementation::CreateDeviceAndSwapChain ( unsigned int  numerator,
unsigned int  denominator 
)
private

Definition at line 226 of file D3DImplementation.cpp.

227  {
228  HRESULT result;
229  DXGI_SWAP_CHAIN_DESC swapChainDesc;
230  D3D_FEATURE_LEVEL featureLevel;
231 
232  ZeroMemory(&swapChainDesc, sizeof(swapChainDesc));
233 
234  swapChainDesc.BufferCount = 1;
235 
236  swapChainDesc.BufferDesc.Width = _renderWindow->GetScreenWidth();
237  swapChainDesc.BufferDesc.Height = _renderWindow->GetScreenHeight();
238  swapChainDesc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
239 
240  if (_config.VsyncEnabled)
241  {
242  swapChainDesc.BufferDesc.RefreshRate.Numerator = numerator;
243  swapChainDesc.BufferDesc.RefreshRate.Denominator = denominator;
244  }
245  else
246  {
247  swapChainDesc.BufferDesc.RefreshRate.Numerator = 0;
248  swapChainDesc.BufferDesc.RefreshRate.Denominator = 1;
249  }
250 
251  swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
252 
253  swapChainDesc.OutputWindow = _renderWindow->GetHWND();
254 
255  swapChainDesc.SampleDesc.Count = 1;
256  swapChainDesc.SampleDesc.Quality = 0;
257 
258  swapChainDesc.Windowed = !_config.Fullscreen;
259 
260  swapChainDesc.BufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED;
261  swapChainDesc.BufferDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED;
262 
263  swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
264 
265  swapChainDesc.Flags = 0;
266 
267  featureLevel = D3D_FEATURE_LEVEL_11_0;
268 
269  result = D3D11CreateDeviceAndSwapChain(
270  NULL,
271  D3D_DRIVER_TYPE_HARDWARE,
272  NULL,
273  0,
274  &featureLevel,
275  1,
276  D3D11_SDK_VERSION,
277  &swapChainDesc,
278  &_swapChain,
279  &_device,
280  NULL,
282  );
283 
284  if (FAILED(result))
285  {
286  return CO_E_ERRORINAPP;
287  }
288 
289  return S_OK;
290  }

◆ EndScene()

void IncrementalEngine::D3DImplementation::EndScene ( )

Definition at line 106 of file D3DImplementation.cpp.

107  {
108  if (_config.VsyncEnabled)
109  {
110  _swapChain->Present(1, 0);
111  }
112  else
113  {
114  _swapChain->Present(0, 0);
115  }
116 
117  TurnZBufferOn();
118  }

◆ GetDevice()

ID3D11Device * IncrementalEngine::D3DImplementation::GetDevice ( )

Definition at line 470 of file D3DImplementation.cpp.

471  {
472  return _device;
473  }

◆ GetDeviceContext()

ID3D11DeviceContext * IncrementalEngine::D3DImplementation::GetDeviceContext ( )

Definition at line 475 of file D3DImplementation.cpp.

476  {
477  return _deviceContext;
478  }

◆ GetOrthoProjectionMatrix()

void IncrementalEngine::D3DImplementation::GetOrthoProjectionMatrix ( D3DXMATRIX &  orthoMatrix)

Definition at line 495 of file D3DImplementation.cpp.

496  {
497  orthoProjectionMatrix = _orthoProjectionMatrix;
498  }

◆ GetProjectionMatrix()

void IncrementalEngine::D3DImplementation::GetProjectionMatrix ( D3DXMATRIX &  projectionMatrix)

Definition at line 480 of file D3DImplementation.cpp.

481  {
482  projectionMatrix = _projectionMatrix;
483  }

◆ GetVideoCardInfo()

void IncrementalEngine::D3DImplementation::GetVideoCardInfo ( char *  cardName,
int &  memory 
)

Definition at line 500 of file D3DImplementation.cpp.

501  {
502  strcpy_s(cardName, 128, _videoCardDescription);
503  memory = _videoCardMemory;
504  }

◆ GetWorldMatrix()

void IncrementalEngine::D3DImplementation::GetWorldMatrix ( D3DXMATRIX &  worldMatrix)

Definition at line 485 of file D3DImplementation.cpp.

486  {
487  worldMatrix = _worldMatrix;
488  }

◆ Init()

HRESULT IncrementalEngine::D3DImplementation::Init ( RenderWindow renderWindow)

Definition at line 46 of file D3DImplementation.cpp.

47  {
48  HRESULT result;
49  unsigned int numerator, denominator;
50 
51  _renderWindow = renderWindow;
52 
53  result = SetupAdapterOutput(numerator, denominator);
54  if (FAILED(result))
55  {
56  return CO_E_ERRORINAPP;
57  }
58 
59  result = CreateDeviceAndSwapChain(numerator, denominator);
60  if (FAILED(result))
61  {
62  return CO_E_ERRORINAPP;
63  }
64 
65  result = SetupRenderTarget();
66  if (FAILED(result))
67  {
68  return CO_E_ERRORINAPP;
69  }
70 
72  if (FAILED(result))
73  {
74  return CO_E_ERRORINAPP;
75  }
76 
77  result = SetupDeviceRasterizerState();
78  if (FAILED(result))
79  {
80  return CO_E_ERRORINAPP;
81  }
82 
83  SetupViewport();
85 
86  const bool depth = false;
88  if (FAILED(result))
89  {
90  return CO_E_ERRORINAPP;
91  }
92 
94 
95  return S_OK;
96  }

◆ SetupAdapterOutput()

HRESULT IncrementalEngine::D3DImplementation::SetupAdapterOutput ( unsigned int &  numerator,
unsigned int &  denominator 
)
private

Definition at line 120 of file D3DImplementation.cpp.

121  {
122  HRESULT result;
123  IDXGIFactory* factory;
124  IDXGIAdapter* adapter;
125  IDXGIOutput* adapterOutput;
126  unsigned int numModes, stringLength;
127  DXGI_MODE_DESC* displayModeList;
128  DXGI_ADAPTER_DESC adapterDesc;
129 
130  result = CreateDXGIFactory(__uuidof(IDXGIFactory), (void**)&factory);
131  if (FAILED(result))
132  {
133  return CO_E_ERRORINAPP;
134  }
135 
136  result = factory->EnumAdapters(0, &adapter);
137  if (FAILED(result))
138  {
139  return CO_E_ERRORINAPP;
140  }
141 
142  result = adapter->EnumOutputs(0, &adapterOutput);
143  if (FAILED(result))
144  {
145  return CO_E_ERRORINAPP;
146  }
147 
148  result = adapterOutput->GetDisplayModeList(
149  DXGI_FORMAT_R8G8B8A8_UNORM,
150  DXGI_ENUM_MODES_INTERLACED,
151  &numModes,
152  NULL
153  );
154 
155  if (FAILED(result))
156  {
157  return CO_E_ERRORINAPP;
158  }
159 
160  displayModeList = new DXGI_MODE_DESC[numModes];
161  if (!displayModeList)
162  {
163  return CO_E_ERRORINAPP;
164  }
165 
166  result = adapterOutput->GetDisplayModeList(
167  DXGI_FORMAT_R8G8B8A8_UNORM,
168  DXGI_ENUM_MODES_INTERLACED,
169  &numModes,
170  displayModeList
171  );
172 
173  if (FAILED(result))
174  {
175  return CO_E_ERRORINAPP;
176  }
177 
178  for (unsigned int i = 0; i < numModes; i++)
179  {
180  if (displayModeList[i].Width == (unsigned int)_renderWindow->GetScreenWidth())
181  {
182  if (displayModeList[i].Height == (unsigned int)_renderWindow->GetScreenHeight())
183  {
184  numerator = displayModeList[i].RefreshRate.Numerator;
185  denominator = displayModeList[i].RefreshRate.Denominator;
186  }
187  }
188  }
189 
190  result = adapter->GetDesc(&adapterDesc);
191  if (FAILED(result))
192  {
193  return CO_E_ERRORINAPP;
194  }
195 
196  _videoCardMemory = (int)(adapterDesc.DedicatedVideoMemory / 1024 / 1024);
197 
198  int error = wcstombs_s(
199  &stringLength,
201  128,
202  adapterDesc.Description,
203  128
204  );
205 
206  if (error != 0)
207  {
208  return CO_E_ERRORINAPP;
209  }
210 
211  delete[] displayModeList;
212  displayModeList = 0;
213 
214  adapterOutput->Release();
215  adapterOutput = 0;
216 
217  adapter->Release();
218  adapter = 0;
219 
220  factory->Release();
221  factory = 0;
222 
223  return S_OK;
224  }

◆ SetupD3DMatrices()

void IncrementalEngine::D3DImplementation::SetupD3DMatrices ( )
private

Definition at line 404 of file D3DImplementation.cpp.

405  {
406  float fieldOfView = (float)D3DX_PI / 4.0f;
407  float screenAspect = (float)_renderWindow->GetScreenWidth() / (float)_renderWindow->GetScreenHeight();
408 
409  D3DXMatrixPerspectiveFovLH(
411  fieldOfView,
412  screenAspect,
415  );
416 
417  D3DXMatrixIdentity(&_worldMatrix);
418 
419  D3DXMatrixOrthoLH(
421  (float)_renderWindow->GetScreenWidth(),
422  (float)_renderWindow->GetScreenHeight(),
425  );
426 
427  D3DXMATRIX scaling, rotation, translation, worldMatrix;
428 
429  D3DXMatrixScaling(&scaling, 1, -1, 1);
430  D3DXMatrixRotationZ(&rotation, 0);
431  D3DXMatrixTranslation(&translation, 0, 0, 0);
432 
433  D3DXMatrixMultiply(&worldMatrix, &scaling, &rotation);
434  D3DXMatrixMultiply(&worldMatrix, &worldMatrix, &translation);
435 
436  SetWorldMatrix(worldMatrix);
437  }

◆ SetupDepthStencilBufferAndState()

HRESULT IncrementalEngine::D3DImplementation::SetupDepthStencilBufferAndState ( )
private

Definition at line 315 of file D3DImplementation.cpp.

316  {
317  HRESULT result;
318  D3D11_TEXTURE2D_DESC depthBufferDesc;
319  D3D11_DEPTH_STENCIL_VIEW_DESC depthStencilViewDesc;
320 
321  ZeroMemory(&depthBufferDesc, sizeof(depthBufferDesc));
322 
323  depthBufferDesc.Width = _renderWindow->GetScreenWidth();
324  depthBufferDesc.Height = _renderWindow->GetScreenHeight();
325  depthBufferDesc.MipLevels = 1;
326  depthBufferDesc.ArraySize = 1;
327  depthBufferDesc.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
328  depthBufferDesc.SampleDesc.Count = 1;
329  depthBufferDesc.SampleDesc.Quality = 0;
330  depthBufferDesc.Usage = D3D11_USAGE_DEFAULT;
331  depthBufferDesc.BindFlags = D3D11_BIND_DEPTH_STENCIL;
332  depthBufferDesc.CPUAccessFlags = 0;
333  depthBufferDesc.MiscFlags = 0;
334 
335  result = _device->CreateTexture2D(&depthBufferDesc, NULL, &_depthStencilBuffer);
336  if (FAILED(result))
337  {
338  return CO_E_ERRORINAPP;
339  }
340 
341  const bool depth = true;
343 
344  _deviceContext->OMSetDepthStencilState(_depthStencilState, 1);
345 
346  ZeroMemory(&depthStencilViewDesc, sizeof(depthStencilViewDesc));
347 
348  depthStencilViewDesc.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
349  depthStencilViewDesc.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2D;
350  depthStencilViewDesc.Texture2D.MipSlice = 0;
351 
352  result = _device->CreateDepthStencilView(_depthStencilBuffer, &depthStencilViewDesc, &_depthStencilView);
353  if (FAILED(result))
354  {
355  return CO_E_ERRORINAPP;
356  }
357 
358  _deviceContext->OMSetRenderTargets(1, &_renderTargetView, _depthStencilView);
359 
360  return S_OK;
361  }

◆ SetupDeviceRasterizerState()

HRESULT IncrementalEngine::D3DImplementation::SetupDeviceRasterizerState ( )
private

Definition at line 363 of file D3DImplementation.cpp.

364  {
365  HRESULT result;
366  D3D11_RASTERIZER_DESC rasterDesc;
367 
368  rasterDesc.AntialiasedLineEnable = false;
369  rasterDesc.CullMode = D3D11_CULL_BACK;
370  rasterDesc.DepthBias = 0;
371  rasterDesc.DepthBiasClamp = 0.0f;
372  rasterDesc.DepthClipEnable = true;
373  rasterDesc.FillMode = D3D11_FILL_SOLID;
374  rasterDesc.FrontCounterClockwise = false;
375  rasterDesc.MultisampleEnable = false;
376  rasterDesc.ScissorEnable = false;
377  rasterDesc.SlopeScaledDepthBias = 0.0f;
378 
379  result = _device->CreateRasterizerState(&rasterDesc, &_rasterState);
380  if (FAILED(result))
381  {
382  return CO_E_ERRORINAPP;
383  }
384 
385  _deviceContext->RSSetState(_rasterState);
386 
387  return S_OK;
388  }

◆ SetupRenderTarget()

HRESULT IncrementalEngine::D3DImplementation::SetupRenderTarget ( )
private

Definition at line 292 of file D3DImplementation.cpp.

293  {
294  HRESULT result;
295  ID3D11Texture2D* backBufferPtr;
296 
297  result = _swapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID*)&backBufferPtr);
298  if (FAILED(result))
299  {
300  return CO_E_ERRORINAPP;
301  }
302 
303  result = _device->CreateRenderTargetView(backBufferPtr, NULL, &_renderTargetView);
304  if (FAILED(result))
305  {
306  return CO_E_ERRORINAPP;
307  }
308 
309  backBufferPtr->Release();
310  backBufferPtr = 0;
311 
312  return S_OK;
313  }

◆ SetupViewport()

void IncrementalEngine::D3DImplementation::SetupViewport ( )
private

Definition at line 390 of file D3DImplementation.cpp.

391  {
392  D3D11_VIEWPORT viewport;
393 
394  viewport.Width = (float)_renderWindow->GetScreenWidth();
395  viewport.Height = (float)_renderWindow->GetScreenHeight();
396  viewport.MinDepth = 0.0f;
397  viewport.MaxDepth = 1.0f;
398  viewport.TopLeftX = 0.0f;
399  viewport.TopLeftY = 0.0f;
400 
401  _deviceContext->RSSetViewports(1, &viewport);
402  }

◆ SetWorldMatrix()

void IncrementalEngine::D3DImplementation::SetWorldMatrix ( D3DXMATRIX &  worldMatrix)

Definition at line 490 of file D3DImplementation.cpp.

491  {
492  _worldMatrix = worldMatrix;
493  }

◆ TurnZBufferOff()

void IncrementalEngine::D3DImplementation::TurnZBufferOff ( )

Definition at line 511 of file D3DImplementation.cpp.

512  {
513  _deviceContext->OMSetDepthStencilState(_depthDisabledStencilState, 1);
514  }

◆ TurnZBufferOn()

void IncrementalEngine::D3DImplementation::TurnZBufferOn ( )

Definition at line 506 of file D3DImplementation.cpp.

507  {
508  _deviceContext->OMSetDepthStencilState(_depthStencilState, 1);
509  }

Member Data Documentation

◆ _config

Config IncrementalEngine::D3DImplementation::_config
private

Definition at line 44 of file D3DImplementation.h.

◆ _depthDisabledStencilState

ID3D11DepthStencilState* IncrementalEngine::D3DImplementation::_depthDisabledStencilState
private

Definition at line 58 of file D3DImplementation.h.

◆ _depthStencilBuffer

ID3D11Texture2D* IncrementalEngine::D3DImplementation::_depthStencilBuffer
private

Definition at line 51 of file D3DImplementation.h.

◆ _depthStencilState

ID3D11DepthStencilState* IncrementalEngine::D3DImplementation::_depthStencilState
private

Definition at line 52 of file D3DImplementation.h.

◆ _depthStencilView

ID3D11DepthStencilView* IncrementalEngine::D3DImplementation::_depthStencilView
private

Definition at line 53 of file D3DImplementation.h.

◆ _device

ID3D11Device* IncrementalEngine::D3DImplementation::_device
private

Definition at line 48 of file D3DImplementation.h.

◆ _deviceContext

ID3D11DeviceContext* IncrementalEngine::D3DImplementation::_deviceContext
private

Definition at line 49 of file D3DImplementation.h.

◆ _orthoProjectionMatrix

D3DXMATRIX IncrementalEngine::D3DImplementation::_orthoProjectionMatrix
private

Definition at line 57 of file D3DImplementation.h.

◆ _projectionMatrix

D3DXMATRIX IncrementalEngine::D3DImplementation::_projectionMatrix
private

Definition at line 55 of file D3DImplementation.h.

◆ _rasterState

ID3D11RasterizerState* IncrementalEngine::D3DImplementation::_rasterState
private

Definition at line 54 of file D3DImplementation.h.

◆ _renderTargetView

ID3D11RenderTargetView* IncrementalEngine::D3DImplementation::_renderTargetView
private

Definition at line 50 of file D3DImplementation.h.

◆ _renderWindow

RenderWindow* IncrementalEngine::D3DImplementation::_renderWindow
private

Definition at line 43 of file D3DImplementation.h.

◆ _swapChain

IDXGISwapChain* IncrementalEngine::D3DImplementation::_swapChain
private

Definition at line 47 of file D3DImplementation.h.

◆ _videoCardDescription

char IncrementalEngine::D3DImplementation::_videoCardDescription[128]
private

Definition at line 46 of file D3DImplementation.h.

◆ _videoCardMemory

int IncrementalEngine::D3DImplementation::_videoCardMemory
private

Definition at line 45 of file D3DImplementation.h.

◆ _worldMatrix

D3DXMATRIX IncrementalEngine::D3DImplementation::_worldMatrix
private

Definition at line 56 of file D3DImplementation.h.

IncrementalEngine::D3DImplementation::SetupRenderTarget
HRESULT SetupRenderTarget()
Definition: D3DImplementation.cpp:292
IncrementalEngine::D3DImplementation::_projectionMatrix
D3DXMATRIX _projectionMatrix
Definition: D3DImplementation.h:55
IncrementalEngine::Config::VsyncEnabled
bool VsyncEnabled
Definition: Config.h:25
IncrementalEngine::D3DImplementation::_swapChain
IDXGISwapChain * _swapChain
Definition: D3DImplementation.h:47
IncrementalEngine::Config::Fullscreen
bool Fullscreen
Definition: Config.h:20
IncrementalEngine::D3DImplementation::_depthDisabledStencilState
ID3D11DepthStencilState * _depthDisabledStencilState
Definition: D3DImplementation.h:58
IncrementalEngine::D3DImplementation::_depthStencilView
ID3D11DepthStencilView * _depthStencilView
Definition: D3DImplementation.h:53
IncrementalEngine::D3DImplementation::_worldMatrix
D3DXMATRIX _worldMatrix
Definition: D3DImplementation.h:56
IncrementalEngine::D3DImplementation::_depthStencilBuffer
ID3D11Texture2D * _depthStencilBuffer
Definition: D3DImplementation.h:51
IncrementalEngine::D3DImplementation::TurnZBufferOff
void TurnZBufferOff()
Definition: D3DImplementation.cpp:511
IncrementalEngine::D3DImplementation::_videoCardDescription
char _videoCardDescription[128]
Definition: D3DImplementation.h:46
IncrementalEngine::D3DImplementation::SetupAdapterOutput
HRESULT SetupAdapterOutput(unsigned int &numerator, unsigned int &denominator)
Definition: D3DImplementation.cpp:120
IncrementalEngine::D3DImplementation::TurnZBufferOn
void TurnZBufferOn()
Definition: D3DImplementation.cpp:506
IncrementalEngine::Config::ScreenNear
float ScreenNear
Definition: Config.h:24
IncrementalEngine::D3DImplementation::_renderWindow
RenderWindow * _renderWindow
Definition: D3DImplementation.h:43
IncrementalEngine::D3DImplementation::_rasterState
ID3D11RasterizerState * _rasterState
Definition: D3DImplementation.h:54
IncrementalEngine::D3DImplementation::_videoCardMemory
int _videoCardMemory
Definition: D3DImplementation.h:45
IncrementalEngine::Config::ScreenDepth
float ScreenDepth
Definition: Config.h:23
IncrementalEngine::D3DImplementation::_orthoProjectionMatrix
D3DXMATRIX _orthoProjectionMatrix
Definition: D3DImplementation.h:57
IncrementalEngine::D3DImplementation::_deviceContext
ID3D11DeviceContext * _deviceContext
Definition: D3DImplementation.h:49
IncrementalEngine::D3DImplementation::_device
ID3D11Device * _device
Definition: D3DImplementation.h:48
IncrementalEngine::D3DImplementation::SetupD3DMatrices
void SetupD3DMatrices()
Definition: D3DImplementation.cpp:404
IncrementalEngine::D3DImplementation::_config
Config _config
Definition: D3DImplementation.h:44
IncrementalEngine::D3DImplementation::SetupDepthStencilBufferAndState
HRESULT SetupDepthStencilBufferAndState()
Definition: D3DImplementation.cpp:315
IncrementalEngine::D3DImplementation::SetupDeviceRasterizerState
HRESULT SetupDeviceRasterizerState()
Definition: D3DImplementation.cpp:363
IncrementalEngine::D3DImplementation::_renderTargetView
ID3D11RenderTargetView * _renderTargetView
Definition: D3DImplementation.h:50
IncrementalEngine::RenderWindow::GetScreenHeight
int GetScreenHeight()
Definition: RenderWindow.cpp:120
IncrementalEngine::D3DImplementation::CreateDepthStencilState
HRESULT CreateDepthStencilState(ID3D11DepthStencilState *&depthStencilState, bool enableZBuffer)
Definition: D3DImplementation.cpp:439
IncrementalEngine::D3DImplementation::SetupViewport
void SetupViewport()
Definition: D3DImplementation.cpp:390
IncrementalEngine::RenderWindow::GetScreenWidth
int GetScreenWidth()
Definition: RenderWindow.cpp:115
IncrementalEngine::D3DImplementation::CreateDeviceAndSwapChain
HRESULT CreateDeviceAndSwapChain(unsigned int numerator, unsigned int denominator)
Definition: D3DImplementation.cpp:226
IncrementalEngine::D3DImplementation::_depthStencilState
ID3D11DepthStencilState * _depthStencilState
Definition: D3DImplementation.h:52
IncrementalEngine::RenderWindow::GetHWND
HWND GetHWND()
Definition: RenderWindow.cpp:105
IncrementalEngine::D3DImplementation::SetWorldMatrix
void SetWorldMatrix(D3DXMATRIX &worldMatrix)
Definition: D3DImplementation.cpp:490