Jump to content
  • Advertisement
Sign in to follow this  
gomidas

C# SharpDX how to implement 2d text rendering on direct3d11 device ?

This topic is 610 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 use direct3d11 to render my polygons I use multiple layers on same form. I want to render text on same form but I can not do that when I try that, I create over it which is already rendered and that flickers cleared screen for 2d and 3d same time. I have to do that over 3d device. Then I will render text over rendered 3d scene. I do not know how to do that. What is the right way ?

Share this post


Link to post
Share on other sites
Advertisement
In short. Yes you have to render your text into the scene. The reason it flickers is draw calls from the gdi are being over written by d3d.

Which does require a bit of roll your own implementation for text writing as you guessed correctly. It needs to be drawn into the scene.

There are some free font to bitmap tools or there which you can create textures. You need to write a class to cut these up and texture to polygons.

If you find yourself at a loose end i can send you my class for doing writing. Pm and i will send the c# code.

Share this post


Link to post
Share on other sites

In short. Yes you have to render your text into the scene. The reason it flickers is draw calls from the gdi are being over written by d3d.

Which does require a bit of roll your own implementation for text writing as you guessed correctly. It needs to be drawn into the scene.

There are some free font to bitmap tools or there which you can create textures. You need to write a class to cut these up and texture to polygons.

If you find yourself at a loose end i can send you my class for doing writing. Pm and i will send the c# code.

So I get from answer I will not able to mix direct 2d text drawing on 3d scene I will create textures from font files. Still, I will use 3d drawing but that will look like 2d.

Edited by gomidas

Share this post


Link to post
Share on other sites

 

In short. Yes you have to render your text into the scene. The reason it flickers is draw calls from the gdi are being over written by d3d.

Which does require a bit of roll your own implementation for text writing as you guessed correctly. It needs to be drawn into the scene.

There are some free font to bitmap tools or there which you can create textures. You need to write a class to cut these up and texture to polygons.

If you find yourself at a loose end i can send you my class for doing writing. Pm and i will send the c# code.

So I get from answer I will not able to mix direct 2d text drawing on 3d scene I will create textures from font files. Still, I will use 3d drawing but that will look like 2d.

 

Correct, you will need to render the the textured polygons into your scene.

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.

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!