Sign in to follow this  
gomidas

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

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this