Jump to content
  • Advertisement
oeria2000

3D Question about Font and Text in Direct3D

This topic is 366 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

I have started my "small game" for a few days, I use DirectX 9(some reason i chose this old version of dx) as my graphic engine, I need the effect like the show below. I think that i may need some depth sorting algorism? The text seems to be drawed on 2d surface(sorted and always be the front)?, I'm a beginer in DX, not too much experience... Any suggestion to me is welcome, thanks

txt.png.49ef225e3a1dd86f1aba1c8415415947.png

Share this post


Link to post
Share on other sites
Advertisement

Your question is not very clear - do you want the text to always be in front of the tree?  We would also need more context about how you are drawing these things.

It does sound like you need to sort the things you're drawing, but how you do that will depend on how you're drawing things, and what you want the result to look like.

Share this post


Link to post
Share on other sites
On ‎2017‎年‎9‎月‎28‎日 at 10:34 PM, NightCreature83 said:

You can just z test the stream of characters so turn depth test enabled on for text rendering

thanks NightCreature83, i'll try,  i think it could be the method, i draw text using ID3DXFont::DrawText(),  how can i set z depth before drawing(fixed pipeline)? this method seems always draw things on front of all,  more help please, tks:) 

Share this post


Link to post
Share on other sites
On ‎2017‎年‎9‎月‎28‎日 at 9:40 PM, trjh2k2 said:

Your question is not very clear - do you want the text to always be in front of the tree?  We would also need more context about how you are drawing these things.

It does sound like you need to sort the things you're drawing, but how you do that will depend on how you're drawing things, and what you want the result to look like.

thanks trjh2k2, i draw text using ID3DXFont::DrawText(), but i found that it draw text always be the front, sometimes i need the text behind the scene object, like "tony" in my image. any help? thanks :)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!