   D3DXFont - Text coming out as blocks of colour
  I'm using D3DXFont for the first time and I've run into a problem, basically my text is being displayed as coloured blocks rather than text.The blue blocks are the text.I've played around with a few function arguments and stuff but to no avail and I cannot find any help in the SDK help files.All my DirectX return values are checked with the FAILED() macro and logged if there is a problem and nothing has shown up.Here's the relevent code://My font objectLPD3DXFONT g_Font = 0;//Creating the fontD3DXCreateFont(g_d3ddevice, 12, 0, FW_NORMAL, 1, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &g_Font);//Drawing TextRECT rc;std::stringstream ss;ss<<"Test: "<<g_Score; //g_Score has a value of 0 for testingrc.left = 246;rc.top = 77;rc.right = 397;rc.bottom = 96;g_Font->DrawText(g_Sprite, ss.str().c_str(), -1, &rc, DT_RIGHT, D3DCOLOR_XRGB(0, 0, 255));//g_Sprite has been created and used to draw a texture right before this//text is drawnI think thats all the relevent code, if I've missed something let me know. Otherwise, can anyone see where I've gone wrong?Cheers :)   
  (edit: ok I didn't fix my problem)   ;  Try setting the first value in the DrawText function to NULL.That was the only change I made and it worked perfectly. Otherwise I am not very familiar with handling text sprites.   ;  Thanks for the reply.When you change the first parameter of DrawText() to NULL it causes Direct3D to use an internal D3DXSprite object to render the text, thus preventing me from batching rendering calls etc.(Edit)Woohoo I've fixed it, I rendered a texture right before my call to DrawText but I didn't have a call to D3DXSprite::Flush(), which I believe I needed?(/Edit);[source lang=cpp]g_Sprite->Begin( D3DXSPRITE_ALPHABLEND /* other opt. sorting flags */ );//Drawing TextRECT rc;std::stringstream ss;ss<<"Test: "<<g_Score; //g_Score has a value of 0 for testingrc.left = 246;rc.top = 77;rc.right = 397;rc.bottom = 96;g_Font->DrawText(g_Sprite, ss.str().c_str(), -1, &rc, DT_RIGHT, D3DCOLOR_XRGB(0, 0, 255));//g_Sprite has been created and used to draw a texture right before this//text is drawng_Sprite->End();