|
|

楼主 |
发表于 2005-8-24 13:45:00
|
显示全部楼层
Re: D3D中的2D问题,请多指教
g_pD3DDevice->BeginScene();
pD3DSprite->Begin();
g_pD3DDevice->SetTexture( 0, pD3DTex[10] );
g_pD3DDevice->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_MODULATE );
g_pD3DDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );
g_pD3DDevice->SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE );
g_pD3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_DISABLE );
pD3DSprite->Draw(pD3DTex[9], &rect, &sc, NULL, rot, NULL, D3DCOLOR_ARGB(255, 255, 255, 255));
pD3DSprite->Draw(pD3DTex[10], NULL, &sc, NULL, rot, &diag, D3DCOLOR_ARGB(255, 255, 255, 255));
pD3DSprite->End();
g_pD3DDevice->EndScene();
以上代码没有效果:(请帮忙 |
|