Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 04 Feb 2004
Offline Last Active Jul 17 2013 03:29 AM

#5037950 Help me to make work D2D with D3D11

Posted by on 01 March 2013 - 03:23 AM

Just in case you're interested. One way of rendering text is to use SpriteFont from the DirectX Toolkit. This uses bitmaps, and includes a tool to create bitmap fonts from truetype fonts. 




There's a little disclaimer on localization, which I copy-pasted below, but it probably won't be an issue for you. If you want to check it out further the documentation is pretty good.



This implementation supports sparse fonts, so if you are localizing into languages such as Chinese, Japanese, or Korean, you can build a spritefont including only the specific characters needed by your program. This is usually a good idea for CJK languages, as a complete CJK character set is too large to fit in a Direct3D texture! (if you need full CJK support, Direct2D or DirectWrite would be a better choice). SpriteFont does not support combining characters or right-to-left (RTL) layout, so it will not work for languages with complex layout requirements such as Arabic or Thai.


PS. You might have gotten more response if you posted this in "DirectX and XNA" and tagged it with DX11 or something.

#5037506 C++/DirectX Tutorials?

Posted by on 28 February 2013 - 02:46 AM

I only make Windows Desktop games, but I've read quite a bit about programming for windows 8 as well. I've included some stuff you don't need to use right away, so don't feel like you need to know everything to begin with.


Rastertek is definitely a good tutorial for DirectX. The only problem if you want to make Windows 8 games is that it uses some libraries that are not supported (Direct3dx). You could certainly do what I did and just convert the code to use the new libraries. It might take a bit of time, but you'll learn something in the process. Converting this is maybe not the first thing you should do though.


If you want to follow the new direction by Microsoft you shouldn't use the DirectX SDK, but the Windows SDK. I believe it's included with Visual Studio 2012 express. This is required for Windows store games. There is some info about it here: http://msdn.microsoft.com/en-us/library/windows/desktop/ee663275(v=vs.85).aspx


For a quick start on your windows 8 game programming, maybe you could try the recently released Visual Studio 3D starter kit. There is also a video giving you a quick tour. I haven't tested this myself, but it looks pretty good.



I would also check out the DirectX toolkit (http://directxtk.codeplex.com/) to make some things easier, like loading models, fonts etc. It's made by two DirectX devs and based on the code from Xna, and is quite well documented. There are also some samples included.


The toolkit also includes something called SimpleMath, which I would recommend you use. You should look into this once you get started on matrices/vectors in DirectXMath (The new math library used for desktop/windows 8). It will save you a fair bit of code and make things much easier to read.

#4987967 DirectX development in Visual Studio 2012

Posted by on 08 October 2012 - 06:08 AM

I've recently made the switch to the Windows SDK on Windows 7. I've changed all D3DX code to use D3DCompiler and DirectXMath. I'm also using the texture loader from directxtex (http://directxtex.codeplex.com/). I find the new libraries much more lightweight.

You can find most of the info on the right-hand side of the main page of gamedev.net.

Moving from D3DXMath to DirectXMath might take a bit of time, since DirectXMath uses SIMD and needs to be handled in a certain way. There should be some threads on this somewhere on the forums though, and there are docs available explaining how to do the conversion.