I have hooked the endscene of a game, and want to draw my desktop as an overlay using a ID3DXSprite. (I don't want to run my game minimized and want to be able to look at my desktop by pressing a key)
So it works, but after a few seconds it will just stop showing up. To be precise: it works while the screen of the game is still black and when the game is "loaded" the game shows up.
Now I thought the ID3DXSprite was just being rendered behind the actual game, but I haven't found a way to get it to render in front.
But it could be something else entirely, so I would like some ideas and suggestions.
code:
RECT r;
r.right = 1920;
r.bottom = 1080;
D3DXMATRIX d;
D3DXMatrixIdentity(&d);
m_pSpriteRenderer->SetWorldViewLH(&d,NULL);
m_pSpriteRenderer->Begin( D3DXSPRITE_ALPHABLEND);
m_pSpriteRenderer->SetTransform(&d);
m_pSpriteRenderer->Draw(
m_texture,
&r,
NULL,
NULL,
D3DCOLOR_COLORVALUE(1.0f,1.0f,1.0f,1.0f));
m_pSpriteRenderer->Flush();//draw the whole queue
m_pSpriteRenderer->End();