|
|

楼主 |
发表于 2009-3-2 16:24:00
|
显示全部楼层
Re: ID3DXFont 怎么可以加入z的值?怎么也试没效果,快疯掉了
搞定了,低级错误一个
m_pSprite->Begin(D3DXSPRITE_ALPHABLEND | D3DXSPRITE_SORT_DEPTH_FRONTTOBACK);
D3DXMATRIX matrix;
D3DXMatrixIdentity(&matrix);
D3DXMatrixTranslation(&matrix, 0.0f, 0.0f, 0.5f); <-- 最后一个参数是z值
m_pSprite->SetTransform(&matrix);
m_pFont->DrawText(
m_pSprite, //<--- 这么低级的错误,呵呵...
pMsg,
-1, // size of string or -1 indicates null terminating string
&rect, // rectangle text is to be formatted to in windows coords
format, // draw in the top left corner of the viewport
color);
m_pSprite.End()
|
|