Direct3D学习_绘制
運(yùn)行了示例,重要步驟記錄如下:
1:創(chuàng)建頂點(diǎn)和索引緩存
IDirect3DDevice9::CreateVertexBuffer
IDirect3DDevice9::CreateIndexBuffer
2:填充數(shù)據(jù)
lock
........
unlock
3:設(shè)置攝像機(jī)
D3DXVECTOR3 position(x,y,z);
D3DXVECTOR3 target(x,y,z);
D3DXVECTOR3 up(x,y,z);
D3DXMATRIX V;
D3DXMatrixLookAtLH(&V, &position, &target, &up);
Device->SetTransform(D3DTS_VIEW, &V);
4:設(shè)置繪制狀態(tài)
IDirect3DDevice9::SetRenderState
5:繪制
IDirect3DDevice9::BeginScene
IDirect3DDevice9::SetStreamSource
IDirect3DDevice9::DrawPrimitive
IDirect3DDevice9::EndScene
6:釋放資源
Release
轉(zhuǎn)載于:https://www.cnblogs.com/tankw/archive/2012/02/15/2352775.html
總結(jié)
以上是生活随笔為你收集整理的Direct3D学习_绘制的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: ajax长链接--拉实现
- 下一篇: 产生的DLL (VS2005, MATL