Sign in to follow this  
dawoodr

Beginner

Recommended Posts

Hello!

 

Well as the title states, I am a beginner sort of and I am encountering hardships while trying to figure out how to get started. The thing is that I want to learn DirectX but in my opinion it's just extremely difficult to get a grasp around it. I don't understand anything the litterature has to offer in that area.

 

How do I get started? I have read the mathematical concepts and I understand them fine. However I have not implemented them in code.

 

Regards!

Share this post


Link to post
Share on other sites

There's a lot of good tutorials on the internet about directx, i would say start with a "Directx tutorials" Google search~

 

Direct3d 11 is the latest version available, you could try a "Direct3d 11 tutorials" google search

Edited by iedoc

Share this post


Link to post
Share on other sites

Can you clarify a bit? By "DirectX," do you mean Direct3D 11?

 

If so, your first step, if you don't already have Visual Studio installed, should be to get a copy of it. Versions of Visual Studio Express are free.

 

If you have previous experience with DirectX (9 or 10), this link would be a good read.

 

Whether or not you have previous experience with DX9/10, you can do a bit of reading about the concepts and implementation of D3D11.

 

Though Direct3D 11 is currently implemented through the Windows 8 libraries (which work fine on Windows 7) and is the recommended implementation, the DirectX SDK (June 2010) is still available and has good example code for Direct3D 11.

 

EDIT: You may also want to consider using the DirectX Toolkit, which makes living without the legacy DirectX math, fonts and sprites easier.

Edited by Buckeye

Share this post


Link to post
Share on other sites

Ok, I think I mean Direct3D 11. I have the latest version of VS installed and I have more than a year of experience in C++ but that is all. I know nothing about DirectX or Direct3D. I tried to read Frank. D Luna's book called "Introduction to 3D Game Programming with DirectX 11" but seriously, I thinks that book is aweful. The mathematical concepts are well explained but as soon as you hit chapter 4 "Initializing Direct3D" it makes no sense, not to me anyway.

Share this post


Link to post
Share on other sites

I know nothing about DirectX or Direct3D.

 

Ouch! Well, you'll have to start at the beginning and you'll be on the learning curve for a while. First, WRT Luna - he uses a lot of custom macros, structures and concepts, and, as a result, takes the simplicity out of learning the API. Although his code is very thorough with respect to checking capabilities and options, IMHO, he makes the painful process of init'ing D3D11 more painful than need-be.

 

As a first step, I would suggest reading tutorials such as this one, keeping in mind they appear to be based on the DirectX SDK (June 2010), and mention "DirectX 11" frequently. For now, ignore the "d3dx11" stuff and concentrate on the descriptions of the objects ID3D11Device, IDXGISwapChain, and ID3D11DeviceContext, and the description structures used to create them. As you have VS installed, you can also use the Help Viewer to look up those objects and do a bit of reading.

 

Practical Rendering and Computation with Direct3D 11, by Jason Zink, et al, seems to take a simpler and more direct approach to initialization. A good bit of that book is available on google books and you may want to spend some time there, maybe even buy the book! Rumor has it that Jason Z is, in fact, a respected member here on gamedev and, with his post here, (scroll down a quarter page) endorses the mentioned book and provides links you may find useful.

 

I personally have not found good, simple, beginner example code for Direct3D 11. Hopefully, others can contradict me.

Edited by Buckeye

Share this post


Link to post
Share on other sites

Another project worth looking at is the Visual Studio 3D Starter Kit - this is more Windows Store focused (8/8.1), but does provide a nice framework to work within which is reasonably simple to follow - aside from some aspects of the D3D initialisation the rest of the concepts are generally portable to regular desktop apps.

Share this post


Link to post
Share on other sites

Additional useful links:

 

Living without D3DX - A quick reference that helps you to convert old legacy D3DX code to modern code - http://blogs.msdn.com/b/chuckw/archive/2013/08/21/living-without-d3dx.aspx
 
Updated DirectX SDK samples - Chuck Walbourn - MSFT converted quiet all DirectX11 samples of the June 2010 DirectX SDK to Windows 8.x SDK - http://blogs.msdn.com/b/chuckw/archive/2013/09/20/directx-sdk-samples-catalog.aspx
 
Real-Time 3D Rendering with DirectX and HLSL: A Practical Guide to Graphics Programming - not a link/resource but a good book to starting, it is focused on (simple) HLSL in the first part of the book and it is updated to the Windows SDK 8.x.
Edited by Alessio1989

Share this post


Link to post
Share on other sites

About the initialization part: you don't really need books for that. It boils down to: initialize a couple of structures, paying attention to what the MSDN doc says about the values of those structures, and use COM-magic to initialize the swap chain and the device. I wouldn't worry too much about the COM __uuidof-part. That's the way they implemented D3D so just play along nicely - no need to learn COM in-depth. smile.png

 

Any decent tutorial explains this part thoroughly, example: http://www.directxtutorial.com/Lesson.aspx?lessonid=11-4-2

You can ignore the d3dx* headers and libs in this tutorial - just leave them out.

 

About the rest of D3D:

It's just rasterization at its best (yeah you heard me ogl tongue.png). You need to really understand how the rasterization pipeline works, i.e. how your input vertices get processed and end up on the screen, state by state. This part is not really about D3D, or your particular matrix math, but rasterization in general. D3D arranges its API neatly into corresponding state groups (IA, RS, OM...) so you can easily identify which API to call to modify a particular state. Again: you just need to initialize some structures and you are good to go. I would recommend tutorials and books for this part (see above posts).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this