Problem: DirectXTK SpriteFont/SpriteBatch set a state I can't determine. I want to be able to reset whatever it's doing. Looking for information.
Setup: D3D11, DirectXTK, Windows 7, Windows SDK 8.1
I'm trying out the DirectXTK and using SpriteFont/SpriteBatch for text. Some state gets changed which, after googling, examining code, reading docs, etc., I haven't been able to determine.
The symptom is that meshes rendered with LH projection and rasterstate set to cull-back-face appear ... I'm guessing... maybe RH or cull-front-face.. I can't tell for sure.
Before:
[attachment=21621:captured11_before.png]
After drawing text with font/spritebatch:
[attachment=21622:captured11.png]
// initialization
g_States.reset(new CommonStates(g_pd3dDevice));
g_Sprites.reset(new SpriteBatch(g_pImmediateContext));
g_Font.reset(new SpriteFont(g_pd3dDevice, L"c:\\visualstudio\\d11engine4\\DirectXTK\\italic.spritefont"));
....
// rendering
if (bViewStats) // turns on and off text display
{
g_Sprites->Begin(SpriteSortMode_Deferred);
g_Font->DrawString(g_Sprites.get(), L"DirectXTK Simple Sample", XMFLOAT2(100, 10), Colors::Yellow);
g_Sprites->End();
}
Yeah, I copied and pasted some code from the DirectXTK simple sample - but I have tried to find the answer. Really.
Any help?