Chapter4 DIRECT3D INITIALIZATION (Introduction to 3D Game Programming with DirectX 11)笔记

4.1.1 Direct3D Overview

DX9可以部分安装,DX11 就必须全部安装,因此使用某特性时,不再需要检查是不是安装对应模块。

4.1.2 COM

使用Component-Object Model.

Component Object Model (COM) is the technology that allows DirectX to be language independent and have backwards
compatibility. Direct3D programmers don’t need to know the details of COM and how it works; they need only to know how to
acquire COM interfaces and how to release them.

4.1.3 Textures and Data Resource Formats

DXGI_FORMAT_R8G8B8A8_TYPELESS 可以用typeless,表明并不存储特定格式的值

4.1.5 Depth Buffering

深度缓冲存了一张和屏幕像素一一对应的一张纹理,每个值范围0~1,0最近,1最远

Depth Texture

注意里面如果有用到Stencil,会附加到后面

4.1.6 Texture Resource Views

一张texture在使用之前,需要bind到对应的pipeline才能使用。

eg:use a texture as a render target and as a shader resource

需要先声明flag,D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE

然后创建对应的RS ,

a render target view (ID3D11RenderTargetView) and a shader resource view (ID3D11ShaderResourceView)

然后才能bind到pipeline。

Resource views essentially do two things: they tell Direct3D how the resource will be used (i.e., what stage of the pipeline you will bind it to), and if the resource format was specified as typeless at creation time, then we must now state the type when creating a view. Thus, with typeless formats,

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值