19,468
社区成员
发帖
与我相关
我的任务
分享
m_lpD3DDevice->BeginScene();
m_lpSprite->Begin(D3DXSPRITE_ALPHABLEND);
D3DXMATRIX scaleMatrix;
D3DXMATRIX transMatrix;
D3DXMatrixScaling(&scaleMatrix, 1.0f, 1.0f, 0.0f); //无缩放
D3DXMatrixTranslation(&transMatrix, (float)x, (float)y, 0.0f); //位移(x,y)
D3DXMatrixMultiply(&transMatrix, &scaleMatrix, &transMatrix);
m_lpSprite->SetTransform(&transMatrix);
m_lpSprite->Draw(pTexture,NULL,NULL,NULL,D3DCOLOR_ARGB(nAlpha,255,255,255));
m_lpSprite->End();
m_lpD3DDevice->EndScene();