directx sdk on windows 8 - c++

This is my first post here and please apologize me for my very poor English.
Current state:
I have a project that is very advanced, until now i use the DirectX SDK from June 2010, and several other librarys (Assimp, FreeImage, Bullet etc....).
My development environment is Win7, with VS2010 professional (win sdk 7.1A).
My question is, must i rewrite my DirectX code (with win sdk 8) to support windows 8?
I have searched around the web, and the only post that i find was the blog from Chuck Walbourn "http://blogs.msdn.com/b/chuckw/archive/2012/03/22/where-is-the-directx-sdk.aspx".
Thank you in advance
Behnam Karaj
(From Stuttgart - Good Old Germany)

No, you can use DirectX SDK and Windows SDK 7.1A. It will work in Windows 8. But you will can not use it's new features, and cannot make Windows Store Apps.
Also, if you want to migrate to Windows 8 SDK, you don't need change much in your code, just a headers and some functions names and parameters.
If you want make Windows Store Apps you need to to migrate to Windows 8 SDK and cut some things such as D3DCompiler.h, Effects framework etc.

Related

Why d3dx is deprecated?

I'm very new to DirectX, and learning it only for a week. A collection of powerful lessons I found and learn from is braynzarsoft d3d12 lessons. It's very difficult, there is a lot of information, but this is what I like.
The lessons seems to be unfinished, and I decided to search through the Internet on how to make a sphere, maybe there is ready vertices matrix, or some algorithm that will describe the sphere's vertices. I found this question, where one person says that what I am doing is actually deprecated and now I should program using the DirectX Tool Kit.
I am really confused - I am doing really well, yet all my code works perfectly, and as far as I want.
Can somebody, who has experience in DirectX programming, explain to me why what I am doing is deprecated, what I should do in general, and where I can get sphere vertices?
Currently, I wrote simple vertex and pixel shaders, initialized a d3d12 device, swap chain, command list, described vertices for a quad, and wrote a class that can add, move, rotate and scale cubes, which I do in an Update() call, before UpdatePipeline().
My try
In DirectxTK there is a function D3DXCreateSphere that has LPD3DXMESH *ppMesh and LPD3DXBUFFER *ppAdjacency interfaces as the output arguments. Perhaps, I can get vertex array I need from them. But anyway, I don’t will it be possible to combine DirectxTK code with my.
The short answer is that as part of the development effort for the Windows 8 SDK (circa 2011), the "DirectX SDK" was migrated into the Windows SDK. The DirectX libraries, headers, and tools were moved into the Windows SDK and the "DirectX SDK" was declared deprecated (i.e. the DirectX SDK June 2010 release was the last one ever made).
Microsoft moved samples online for Windows 8, so the majority of the samples in the DirectX SDK were abandoned in favor of Windows Store/UWP samples. As a personal project, I've put a bunch of the Direct3D 11 samples up on GitHub updated so they only use the Windows SDK.
A number of technologies were left behind in this migration as noted on the Microsoft Docs page.
Direct3D 9 development is considered legacy, and the primary reason for still using it was Windows XP support. The Windows 8 SDK doesn't support Windows XP development--Visual Studio 2012-2017 support Windows XP development by using the Windows 7.1A SDK. If you want to target Direct3D 9, you are basically stuck with using the legacy DirectX SDK--although some engines have enough of their own helper code that they don't really need D3DX9.
Direct3D 10 development is considered legacy. Direct3D 11 is a strict super-set of Direct3D 10, is supported by the same versions of Windows, and the Feature Level mechanism means Direct3D 11 works on more hardware than Direct3D 10 ever did. As such, the helper library D3DX10 is deprecated.
The XACT library was not carried forward. It was created primarily for Xbox 360, so it's been deprecated.
Managed DirectX 1.1 has been deprecated for ages (~2005)
See The Zombie DirectX SDK and Where is the DirectX SDK?
As for what you are supposed to use instead, I have created a number of libraries to replace what was in D3DX9/D3DX10/D3DX11. See Living Without D3DX
For DirectX 12 development, the legacy DirectX SDK never supported it. Samples are on GitHub, and otherwise you are supposed to just use the Windows 10 SDK. I have a version of DirectX Tool Kit for DirectX 12 as well on GitHub. That said, if you are new to DirectX you should really consider starting with DirectX 11.
There is such a thing as D3DX12, but it's not quite the same thing as the older D3DX11 library. D3DX11 had code for loading textures, doing BC compression, etc. and required both a header and a runtime DLL. The only way to ship that DLL with your game was to use the legacy DirectX Setup.
D3DX12 is just a header of some helper functions. There is no DLL and no REDIST. It typically gets copied into a project when you create a DirectX 12 Visual Studio template, and you can download it from GitHub. For more information on D3DX12, see this blog post.
DirectX Tool Kit for DX11 and DX12, DirectXTex, DirectXMesh, DirectXMath, and UVAtlas provide much of what D3DX9, D3DX10, and D3DX11 did but supports both DirectX 11 and DirectX 12. They are all open source, so there's no DLL or REDIST: you just build it yourself from source. They are not "drop-in" replacements, but they provide the same functionality in a more Modern C++ form. They support any C++ program written for classic "Win32" development, Universal Windows Platform (UWP) apps, or Xbox One.
Really this is the primary topic I've been covering in my blog for the past decade. Lots of details there if you want more information on what's been happening.
UPDATE: While using the open source replacements for D3DX9/D3DX10/D3DX11 are still recommended, and easy to adopt for Direct3D 11 or Direct3D 12, there are of course lots of existing tutorials and codebases that use D3DX. To support these scenarios without the messy quirks of trying to use the legacy DirectX SDK with modern Windows SDKs, you can make use of the Microsoft.DXSDK.D3DX NuGet package. Using this package, I was able to republish all of the Direct3D 9 and Direct3D 10 legacy DirectX SDK samples to GitHub.

Rastertek DirectX11 Tutorials on Windows 10

I have been trying to work my way through Rastertek's DX11 Tutorials on my Windows 10 system, and have had a lot of trouble trying to get them to work. Most of the issues I have been having are ".exe was not found" when trying to run the solutions they provide, or errors with the d3dx11 library. Does anyone have experience getting these totorials working, or have any pointers on how to get them to work on my Windows 10 system?
Thank you!
Those tutorials are a quite dated with the use of the legacy DirectX SDK content like D3DX11. You can get these to work with some effort per the instructions on Microsoft Docs.
The legacy DirectX SDK doesn't install the Direct3D debug device on Windows 10. You enable it as a Windows optional feature instead. See this blog post.
Many books on Direct3D 11 are still relevant, but the details around the legacy DirectX SDK are all out of date. See this blog post for some notes.
I'd recommend taking a looking at the DirectX Tool Kit.

DirectShow (Stream.h) for Windows 10 Development

I just noticed that streams.h is missing, while I was compiling DSVideoLib on my machine.
A quick research pointed me to the Windows SDK.
https://msdn.microsoft.com/en-us/library/windows/desktop/dd407279(v=vs.85).aspx
Well after installing the windows sdk again, I still cannot find those files and folders in my windows sdk folder.
Does anybody have an idea where to get the DirectShow library on windows 10?
Streams.h and and other BaseClasses directory files can be found in Windows SDK 7.1, in \Samples\multimedia\directshow\baseclasses. This also looks like a good snapshot to grab.
See also (actually proves that taken out from Windows SDK 8.0, the code in question was never put back later):
Where are the DirectShow samples in the Windows 8 SDK?
Getting DirectShow Samples on Windows 8
DirectShow samples and base classes relocated
https://stackoverflow.com/questions/31657925/locations-of-windows-sdk-samples-in-windows-8-1
There is nothing bad in taking "old" DirectShow sample/base code because there has been so little changes over last 10+ years...

directx 9 with visual studio 2012 express

I decided to learn directx on my old laptop that has an ATI Radeon X1200 card.
Using the program GPU-Z.0.7.2 I found that my card support directx 9 /SM2.0 and has shadrers of 4 Pixel / 2 Vertex.
Using dxdiag on my windows 7 I found that directx version is directx 11. Then I downloaded visual studio 2012 express but I did not install it yet.
Since my card supports only directx 9 im going to read the book Introduction to 3D Game Programming with DirectX 9.
Now what version of the direct SDK do I have to download ? and after downloading the SDK what should I install first the SDK or visual studio 2012 express ? Is the book ok ? I mean there are other editions of the book but they supprt directx 9c , directx 10 and directx 11.
Thank u so much.
Using dxdiag on my windows 7 I found that directx version is directx
11.
This is the DirectX runtime version, not SDK version. so it does not matter which version of SDK you use to develop your program.
As others said, the installation order does not matter.
The book you mentioned is good for new starters. but I recommend you to start from the shader version, since fixed pipeline functionalities such as transforming and lighting was abandoned start from DirectX 10, they all moved to shaders, there is a shader version of that book.
there are lots of materials and resources to learn DirectX, I paste some pages for your reference.
http://www.directxtutorial.com/LessonList.aspx?listid=9
http://www.braynzarsoft.net/index.php?p=DX11Lessons
http://www.rastertek.com/tutindex.html
DirectX SDK examples are also very good choice.
You should be able to use Direct3D 11 whilst still targeting a Direct3D 9 device via the D3D_FEATURE_LEVEL enum, which you can specify in your D3D11CreateDeviceAndSwapChain.
The Microsoft DirectX SDK (June 2010) contains both DirectX 11 and DirectX 9 headers and documentation. The install order doesn't really matter (I've used the SDK in Code::Blocks before installing Visual Studio and it worked fine) since it's really just a collection of header files and debug dlls, plus a bunch of stuff to get you started.
Personally I don't use books when learning a library - I look at the documentation, which is a firsthand explanation of the material, or search up a tutorial (though you should take anything you read in a tutorial with a grain of salt). There are also several websites and videos that explain the graphics pipeline really well. I can't really comment on the book otherwise.
If you not targeting Windows XP or earlier OS, throw DirectX 9 book, forget it (same with DirectX 10 if you not targeting Vista without Service packs), and take DirectX 11 one
Luna's books are great, but, IMO, online tutorials that zdd mentioned are better. And free. But still, to write something cool, you will need to read much more than one book or one series of tutorials. Take the best parts and mix it!
You can develop with DirectX 11 API (for Windows Vista SP2 and later OSes), but still targeting DirectX 9 hardware (feature level 9.3). Shaders is a must. Love them!
When you installing Visual Studio 2012 or higher, you also get a copy of Windows SDK. Do not install standalone DirectX SDK, because it is obsolete. Since Windows 8, DirectX SDK is a part of Windows SDK. Install standalone DirectX SDK only if you really-really need that old stuff, such as D3D11X or effects framework (for Luna books).
Happy coding!

