Hello.
I'm trying to cut my text a bit but I can't get SetScissorRect() to work properly. It doesn't do anything for me. I can see whole text on the screen. I'm using it like that:
//In this example, whole text should be cut because I get rect values using DT_CALCRECT flag and then pass the rect to SetScissorRect()
m_pSprite->Begin(D3DXSPRITE_ALPHABLEND);
//a few lines of code that aren't important now
pFont->DrawText(m_pSprite, logbuf, -1, &rct, DT_CALCRECT, dwColor);
TitleRect = rct;
pDevice->SetRenderState(D3DRS_SCISSORTESTENABLE, TRUE);
pDevice->SetScissorRect(&TitleRect);
pFont->DrawText(m_pSprite, logbuf, -1, &rct, DT_NOCLIP, dwColor);
pDevice->SetRenderState(D3DRS_SCISSORTESTENABLE , FALSE);
m_pSprite->End();
I also tried putting static values into TitleRect, for example like that:
TitleRect.top = 50; TitleRect.left = 50; TitleRect.bottom = 100; TitleRect.right = 100;
but I also get no results. SetScissorRect() isn't doing anything.