Advertisement

Start learning DirectX

Started by October 19, 2022 09:33 AM
9 comments, last by Geri 2 years, 1 month ago

Hello everyone! This is my first post and it is my very first step in graphics programming.

I've been working as C++ Developer for 2 years for different companies but none of them are related to videogames or graphics.

I always wanted to learn DirectX and try to create my own microgame and to understand how graphics works. I found a webpage but it is paid content and I don’t know if this webpage is useful for a person like me.

I have some questions that I would like to ask to the community.

- Do I need to learn WinApi at all? or just the fundamental to create a window.
- Is the webpage I mentioned before good to start with DirectX? Are there any other resource for free?
- Do you know any Youtube channel that is dedicated to teach DirectX from scratch?

/Moderator edit: Removed link to website, as this is a new account and triggers astroturfing red flags - frob.

@JMelter The page you mentioned doesn't seem bad at all!

JMelter said:
Do I need to learn WinApi at all? or just the fundamental to create a window.

If you are working with windows, learning winapi is always a good choice ?

But for games, the basics, creating a window and dealing with the message loop is generally enough.

JMelter said:
Is the webpage I mentioned before good to start with DirectX? Are there any other resource for free?

Try the official DirectX SDK! There are lots of samples, and the help is full with beginner tutorial (as I remember)

Advertisement

@jmelter The problem with the page you mentioned is that it does not cover DirectX 12. The APIs from DX9 to DX11 had a similar approach, but DX12 is a big departure from these (in a similar way that Vulkan is a big departure from OpenGL). DX12 is way more explicit and the barrier to entry is higher (note that it was not low in DX11 either). If you are interested in using what most modern game engines use today, I would strongly advise you to learn DX12 over any other previous APIs.

I read part of Learning DirectX 12 a while back and I think it is a pretty strong introduction (there are 4 lengthy lessons). While I cannot guarantee that it is extremely beginner-friendly, it will at least expose you to a lot of the jargon you will need to understand anyway, no matter what API you use in the future.

Once you finish the tutorial, you can check out the SDK samples on GitHub. Start with the ones here, as most of the other ones are on advanced topics.

JMelter said:

- Do I need to learn WinApi at all? or just the fundamental to create a window.

In general, you don't need a lot of the Window API stuff. You basically need to know about the message loop but that's typically covered in most DirectX tutorials anyway. Of course, it depends on what you ultimately want to do, but I wouldn't worry about it starting out.


- Is the webpage I mentioned before good to start with DirectX? Are there any other resource for free?

Your first question is which DirectX do you want to learn. DirectX 12 is the latest, but it is quite different from previous versions and it's somewhat lower level and you are required to manage more things yourself. Many people eschew it in favor of DirectX 11. This year I ported my code from 11 to 12 and it was quite a chore. I don't think DX12 is so hard on the face of it. The main problem is since it is low level, you have so many options for how you want to do things. Also while the documentation is out there, there is nothing I found that really gives you the big picture. I spent months wrapping my head around the whole thing and writing my own API. As for Documentation I used Frank Luna's book. It's actually not that great, but it got me started. The Direct X Discord server is verry good however, so I would ask people there for advice. In retrospect I do like 12 better than 11 now that I've got my act together. I think that's mainly because it seems to obfuscate things less, but to be fair, a lot of people will say it's a lot harder.


- Do you know any Youtube channel that is dedicated to teach DirectX from scratch?

Well there are a few DirectX game engine series on YT, but I didn't use any of them. Probably asking on Dischord is your best bet again for that.

@jmelter I totally agree with what @gnollrunner says on Win API. Very little knowledge is necessary. The boilerplate code for creating a window is covered in the tutorial Learning DirectX 12.

If you want to learn DirectX 12 from scratch, I'm writing a tutorial series based on the MS graphics samples that covers both theory and practice,.

Learn DirectX 12 from Microsoft samples

Advertisement

@PAM79 God damn mate, this resource is amazing! Thank you.
And thank you all for the answers. ?

PD: Are you the creator of that resource? Just to say that im giving 5 dollars for now to help you ?

JMelter said:

@PAM79 God damn mate, this resource is amazing! Thank you.
And thank you all for the answers. ?

PD: Are you the creator of that resource? Just to say that im giving 5 dollars for now to help you ?

Yep. I'm the author of that resource. Thank you for your support. I really appreciate it ?

DirectX API architecture could be pretty complicated for a beginner.
From my experience i advice you to learn the fundamentals of graphics rendering pipeline first
(what buffer, texture, memory is etc. , + parallel computing basics).
Better pick OpenGL first, in my opinion. And then return to Direct3D.

Thanks.

Yeah, you will better off with OpenGL than DirectX. Especially for a beginner. You will be able to access more type and generation of platforms. The api is also far more simpler.

This topic is closed to new replies.

Advertisement