Is it possible to program for Windows Phone 7 in standard C++ only?

I know that the recommended language for Windows Phone 7 development is C#.
However, for various reasons, I very much prefer continuing to program in standard C++, if possible.
Is it possible to program for Windows Phone 7 in standard C++ only?
If the answer is yes, what tools and resources do I need to accomplish that?
EDIT, finally: for WP7 it won't ever be, but for Windows Phone 8 - yes you can. Native apps, C/C++, iOS/Android portability and code sharing, DirectX. You'll need Visual Studio 2012 and Windows 8 for WP8 development, though. VS2010 is not getting the requisite SDK. To run the emulator, you'll need a 64-bit physical Windows 8 box with a SLAT-enabled CPU. You can still develop on a virtual machine, but you'd need a device to run apps, the emulator won't start.
The nongame UI, however, will still be XAML-based and managed. The entirety of Win32 API will not be supported. They're pushing a model with managed UI layer and a native middleware beneath it. Purely native development is still not an option; although one might try with WinMD classes as code-behind for XAML. The visual XAML designer will probably choke, and you'll need a dummy managed DLL anyway.
EDIT: even assembly, as long as it's targeting Thumb-2 and the mnemonics are UAL-style. For running on the simulator, you'd have to produce an alternative set of assembly files (or other sources) targeting Intel.
For the sake of posterity, here's the pre-06/20/2012 answer:
If you work for Microsoft or an OEM, then yes. Otherwise, no (for now).
There's hope though. Google did relent and issued their NDK after a while; Microsoft might, too. The native code capability is already there. Once they come up with a sensible sandboxing solution, why not.
Also, there's already some pressure from big-name software vendors to open up native development. Mozilla people stated outright that there will be no Firefox on WP7 unless it's native. Similar rumors about Flash.
EDIT: if you want a native SDK on WP7, like I do, please go sign the petition here and/or the one over there. Thank you!
EDIT2: see this. It's a leak and therefore not official, but still, I say there's some hope.
EDIT3: also this. Still not official, but this rumor moves the timeframe for native app support even closer - to the upcoming Tango release.
EDIT4: Microsoft seems to be pretty keen to promote WinRT, their new tablet-oriented XAML-based app platform, which allows for (among other things) unmanaged C++. Now, on every other major mobile OS the tablet and the phone app stacks are one and the same. Just sayin'.
EDIT5: there's been some proof-of-concept work along the lines of C++ => LLVM => MSIL and C++ => LLVM => C#, but nothing production-quality so far.
Phone manufacturers such as Samsung can deploy applications written in unmanaged code, but all other developers can not.
No that is not possible. Microsoft has made a decision to only allow application developers to use managed code on the Windows Phone 7 devices.
According to Wikipedia Windows Phone 7.0 runs Windows CE 6.0 R3/7.0 hybrid as operating system.
In theory one could use C++ to build standard* C++ programs targeting Windows CE 6.0 R3 and 7.0 (supposed to come out on Q1 2011). I mean all the standard* dlls should be there (gdi32.dll, user32.dll) Internet Explorer and other C++ programs are still running on Windows Phone 7.
The how to get the application on the phone? and how to run the application on the phone? are the next questions which at the moment I don't know how to answer.
This interview tells something about it: Writing the WP7 App Platform in C# and C++ I haven't watched it yet, so you might add respective comments :)
Windows Phone 7 supports Silverlight and XNA.
All programs for Windows Phone 7 are written in .NET managed code. It is also possible to write Windows Phone 7 applications in Visual Basic .NET.
Visual Studio 2010 Express for Windows Phone includes XNA Game Studio 4.0 and an on-screen phone emulator, and also integrates with Visual Studio 2010. You can develop visuals and animations for Silverlight applications using Microsoft Expression Blend.
The Silverlight and XNA platforms for Windows Phone 7 share some libraries, and you can use some XNA libraries in a Silverlight program and vice versa.
But you can’t create a program that mixes visuals from both platforms. Maybe that will be possible in the future, but not now.
EDIT:
to be more clear..there is no native C++ support you'll have to use either Silverlight or XNA,both are based on .net framework.