   Does anyone have text writing code for Direct3D 11?
  I've decided to write my latest project using Direct3D 11 directly without using the DXUT framework. However this means that the ID3DX10Font is no longer available and the suggested replacement (To use DXUT) is also not available to me.Of course I could (And will if necessary) write my own code to do this by just treating each character as a small texture, but I was just wondering if someone else has done this already and is willing to share their code? Note that I only need this to display debug information on screen, so it doesn't ahve to be pretty. Simple fixed wide fonts (e.g. Console) would be fine.If no-one has doen thsi already then I'll do it and share my code for anyone else that may be interested.ThanksBenP.S. I did do a search to see if this has been answered already but I didn't find anything so I apologise if this has been asked before.   
Quote:Original post by BenS1I've decided to write my latest project using Direct3D 11 directly without using the DXUT framework. However this means that the ID3DX10Font is no longer available and the suggested replacement (To use DXUT) is also not available to me.Of course I could (And will if necessary) write my own code to do this by just treating each character as a small texture, but I was just wondering if someone else has done this already and is willing to share their code? Note that I only need this to display debug information on screen, so it doesn't ahve to be pretty. Simple fixed wide fonts (e.g. Console) would be fine.If no-one has doen thsi already then I'll do it and share my code for anyone else that may be interested.ThanksBenP.S. I did do a search to see if this has been answered already but I didn't find anything so I apologise if this has been asked before.I used the Windows GUI to draw text onto a page in memory and then manually copied it to a texture which I then used to create a sprite. It's probably the best way to do it but I don't think you could possibly understand the code due to it's complexity and dependence on project specific classes. You would be better off making your own class.   ;  My sample framework has a class for rendering sprites, and one for generating a glpyh spritesheet for a font.  You should be able to appropriate it for your uses without too much trouble.  You can get it with one of my samples.I've also heard that Crazy Eddie's GUI library now supports D3D11, but I don't really know anything about it so I can't tell you whether or not it's good.   ;  i use CEGUI font "Direct3d11 render"   ;Quote:Original post by SteveDeFactoI used the Windows GUI to draw text onto a page in memory and then manually copied it to a texture which I then used to create a sprite. It's probably the best way to do it but I don't think you could possibly understand the code due to it's complexity and dependence on project specific classes. You would be better off making your own class.Thanks SteveDid you get a feel for what the performance was like? As the GDI has to consider all different fonts, at different sizes, kerning, DPI, rotation etc etc etc. Similarly DirectWrite has to be very flexible too.ThanksBen;Quote:Original post by MJPMy sample framework has a class for rendering sprites, and one for generating a glpyh spritesheet for a font.  You should be able to appropriate it for your uses without too much trouble.  You can get it with one of my samples.I've also heard that Crazy Eddie's GUI library now supports D3D11, but I don't really know anything about it so I can't tell you whether or not it's good.Thanks Matt,I'll certainly take a look. I sounds like what I'm after.ThanksBen;Quote:Original post by BenS1Quote:Original post by MJPMy sample framework has a class for rendering sprites, and one for generating a glpyh spritesheet for a font.  You should be able to appropriate it for your uses without too much trouble.  You can get it with one of my samples.I've also heard that Crazy Eddie's GUI library now supports D3D11, but I don't really know anything about it so I can't tell you whether or not it's good.Thanks Matt,I'll certainly take a look. I sounds like what I'm after.ThanksBenThanks again Matt, its working perfectly!The SpriteRenderer::Begin was calling "context->OMSetDepthStencilState(dsState, 0);" which was messing up the rest of my rendering, so I simply called context->OMGetDepthStencilState" first to remember the original state and then restored it back in the SpriteRenderer::End method. Works perfectly.ThanksBen