Downgrade DirectX 11 to 9.0c (Win7) - windows-7

My Windows7 has DirectX 11 as default.
But I have trouble with DirectX 11 when I use SDL2.0
The solution is downgrading DirectX 11 to 9.0c (googling result)
Is there any method for downgrading?
I couldn't find DirectX 11 in 'program add/remove'
So I can't remove DirectX 11 in 'program add/remove'

If you use SDL 2.0 library to develop your application, you have three steps to config it.
Include SDL.h at the beginning of you program
Link sdl2.lib and SDL2main.lib in your project settings
Put SDL2.dll in your project directory(or put it in you System32 directory, so every project can
use it)
please take a look at the tutorial on this page for details. although it is for SDL 1.2, you can easily apply it for SDL 2.0.
If you want to build SDL 2.0 source code, you should install the DirectX SDK, since SDL 2.0 has a renderer based on DirectX 9.0
My Windows7 has DirectX 11 as default.
Your Windows7 also have DirectX 9.0 runtime library d3d9.dll, the DirectXruntime libraries was shipped with Windows7 in System32 folder.
I couldn't find DirectX 11 in 'program add/remove'
You can only find it after you install the DirectX SDK

In Windows 7, DirectX is a core component of the operating system and cannot be manually removed. If you are having trouble with specific DirectX 11 hardware, you can try updating the hardware drivers via the vendor's website, or disabling the hardware in Device Manager.

Related

missing d3dx9.lib file in windows 10 sdk for ARM

I am porting my Windows directX application from X86 device to ARM in VS2017. But I could not find some DirectX library files(d3dx9.lib) for ARM in VS built-in Windows 10 SDK. The offical DirectX SDK (https://www.microsoft.com/en-us/download/details.aspx?id=6812) does not support ARM. Where can i find ARM version of these library files?
So d3dx is deprecated, thanks to Simon and Jake.

Do I need to install DirectX SDK if using windows 8 and above?

I read this topic but somehow it still doesn't get through my thick skull.
The topic said:
Starting with Windows 8, the DirectX SDK is included as part of the
Windows SDK.
So I try to find in this page a way to setup a directX project. I read:
Using DirectX SDK projects with Visual Studio
...
Ensure that the June 2010 release of the DirectX SDK is installed on your development computer.
I don't understand what's this topic talking about. The first part it said in Windows 8, I don't have to install DirectX SDK (because it is included in Windows SDK), the part about HowTo setup directX project, it said I have to install DirectX SDK.
Anyway, I just ignore and keep going - I don't install DirectX SDK assuming it is already included in Windows SDK as the first quote states.
I do one thing as the topic said:
Include Directories: $(IncludePath);$(DXSDK_DIR)Include
Include Library Directories: $(LibraryPath);$(DXSDK_DIR)Lib\x86
In VS2015 VC++ Directories doesn't have Include Library Directories: so I understand it as Library Directories, the project is for win32 so I don't setup directX SDK for 64. Then I run the project and get the error:
TRK0005 Failed to locate: "CL.exe". The system cannot find the file specified.
So the question is: Do I need to install DirectX SDK if using windows 8 and above or I have to download and install DirectX SDK
Thanks for reading :)
This is covered on MSDN and in more detail in this series of blog posts: Where is the DirectX SDK (2015 Edition)?, The Zombie DirectX SDK, DirectX SDKs of a certain age, and A Brief History of Windows SDKs.
If you are coding a DirectX 11 application, you can use the Windows 8.1 SDK that comes with VS 2015 and don't need the DirectX SDK at all. This application can be written to run on Windows Vista SP2 or later. You don't need the DirectSetup REDIST either as deployment is part of the OS. Do not make use of D3DX11 and use one of the many open source replacements instead. If you are writing a Universal Windows Platform (UWP) app, you can't use the legacy DirectX SDK as those components won't pass WACK.
If you are new to DirectX 11, a good place to start is the Direct3D VS Game Templates and the DirectX Tool Kit for DirectX 11 tutorials.
The one case where you might need the legacy DirectX SDK for your DirectX 11 app is if you want to use XAudio2 on Windows 7. This is covered here. If you require Windows 8 or Windows 10 to run, you can just use XAudio2 that's built into the OS and the Windows SDK.
This requires 'mixing' the Windows 8.1 SDK with the legacy DirectX SDK include paths which is where all the guideance about switching the include/lib path order comes from. For a Windows desktop app, you can still use legacy D3DX if you want with VS 2015--such as when using outdated tutorials or books to learn from--but note that the DXERR library is not compatible with the Visual C++ 2015 REDIST. You can work around this issue per this post.
If you are coding a legacy DirectX 9 application, then you likely want to support Windows XP as well. See here for details on how this works with VS 2015, and this does require the legacy DirectX SDK.
There's nothing in the legacy DirectX SDK for DirectX 12.
For information on other aspects of the moving beyond the legacy DirectX SDK see Living without D3DX, DirectX SDK Tools Catalog, DirectX SDK Samples Catalog, Living without D3DX, Direct3D SDK Debug Layer Tricks, and Not So Direct Setup
If you are looking to use DirectX with C# instead of C++, be sure to read this post.

