Presentation is loading. Please wait.

Presentation is loading. Please wait.

void Direct3DBase::CreateDeviceResources() { D3D_FEATURE_LEVEL featureLevels[] = { D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0,

Similar presentations


Presentation on theme: "void Direct3DBase::CreateDeviceResources() { D3D_FEATURE_LEVEL featureLevels[] = { D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0,"— Presentation transcript:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16 void Direct3DBase::CreateDeviceResources() { D3D_FEATURE_LEVEL featureLevels[] = { D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL_10_0, D3D_FEATURE_LEVEL_9_3, D3D_FEATURE_LEVEL_9_2, D3D_FEATURE_LEVEL_9_1 }; //...

17 D3D11CreateDevice( nullptr, // use the default adapter D3D_DRIVER_TYPE_HARDWARE, 0, creationFlags, // defined above featureLevels, // what app will support ARRAYSIZE(featureLevels), D3D11_SDK_VERSION, // should always be D3D11_SDK_VERSION &device, // created device &m_featureLevel, // feature level of the device &context // corresponding immediate context );

18 // Determine the technique that will be used to render the sprites. auto featureLevel = d3dDevice->GetFeatureLevel(); if (featureLevel >= D3D_FEATURE_LEVEL_10_0) { // Generate sprites on GPU using Geometry Shader m_technique = RenderTechnique::GeometryShader; }

19

20

21

22

23

24

25

26

27

28

29

30

31

32


Download ppt "void Direct3DBase::CreateDeviceResources() { D3D_FEATURE_LEVEL featureLevels[] = { D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0,"

Similar presentations


Ads by Google