Direct3D学习_绘制
運行了示例,重要步驟記錄如下:
1:創建頂點和索引緩存
IDirect3DDevice9::CreateVertexBuffer
IDirect3DDevice9::CreateIndexBuffer
2:填充數據
lock
........
unlock
3:設置攝像機
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:設置繪制狀態
IDirect3DDevice9::SetRenderState
5:繪制
IDirect3DDevice9::BeginScene
IDirect3DDevice9::SetStreamSource
IDirect3DDevice9::DrawPrimitive
IDirect3DDevice9::EndScene
6:釋放資源
Release
轉載于:https://www.cnblogs.com/tankw/archive/2012/02/15/2352775.html
總結
以上是生活随笔為你收集整理的Direct3D学习_绘制的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ajax长链接--拉实现
- 下一篇: 产生的DLL (VS2005, MATL