top of page

​Chap 2/100: Detect HW and Initializing DX11

What I will Learn here? ​

We will learn how to detect the HW configuration and start the DX11 Engine

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

​Note:

As you can see on this image we have the Dx11 Initializated and configured to work with shader v5.0

 

 

 

(main.h) - CHANGES

- Set for Chapter 2

​

(system/dx11Class.*) - This is our first simple version.

- We will detect the Card the monitor, the monitor/card refresh rate: getRefreshRate

- Create the Dx 11 device: createSwapChainDX11device

- Get the Shader Version: setBestShaderAvailabel

- We will create 6 Rasterizer State:

  m_rasterStateCullBack Hide the back of Poligon, used almost for all.

  m_rasterStateCullFront Hide the front of Poligon, for sky boxes for example, once we are inside!

  m_rasterStateCullNone Show both faces, for debug proposes and special cases, we will see later.

  (Solid and Wired State for all 3)

- Create the Viewport: Define the area that will be rendered in our window

- Create the Depth Stencil "View": The 2D map of our screen that represent the Z coord. of all pixels on screen,

used to decide which pixel should be rendered the closest one, sure!

- Create and set the BackBuffer: 2D memory image that will become a frame in  our monitor.

​

 

(system/SystemClass.*) - CHANGES

- DirectX 11 will be initialized for the first time.

- Check the new message on the Title Bar with the version number of your Graphic Card Shader.

- ALT + ENTER : now work as a default behavior on DX 11, we will return to this subject later.

 

(system/xml_loader.*) - CHANGES​

- Default Dx Settings will be defined here once we don't have yet a xml file.

​

​​​​​​​​​​​​​​​​​​​​SRC/main.h​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​

​​​​​​​SRC/main.cpp​​​​​​​​

​​​SRC/counter.h

​​​​​​​​​​​SRC/system/​SystemClass​.h​​​​​

​SRC/system/SystemClass.cpp​

​​SRC/system/xml_loader.h​

​SRC/system/xml_loader.cpp​

​​SRC/system/dx11Class.h​​

​SRC/system/dx11Class.cpp​

​

​Project Code:

​

WoMA_Chap2.zip

​

What's next? ​An engine need an Application frame to render images, let's go!

bottom of page