Does SDL2 prebuilt windows dll-s have directx or opengl support compiled in?

I have downloaded the prebuilt windows dll-s from here: https://www.libsdl.org/download-2.0.php, but I am not able to get hardware accelerated renderer working.
Does they include directx or opengl support?
Or shall I compile my own if I want hardware accelerated video?
I do cross-compile my app with linux/cmake/mingw at the moment and linking with prebuild SDL2 dll-s.
They have directx support built in.
Mingw can link to those libraries.
(Did not work for me with Virtualbox, but did work with native windows.)

Adding permanent Include directory

I'm trying to build a solution that contains dozens of projects, unfortunately I cannot find a way in VS2013 to add a "global" include directory to the solution since I need to include Directx.
Is there really no other way in VS2013 to add directories to a solution besides of adding them manually project by project?
Starting with VS 2010, the correct way to add the DirectX SDK to a project is to use VC++ Directories settings. See this old VC post for details.
You can also use custom .props through Property Manager. This is how you would use the Windows 8.x SDK with VS 2010 for example because the Windows SDK no longer creates Platform Toolsets for this combination of tools. See this post.
Historically the include path order has been the following because the DirectX SDK contained newer headers than the Windows SDK 7.x and prior:
$(DXSDK_DIR)Include;$(IncludePath)
$(DXSDK_DIR)Lib\x86 or x64;$(LibraryPath)
Now that the DirectX SDK is deprecated, the Windows 8.x SDK that comes with VS 2012 and VS 2013 contains newer headers than the legacy DirectX SDK. Therefore, if you still need to make use of old components that are only in the DirectX SDK (such as the deprecated D3DX library), you need to use:
$(IncludePath);$(DXSDK_DIR)Include
$(LibraryPath);$(DXSDK_DIR)Lib\x86 or x64
There are a few more minor details covered on MSDN
For Direct3D 11 development, you should remove use of the DirectX SDK in favor of the Windows 8.x SDK anyhow. See Living without D3DX and DirectXMath.
If using XInput 1.3 and you still need to target Windows 7 or earlier, one option is to use XInput 9.1.0 instead. See XINPUT and Windows 8. This is used by DirectX Tool Kit's GamePad when targeting down-level to avoid the need for the legacy DirectX SDK.
The only cases where it still makes sense to involve the DirectX SDK in newer Win32 desktop apps is when using XAudio2 and shipping on Windows 7 or earlier. See XAudio2 and Windows 8. This is used by DirectX Tool Kit for Audio when targeting down-level.
In both cases of using XInput 1.3 and XAudio 2.7 you actually need to use full paths to the DirectX SDK headers/libs and not rely on project search paths to pick up the right headers since they have name collisions with XInput 1.4 and XAudio 2.8 in the Windows SDK 8.x.

Qt example named Boxes working on Ubuntu but not on Windows (Qt 5.0.2)

I have been searching for a cross platform GUI application development framework (Same code for building Linux, Android, Windows apps and OS X) and I found Qt is best for that (Inspired because VLC media player is build with Qt).
First installed it in Ubuntu I had some problem in building examples but I managed to solve it and every examples given in Qt is working fine.
But in Windows every example is working except the "Boxes" example.
Issues:
warning: Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c
error: This example requires Qt to be configured with -opengl desktop
After installing Qt 5.0.2 for Windows 32-bit (VS 2010, OpenGL, 476 MB)
error: Qt Creator needs a compiler set up to build. Configure a compiler in the kit options.
So, I checked Build & Run Option and it shows
you need to have qt built with opengl desktop option.
http://qt-project.org/downloads
look for Qt 5.0.2 for Windows 32-bit (VS 2010, OpenGL, 476 MB)
http://download.qt-project.org/official_releases/qt/5.0/5.0.2/qt-windows-opensource-5.0.2-msvc2010_32_opengl-x86-offline.exe.mirrorlist
after installing this qt release your example should work
Problem resolved after installing :
Microsoft Visual Studio 2010
Qt 5.0.2 for Windows 32-bit (VS 2010, OpenGL, 476 MB)
But, running the program form Qt alone works when I open the compiled exe file it shows Qt5***.dll missing.
Solving missing dll :
Open compiled exe in Dependency Walker and it will show all missing dll. Now go to
\Qt\Qt5.0.2\5.0.2\msvc2010_opengl\bin
there we can find all Qt5***.dll copy it and past it in exe location.

Resources