I'm working through DirectX 9 with a book, the examples #include d3dx9tex.h intellisense is indicating this file does not exist, as a result hResult = D3DXGetImageInfoFromFile(filename.c_str(), &imageInfo); is also showing errors. I have DirectX 12 installed. Can anyone help?
All Direct3D 9 programming books and tutorials assume you are using the DirectX SDK which is where you'd find the D3DX support library. The DirectX SDK itself is legacy as is Direct3D 9. D3DX9, D3DX10, and D3DX11 are deprecated. See Where is the DirectX SDK?.
If you have Windows 10 (which is required for DirectX 12) or Windows 8.x or Windows 7, then my suggestion is to learn Direct3D 11. Direct3D 9 is only useful today if you are trying to target Windows XP systems, and there are many caveats to trying to develop with Direct3D 9 on Windows 8.x or Windows 10. Direct3D 12 is an expert graphics API that assumes you are already fully capable of writing a Direct3D 11 application. A good place to start are the tutorials for DirectX Tool Kit. You don't need the legacy DirectX SDK at all to build Direct3D 11 applications as all the headers, libraries, and the HLSL compiler are included with VS 2012, VS 2013, and VS 2015.
See also Living without D3DX, DirectX SDK Samples Catalog, DirectX SDK Tools Catalog, DirectX SDKs of a certain age, The Zombie DirectX SDK
UPDATE: There is a DirectX Tool Kit for DX12 available.
I also recently added a DDSTextureLoader and WICTextureLoader implementation for Direct3D 9 to the DirectXTex project. See this blog post.
d3d9helper.h (which is included in all Windows SDK)
Now strictly speaking, you should be using a more Modern DirectX unless the intention here is to support older versions of Windows.
Still keep in mind that Windows 7 / 8 / 10 support both DirectX 11 and 12, and if you're exclusively releasing something for Windows 10, then just use DirectX 12... it can be a bit more daunting to initially learn, it's much more powerful (from a Developer Standpoint) in terms of Control you have over the Hardware and Pipeline.
Related
I've been trying to run the examples from the book 'Introduction to 3D Game Programming with Direct X 11' by Frank Luna however, no matter what I try I can't seem to get any of the projects to compile.
I've installed the june 2010 SDK as per instructions found here: http://d3dcoder.net/WordPress/
However I'm not sure I've done the rest of the tasks correctly.
Has anyone had any luck trying to run these? I'd like to learn Direct X but without the proper way to compile them I'm pretty much dead in the water.
The include/lib path order for using the legacy DirectX SDK with VS 2012 or later is inverted from the traditional order used for VS 2010. You need to modify your project's VC++ Directories to account for this.
For x86/Win32 configurations:
$(ExecutablePath);$(DXSDK_DIR)Utilities\bin\x86
$(IncludePath);$(DXSDK_DIR)Include
$(LibraryPath);$(DXSDK_DIR)Lib\x86
For x64 native configurations:
$(ExecutablePath);$(DXSDK_DIR)Utilities\bin\x64;$(DXSDK_DIR)Utilities\bin\x86
$(IncludePath);$(DXSDK_DIR)Include
$(LibraryPath);$(DXSDK_DIR)Lib\x64
This is covered in detail on MSDN.
You should also read the notes I have about that book on my blog. His DirectX 11 book was published just prior to the deprecation of the legacy DirectX SDK, so it's a bit out-of-date on the margins although the core API stuff is fine.
See also Where is the DirectX SDK (2013 Edition)?, DirectX SDK Tools Catalog, Living without D3DX,
DirectX SDKs of a certain age, DirectX SDK Samples Catalog, and The Zombie DirectX SDK
I am trying to capture a video with a Star-tech capture card using OBS(Open Broadcast Software) non windows 7. The problem I am facing is that OBS requires Directx10 for working and windows 7 by default comes with Directx11 which is messing up the capturing. However I have tried uninstalling DirectX11 from registry except the default key there. The weird thing is that even after I have deleted it from registry it still shows Directx11 installed (checked using dxdiag). Moreover i have surfed the internet like anything and I have not been able to find a working link to download Directx 10. I have been stuck on this for a while now. Any suggestions to help me uninstall Directx11 and download and install Directx 10 on windows 7 will be really appreciated.
Windows 7 supports DirectX 9.0c except for DirectPlay Voice and Direct3D Retained Mode. It also supports DirectX 10.0, DirectX 10.1, and DirectX 11.0. It has partial support for DirectX 11.1 with KB2670838 installed.
You cannot 'uninstall' the DirectX 11 runtime from Windows 7 any more than you can 'uninstall' the Windows UI or the file system. The only thing "DirectX" you can 'install' on Windows 7 is the various legacy DirectX SDK optional bits (D3DX9, D3DX10, D3DX11, XACT, debug layer, etc.) and the DirectX 11.1 Runtime via KB2670838.
See Direct3D 11 Deployment for Game Developers and Not So Direct Setup as well as this blog post.
If your application isn't working, that's an appcompat bug with the software. You can try various Compatibility Modes when running it to see if that works.
Is the DirectXMath library cross platform? Is it possible to use it with OpenGL and/or on OSX and Linux?
DirectXMath primarily relies on the Visual Studio compiler intrinsics support. As a header in the Windows 8.x SDK, it officially only supports Visual Studio 2010 - Visual Studio 2013, and Windows Vista or later. It only has a single Win32 API dependency (IsProcessorFeaturePresent), even that is optional.
It is technically possible to use it for Windows XP, but there's no official SDK configuration that would provide it in the headers that are supported on Windows XP.
There's no official support for other compilers, but it would probably work with the Intel compiler.
Otherwise DirectXMath is not actually tied to Direct3D in particular, so you could use it with OpenGL or whatever.
The main issue is going to be that the DirectXMath library is available in the Windows 8.x SDK, the Windows Phone 8.x SDK, the Xbox One XDK, and Xbox One ADK. You'd have to look at those EULAs--I'm not a lawyer and I cannot provide legal advice.
One can use direct3d11 through either the windows 8 sdk or the directx sdk? As a learner it isn't clear what effects this choice has. What differences does it make whether one learns directx 11 using windows sdk or directx sdk?
directx sdk ( last was june 2010, three years ago ) is deprecated. Windows 8 kits contains an up to date version of the direct x headers and library.
Basic API and documentation are mostly the same, but recent changes are missing. D3DX is deprecated, maths move to directxmath.h and shader compilation move to d3dcompiler.h
Pix is not working anymore with recent windows, so you have to stick with VSGD shipped with visual 2012, but the PiX replacement is far from really useful in the state it is :( So a better tool is nsight for nvidia, and gpuperfstudio for AMD.
That's it.
For Direct3D 11, the best way to go is to use VS 2012 or VS 2013 with the integrated Windows 8.x SDK and avoid the complexities of using the legacy DirectX SDK (June 2010) at all until you determine you actually really need it (the one compelling case would be XAudio2.7 on Windows Vista or Windows 7 rather than using XAudio 2.8 on Windows 8 or later).
For Windows Store apps on Windows 8.x, there a lot of official tutorials and samples on MSDN and the MSDN Code Gallery for you to learn about Direct3D 11.
For Win32 desktop apps on Windows 7 or Windows 8.x, I've posted a lot of unofficial samples harvested from the legacy DirectX SDK that build just fine with the Windows 8.x SDK. See this blog post for an inventory and links to MSDN Code Gallery.
Many older tutorials and books do indeed assume you are using the now deprecated D3DX library, but for Direct3D 11 there are a lot of options that avoid it as covered here. Some recent books embrace these newer libraries as well.
BTW, I'm assuming from your question that you are asking about programming Direct3D 11 with C++ since that's what the DirectX SDK and the Windows 8.x SDK support. If you are looking for C#, then I suggest looking at SharpDX or SlimDX.
With the announcement that VB6 will be supported on Windows 8, my question is:
Is there any place where Microsoft has said (Yes or No) VB6 apps will run on the ARM based Tablets?
And, if not, is there any ARM emulator, so we could test our VB6 apps on a Windows 8 ARM Tablet?
My understanding is: No. Windows 8 will support 2 different APIs: Win32 (and .NET on top of that) and WinRT. The Windows 8 ARM builds will only support WinRT. VB6 is compiled against the Win32 API, it won't work on the ARM tablets.
As explained by Adam Mihalcin in this answer.
On ARM, there are no 3rd party desktop apps, VB6 or otherwise. And you won't see support for VB6 with the new Metro framework because... well... VB6 was deprecated like 10 years ago.
It's time to invest in a rewrite.