Beginner

Started by
7 comments, last by Buckeye 9 years, 7 months ago

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!

Advertisement

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

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.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

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.


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.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

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.

Justin Stenning | Blog | Book - Direct3D Rendering Cookbook (using C# and SharpDX)

Projects: Direct3D Hook, EasyHook, Shared Memory (IPC), SharpDisasm (x86/64 disassembler in C#)

@spazzarama

 

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.
"Recursion is the first step towards madness." - "Skegg?ld, Skálm?ld, Skildir ro Klofnir!"
Direct3D 12 quick reference: https://github.com/alessiot89/D3D12QuickRef/

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).

"Some people use Singletons, some people are Simpletons." - Bill Gates
"Yum yum, I luv Cinnabon." - Mahatma Gandhi


Hopefully, others can contradict me.

As hoped (thumbs up):


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

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

This topic is closed to new replies.

Advertisement