Skip to main content
GameDev.net gamedev.net
🔒 Locked

Text (ID3DXFont)

Started by utilae Oct 22, 2005 at 7:02 PM 0 replies 500+ views
Original Post
utilae
utilae
Hi, I am using C++ and Direct3D9. I am also using ID3DXFont. I am using the DrawText function to draw text. The only problem with this is if I draw a texture and a font in the same place, the font will always be at the top. So there is no way to make a texture go above the font, ie alter the z order of the font and texture. The main way I think to get around my problems is to somehow make the text become vertices and be rendered along with my other textures with one call to drawprimitive. So, anyone know how to make ID3DXFont text become vertices so that it can be drawn using drawprimitive? For example if there was a function that could be like drawtext, but instead of drawing the text to the screen, it would create vertices somehow which would be drawn by drawprimitive.
HTML5, iOS and Android Game Development using Corona SDK and moai SDK
blackpawn
blackpawn
what about creating the ID3DXSprite yourself and using that with DrawText? you should be able to set the transform for the sprite then so you can position it at whatever depth you like.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.