I need to learn DirectX. The examples for Introduction to 3D Programming with DirectX 11 by Frank D Luna does not work. Can anyone help me

Started by
33 comments, last by GameDevCoder 6 years, 5 months ago

I have to learn DirectX for a course I am studying. This book https://www.amazon.co.uk/Introduction-3D-Game-Programming-Directx/dp/1936420228 I felt would be great for me to learn from.

The trouble is the examples which are all offered here http://www.d3dcoder.net/d3d11.htm . They do not work for me. This is a known issue as there is a link on the examples page saying how to fix it. I'm having difficulty with doing this though. This is the page with the solution http://www.d3dcoder.net/Data/Book4/d3d11Win10.htm.

The reason why this problem is happening, the book was released before Windows 10 was released. Now when the examples are run they need slight fixes in order for them to even work. I just can't get these examples working at all.

Would anyone be able to help me get the examples working please. I am running Windows 10 also just to make this clear, so this is why the examples are experiencing the not so desired behaviour. I just wish they would work straight away but there seems to be issues with the examples from this book mainly because of it trying to run from a Windows 10 OS.

On top of this, if anyone has any suggestions with how I can learn DirectX 11 i would be most grateful. Thanks very much. I really would like to get them examples working to though from the book I mentioned.

Look forward to reading any replies this thread receives.

 

GameDevCoder.


PS - If anyone has noticed. I asked this about 1 year ago also but this was when I was dabbling in it. Now I am actually needing to produce some stuff with DirectX so I have to get my head round this now. I felt at the time that I sort of understood what was being written to me in response to my thread back then. I had always been a little unsure though of being absolutely sure of what was happening with these troublesome examples. So I am really just trying to get to the bottom of this now. If anyone can help me work these examples out so I can see them working then hopefully I can learn DirectX 11 from them.

 

*SOLUTION* - I was able to get the examples running thanks to the gamedev.net community. Great work guys. I'm so please now that I can learn from this book now I have the examples running.

https://www.gamedev.net/forums/topic/693437-i-need-to-learn-directx-the-examples-for-introduction-to-3d-programming-with-directx-11-by-frank-d-luna-does-not-work-can-anyone-help-me/?do=findComment&comment=5363013

Advertisement

Need more information than "They do not work for me".

What's not working?

Thanks for the reply. So, In order to getting these examples to work there needs to be some tweaks so they run normally again.

From stuff in a topic I made about the same thing last year actually as I was just looking into this (preparation work) just then but am now needing to actually use DirectX so am really trying to get these examples working fine now.

I have tried using some knowledge of which I acquired when I made a similar topic about a year ago now. Last night I was able to get working examples for chapter 1, 2, there isn't any for 3, chapter 4. One of the four examples in Chapter 6 I have working now to. If I can talk about an issue I'm having with one example for chapter 6.

Here is what is stopping me run the Box example for chapter 6 right now. https://ibb.co/mQbPvw

Prior to this like I have done similarly with the examples before to get them working for me:

-Clicking in properties I go on VC++ Directories and change the include and library directories to include $(DXSDK_DIR), or where a 'common' folder is located that all the examples rely on.

- In Linker - Input. I remove d3dx11d.lib (in debug config), d3dx11.lib (in release), dxerr.lib (for both).

- Lastly I right click on the project and add existing item - I select from common folder 'dxerr.h and dxerr.cpp.

 

These steps allow for some examples to work. I'm having a problem with this box example though now and am not sure what to do.

Lastly, in some cases I might reconfigure so the common folder can be found like in c/c++ property page include directory. In the end I just try many ways in the hope I can get the examples working, I was given some instructions in the past how to get them working although I wasn't so confident that they worked flawlessly (i mean, it worked for one example but I wasn't sure they would work for other examples) or that I understood properly how they worked.

 I hope this helps with explaining my predicament a bit more. 

 

Any help would be so very much appreciated from the community. Thank you.

15 hours ago, GameDevCoder said:

On top of this, if anyone has any suggestions with how I can learn DirectX 11 i would be most grateful.

I dont know anything about that book, but you can learn dx11 directly from MSDN and their dx11 samples work on windows 10 (I just checked them)

 

Direct3D Tutorial Win32 Sample - https://code.msdn.microsoft.com/Direct3D-Tutorial-Win32-829979ef
This is the classic tutorials 1-7 that take you from setting up a window to displaying a rotating textured cube. The download button is at the top of that page.
The zip file contains:
1. description.html
  this has links for all 7 tutorial step by step descriptions. You should read all of these

2. A folder called c++
You can open this "Tutorials.sln" solution in visual studio (I use visual studio 2017), and let it update them all to the latest version of visual studio. Or you can open the projects in the folders which seems to also open all of them.
The sample contains all 7 tutorials. Compile them.
To run a particular sample (as the solution contains all), in the solution explorer of visual studio right click on the one you want eg "Tutorial07" and select "set as startup project". Then from the top menu select debug - start debugging.
I just checked it and it does work on windows 10, with visual studio 2017

********
After these 7 tutorials I recommend MSDN:

Direct3D 11 Graphics - https://msdn.microsoft.com/en-us/library/windows/desktop/ff476080(v=vs.85).aspx
Read each of those sections links

HLSL - https://msdn.microsoft.com/en-us/library/windows/desktop/bb509561(v=vs.85).aspx
Read each of those sections links

 

I think you need to download and install the legacy june 2010 directx SDK, because the bewerkt SDK's dont include d3dx11, which is used in luna's book and examples. You can find it on github, might need to build the libs (debug and release) yourself. Which should be relatively easy with some googling (if you've never did this before).

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

16 minutes ago, cozzie said:

I think you need to download and install the legacy june 2010 directx SDK, because the bewerkt SDK's dont include d3dx11, which is used in luna's book and examples. You can find it on github, might need to build the libs (debug and release) yourself. Which should be relatively easy with some googling (if you've never did this before).

Hi. thank you. Yeah, I have installed the june 2010 directx sdk. I have had to do things with the debug and release also like removing some libraries that someone mentioned to me in the past. I appreciate your post.
If anyone can see the issue I'm having at the moment with the BOX example that isn't working. If anyone knows how them errors can be fixed? It was in regards to this https://ibb.co/mQbPvw  . Thanks forum.

If you install and use the june 2010 SDK then you won't need to change anything.

edit - code that is.

-potential energy is easily made kinetic-

1 minute ago, Infinisearch said:

If you install and use the june 2010 SDK then you won't need to change anything.

Interesting. I am just working through these examples now as it goes. Will see how I get on. Thanks for these post. Food for thought. 

Ok. I have removed a couple errors and am just left with one issue for the BOX example in chapter 6.

Does anyone know how I can fix this please?  https://ibb.co/gstKvw

I've no idea what to do about this problem.

Not overly familiar with DirectXMath, and it has been quite a while since I was digging through the Luna DX11 book, but it looks like you probably need to use the constructor for XMFLOAT4, rather than rely on an implicit conversion

https://msdn.microsoft.com/en-us/library/windows/desktop/ee419645(v=vs.85).aspx

Eric Richards

SlimDX tutorials - http://www.richardssoftware.net/

Twitter - @EricRichards22

This topic is closed to new replies.

Advertisement