Posted on 2007-05-04 12:19
小明 阅读(3070)
评论(0) 编辑 收藏 引用 所属分类:
Game Development
D3D的画点功能其实也很强,速度也很快。
使用的API是IDirect3DDevice9::DrawPrimitiveUP
HRESULT DrawPrimitiveUP(
D3DPRIMITIVETYPE PrimitiveType,
UINT PrimitiveCount,
CONST void* pVertexStreamZeroData,
UINT VertexStreamZeroStride
);
设置好第一个参数PrimitiveType为D3DPT_POINTLIST就可以画点了


可以按WASD来改变星星的移动方向。
source code:
http://www.cppblog.com/Files/sandy/points_src.rar