Jump to content
  • Advertisement
Sign in to follow this  
theMadHatter

DrawText

This topic is 4519 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. I don't get any error saying it doesn't work but it doesn't.. work. So is there anything immediately wrong with this.
pd3dDevice->BeginScene();

D3DCOLOR fontColor = D3DCOLOR_ARGB(10,10,10,10);   

RECT rct;
rct.left=10;
rct.right=40;
rct.top=10;
rct.bottom=40;

hr = m_font->DrawText(NULL, "Hello World", 11, &rct, NULL, fontColor );
if (FAILED(hr))
	MessageBox(NULL, "Draw Text", "ERROR", MB_OK);

pd3dDevice->EndScene();

Thanks

Share this post


Link to post
Share on other sites
Advertisement
This may be because you have the alpha set to 10. If you are using a default black fill colour, this'll also contribute to making it very very dark, so you likely can't even see what it IS drawing.

Try setting it to a higher value, like pure white. (255,255,255, 255)

Share this post


Link to post
Share on other sites
Actually I had it at that but I just changed it and forgot to change it in this post. Still nothing. It is being called every frame. Maybe it's something wrong with my other code or computer. Idk. Anything else that could have something to do with it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!