I know this may sound kind of stupid, but that's what questions are for right? I know that Directx can handle 3D graphics, but can it ONLY create 3D graphics? I haven't started learning Directx yet because I still don't fully understand C++, but I want to learn before hand so I can trade up to SDL or something else for a 2D environment when I actually do start.
Can Directx do 2D graphics?
Crossbones+ - Reputation: 1263
Posted 27 February 2013 - 02:16 PM
I would not recommend that you put your energy into learning DirectX just to abandon it for SDL later. APIs have their own quirks, and if you go to the trouble of learning one you may as well put that knowledge to use. If you want SDL or SFML or anything else eventually, why not use it from the start?
If you aren't confident enough in your C++ skills to start with an API right now, it would be better to read up on 2D graphics concepts rather than dive into something you don't plan to use.
Crossbones+ - Reputation: 1156
Posted 27 February 2013 - 03:02 PM
There is a part of DirectX called Direct2D. This one serves for drawing 2D images on the screen surface. It has been updated with recent Windows 8 release. If you have a problem with C++, you can always use C# and third-party DirectX wrapper, like SharpDX. Creating 2D game with this library by using Direct2D is fairly easy, even for beginner.
Members - Reputation: 663
Posted 27 February 2013 - 07:29 PM
I've done a number of projects in SDL, and it is one of the simplest APIs I've used.
Now, I second @GuardianX that DirectX contains a number of APIs, two of which are perfect for 2D games - Direct2D and DirectWrite. There is another native Windows component that you'd use in games - WIC (for loading/converting images, etc). They are available on Vista+ (in their first incarnations).
I've been evaluating D2D & Co for a future product, and... the API is C++ and COM, plus it requires a bit more knowledge about how computers work (compared to SDL). Which means that if you don't yet know C++, you'll have trouble with COM. Should you go that route, know that it has some getting used to (D2D is somewhat different than other 2D APIs I've used). Also, when you search for stuff online, you might not really find that much help. Both D2D and SharpDX (.NET binding) are quite newer than SDL, and the latter is an established technology.
As always, MSDN is your friend; besides the reference pages, you've got tutorials and how-tos; don't forget to take a look at Hilo, as well. For SDL, I'd recommend LazyFoo's tutorials.