Jump to content

  • Log In with Google      Sign In   
  • Create Account


Can Directx do 2D graphics?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Programmer557   Members   -  Reputation: 124

Like
0Likes
Like

Posted 27 February 2013 - 12:48 PM

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.



Sponsor:

#2 C0lumbo   Crossbones+   -  Reputation: 2203

Like
0Likes
Like

Posted 27 February 2013 - 01:24 PM

Yes, DirectX can happily do 2D graphics.



#3 Khaiy   Crossbones+   -  Reputation: 1342

Like
2Likes
Like

Posted 27 February 2013 - 02:16 PM

DirectX can do 2D graphics, though it will still use a 3D-esque approach to do it.

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.

#4 yewbie   GDNet+   -  Reputation: 665

Like
0Likes
Like

Posted 27 February 2013 - 02:25 PM

I agree with Khaiy if your goal is to learn SDL start with SDL =)

The raw directx api can be a bit hairy for someone learning.



#5 GuardianX   Crossbones+   -  Reputation: 1493

Like
1Likes
Like

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.



#6 dilyan_rusev   Members   -  Reputation: 908

Like
1Likes
Like

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS