I have both Visual Studio 2012 Express for Desktop and for Windows 8, and I wanted to create Direct X applications and games. I know that there is a Windows SDK now, and in VS 2012 exp for win8 the IDE is pre-installed with the SDK (I know that from the new Direct3D project). My question is, if I wanted to develop applications for Windows Desktop (using VS2012exp) does it come Windows SDK or do I need to install Direct X SDK? And how do I know if my graphics card support which version of Direct X? Will any Direct X SDK version work with any Direct X version? As you can see I am a newbie at that stuff and any comment would be helpful. Thanks for your time.
If I wanted to develop applications for Windows
Desktop (using VS2012exp) does it come Windows SDK or do I need to
install Direct X SDK?
Yes, with Windows 8 SDK and Visual Studio 2012 (or Windows 8.1 SDK and Visual Studio 2013 preview) you can develop anything:
DirectX applications (both, Windows Desktop and Windows Store)
for any supported target platform (x86, x64, ARM)
for any reasonably modern Windows operating system (starting from Windows 2000/XP)
using any of API versions: DirectX 9.3, 10.0, 10.1, 11.0, or 11.1
Note:
DirectX 9 API is completely different from 10 and 11, and it is obsolete. Use it only if you targeting Windows versions below Vista.
DirectX 11 is more like an improved version of DirectX 10.
So in most cases, you will want to program for DirectX 11.1.
And no, you don't need to install DirectX SDK. It was deprecated (latest version - june 2010). Do not use it in new code. Use it only if you need to compile some old code which uses D3DX stuff (such as ID3DXEffect, ID3DXFont, ID3DXLine, ID3DXMesh, ID3DXSprite), e.g. samples from books or different SDK samples.
And how do I know if my graphics card support which version of Direct
X?
Well, if we talking about your videocard, you can look at your card vendor's or GPU vendor's site. Or any of informational utilities, such as GPU-Z.
If we talking about end-user hardware, since DirectX 10-11 there are feature levels. So even if you are using latest API (DirectX 11.1 at this moment), you can target old hardware (for example, if you using D3D_FEATURE_LEVEL_9_3, newer features, from D3D_FEATURE_LEVEL_10_0 and higher will be disabled).
Note, that to develop for latest feature level you don't need GPU that supports it. You can run and debug application on WARP device (ivery slow and meant for debugging purposes only, not for end-user release). For example, you can have old DirectX 10 card (Shader model 4.0), but target to DirectX 11 (Shader model 5.0)
Will any Direct X SDK version work with any Direct X version?
Latest DirectX SDK (june 2010) supports DirectX up to 11. No DirectX 11.1 support.
I'm a developer in Visual Studio who works with the DirectX tooling (the DX Diagnostic Tool and on the new project templates). You're asking a few different questions in here, but I'll try my best to answer the ones that I can.
1 - What SDKs are needed for DX application development? This link here as the best information on this. Basically as of the June 2010 DirectX SDK the DX SDK was combined with the Windows development SDK so if you install the most recent Windows SDK you'll have the right stuff for developing the newest DX applications.
http://blogs.msdn.com/b/chuckw/archive/2013/07/01/where-is-the-directx-sdk-2013-edition.aspx
This link also has more indepth info specific to the issue of DX Desktop apps on Windows 8.
http://blogs.msdn.com/b/chuckw/archive/2012/03/23/desktop-games-on-windows-8-consumer-preview.aspx
Note here that you can also install the June 2010 DirectX SDK on your machine, that won't hurt anything, we often install it ourselves as it has some useful sample applications to look at even if they are a bit outdated.
http://www.microsoft.com/en-pk/download/details.aspx?id=6812
2 - How do I know what my graphics card supports? I'm not sure if you mean how do I detect this in my DX application at runtime? Or if you mean how do I just look it up quickly for my specific system. To figure out your own GPU it's usually a pretty quick lookup, just find your device name and punch it in online, most stuff released in the last several years supports DX11 so you should be fine here. If you installed the June 2010 SDK that I mentioned above you can use the capability tool mentioned here:
http://www.danielmoth.com/Blog/What-DX-Level-Does-My-Graphics-Card-Support-Does-It-Go-To-11.aspx
At runtime DX has code to use to check if the running graphics card has the ability to use advanced DX 11 features.
http://msdn.microsoft.com/en-us/library/windows/desktop/hh404562(v=vs.85).aspx#check_support_of_new_direct3d_11.1_features_and_formats
http://msdn.microsoft.com/en-us/library/windows/desktop/ff476876(v=vs.85).aspx
3 - Will any DirectX SDK work with any DX version? So here you basically always want to be using the latest DX SDK as you could see with the link on feature levels above you can target lower levels of DX while still coding using the most recent SDK. Just use the most recent SDK and target feature level 9 if you wanted to create apps that run on DX 9 cards.
Related
if (FAILED(hr = D3D12CreateDevice(NULL, D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(p_ppD3D12Device2))))
{
// hr = nointerface
}
After checking the MS document, I knew the the problem maybe can be solved by update the windows.
GPU: Nvidia Quadro P4000
OS: Windows 2016 Server
But I have a few questions.
That mean some games using the ID3D12Device2 can not be played by some Win10 PC.
Which version windows update I need to apply? (I don't want to update irrelevant stuff.)
What is the advantage of using ID3D12Device2 、3、 4 instead of ID3D12Device?
"Windows 2016 Server" is the equivalent to Windows 10 Anniversary Update (14393). That version of Windows will therefore support ID3D12Device and ID3D12Device1 interfaces, but nothing newer.
If you upgraded to "Windows 2016 Server, Version 1709" then it would be the equivalent to Windows 10 Fall Creators Update (16299) which supports ID3D12Device, ID3D12Device1,ID3D12Device2, and ID3D12Device3.
PC games use whatever version of the device is supported by the version of the Windows 10 OS they deem required to support for their title. If they want to support older versions of Windows, then they use the oldest interface they want (typically ID3D12Device is fine for most basic graphics), and then use QueryInterface to conditional test for newer support if they make use of it. They will then need fallback codepaths if they want to run without that feature.
ComPtr<ID3D12Device> device;
if (FAILED(hr = D3D12CreateDevice(NULL, D3D_FEATURE_LEVEL_11_0, IID_PPV_ARGS(&device))))
{
// Not on Windows 10 or the is no default video device that supports DirectX 12
}
...
ComPtr<ID3D12Device2> device2;
hr = device.As(device2);
if (SUCCEEDED(hr))
{
// This system supports DirectX 12.2
}
Most of the newer versions of the device expose new functionality that you must check for first via ID3D12Device::CheckFeatureSupport to confirm that the driver actually supports the new feature on the current hardware, so just checking for the interface version isn't sufficient.
See SystemInfo and DxCapsViewer for more about the various 'optional' features.
Windows 10 does not ship 'new features' via Windows Update piecemeal. They are shipped as part of newer versions of the OS. If you were using Windows Server 2019 which is the equivalent to Windows 10 October 2018 Update (17763) you would have support up through ID3D12Device4 which supports DirectX Raytracing with proper hardware. There's not yet a release of Windows Server that provides ID3D12Device8 (Amplification & Mesh Shader, DirectX Raytracing 1.1, Variable Rate Shaders) support that shipped in Windows 10 May 2020 (19041). Remember DirectX 12 is considered a 'consumer feature'.
Having said all that, you don't need ID3D12Device2 support to learn DirectX 12. The method exposed by that interface, CreatePipelineState, creates a Pipeline State Object (PSO) from a D3D12_PIPELINE_STATE_STREAM_DESC. This is used for advanced shader scenarios like Amplification & Mesh Shaders, but you don't have to use it. For example, all of DirectX Tool Kit for DX12 works with the base ID3D12Device interface.
A larger concern is that you may not have a video card & driver that supports DirectX 12. See Anatomy of Direct3D 12 Create Device for the recommended way to create the DirectX 12 device.
BTW, D3D12CreateDevice supports being able to directly create newer versions of the interface for cases where you already know the target platform supports it. For example, using DirectX 12 on Xbox or if you are a UWP/Desktop Bridge app that has a particular version of Windows 10 set as the minimum supported OS.
Is there any way to statically link Direct3D so the program doesn't depend on any D3D DLLs? It seems impossible with Direct3D 9 and later (although I would like to be proven wrong), but I can't find any information on older versions. I'm making a small simple game and I really don't want a mandatory installer, but I want to use Direct3D.
No, there was never a time when you could statically link any version of Direct3D into your app. The same is true for OpenGL.
If what you are asking is "How do I create a Direct3D app that doesn't require an installer?", then this is actually quite easy to achieve as long as you give up on trying to support ancient and irrelevant versions of the Windows OS.
The simplest thing to do is target DirectX 11.0. Your system requirements would read:
Windows 8.1, Windows 8.0, Windows 7, Windows Vista Service Pack 2 with KB 971644
See Direct3D 11 Deployment for Game Developers
Use Direct3D 11.0 APIs
Use DirectXMath, DirectX Tool Kit, DirectXTex, and/or DirectXMesh which are all statically linked
If desired, you could use Effects 11 as it is also statically linked.
Avoid all use of D3DX9, D3DX10, and D3DX11
Use XInput 9.1.0; avoid XInput 1.3 (on Windows 8.0+ you could use XInput 1.4)
Avoid use of XAudio2.7 (On Windows 8.0+ you could use XAudio 2.8)
Avoid use of XACT
If you use VS 2010 or later, then you can deploy the required VCREDIST files side-by-side with your application with a simple copy
If you use the Windows 8.x SDK version of D3DCompile, you can deploy it side-by-side with your application with a simple copy.
Audio is the biggest challenge here since XAudio 2.8 is only on Windows 8.0 or later, and XAudio 2.7 requires the DirectSetup redist to deploy. Most audio middleware solutions use WASAPI directly on Windows Vista+, so these are reasonable options. You could use legacy DirectSound8, and the headers for that are at least in the Windows 8.x SDK that comes with VS 2012/VS 2013.
If you need Windows XP support, then require Windows XP Service Pack 3 as the minimum OS. This will include DirectX 9.0c and WIC components as part of the OS.
You'll need to use Direct3D 9 and DirectSound8
Avoid using D3DX9 at all so all HLSL shaders would have to be pre-built offline, and you can't use the Effects (FX9) system or D3DXMath.
If you are using VS 2012/VS 2013, you can target Windows XP using the *_xp Platform Toolset, but remember that that uses the Windows 7.1A SDK and not the Windows 8.x SDK so it has some implications for DirectX development.
Direct3D 9 debugging on Windows 8.0 or later is also a huge pain as there's no developer runtime available for it.
All of this assumes you are using C++. Using .NET is not realistic as the deployment story for .NET is rather complicated. You could in theory use .NET 2.0 if you require Windows Vista+ or later, but it may require enabling a Windows feature on some versions of the OS, and you can't count on any version of .NET to be present on Windows XP. .NET 4.0 is on by default for Windows 8.0+, but support for .NET 3.5 and earlier is off by default. However, all use of DirectX from C# requires additional assemblies which themselves likely have dependencies on the legacy DirectSetup deployment.
In order to deploy C++ application built with VS2013 compiler under Windows XP, the "v120_xp" platform toolset has to be set: this make it possible the deployment from XP to 8.1. So next come the question: why this platform toolset is not the only one and the default? The "v120" platform toolset is suitable starting from Windows Vista. Is there any performance drawback? I've tested an application built towards both the platform toolsets under Windows 8 but I've seen no difference in performance (apparently..).
There are quite a few things you just can't do with the XP-dedicated toolset - it makes use of old headers and libraries, and so apps built with it just can't call a lot of newer APIs and use some fancy newer tools. A notable example is DirectX - quoting this MS page:
When building applications that support the legacy Windows XP platform,
you are using a platform header and library set similar to those that
shipped in the Windows 7.1 SDK rather than the Windows 8.x SDK with
the integrated DirectX SDK content (see Where is the DirectX SDK?).
Many of the "DirectX" headers and libraries are included with these
Windows XP compatible platform headers (see DirectX SDKs of a certain
age) such as Direct3D 9, DirectSound, and DirectInput. You will,
however, need to continue to use the legacy DirectX SDK for Windows XP
compatible versions of the D3DCompile API (#43), legacy D3DX9,
XAUDIO2, XINPUT, and PIX for Windows tool (the Visual Studio 2012
Graphics Debugger does not support Direct3D 9 applications).
Windows SDK 7.1A is installed as part of VS 2012 Update 1 for use with
the "v110_xp" Platform Toolset, which contains the headers, libraries,
and a subset of the tools that originally shipped in the Windows SDK
7.1. There are older Direct3D 10 and Direct3D 11 headers as part of this 7.1 era toolset which are outdated compared to the Windows 8.x
SDK versions using the standard "v110" Platform Toolset, particularly
the SDK Debug Layers installed by the Windows 8.0 SDK on Windows 7 and
Windows 8. The Platform Toolset "v110_xp" is therefore not recommended
for developing DirectX 11 applications, but it can technically be done
with some caution. Windows SDK 7.1A does not contain a dxguid.lib so
must either locally define the required GUIDs in your project by using
define INITGUID in one of your .cpp files, or use the legacy DirectX SDK version.
I currently need to work on a Compact Framework Project again. I used to do this some time ago with VS 2008, however I don't have a license for this anymore. I do have licenses for 2012, and it really seemed like good timing for me given the recent announcements (Get started developing for Windows Embedded Compact in Visual Studio (Compact 2013)).
I downloaded and installed Application Builder for Windows Embedded Compact 2013
And install the Embedded Compact 2013 Update 5 (full setup).
Unfortunately after these steps the Project Templates still won't show up.
My current understanding is that the template will only be visible when I also install the SDK.
The SDK provided for the Windows Embedded Compact 2013 product that you are targeting. Typically, this SDK is provided by an OEM.
However, I don't have a device for development, I used to use the emulator for this and they used to be available in Visual Studio without big fuzz.
I tried to find an emulator using my preferred web search, but without any success.
Using Windows Embedded Compact 2013 (WEC2013) it's impossible to develop a Net CF 3.9 application without an SDK.
There isn't a default SDK. In general, when you have an embedded system, it isn't general purpose but it has specific features that the OEM exposes with a custom SDK. In this way, avoiding standard SDK, who develop application can't use feature that there won't be on the target hardware.
The only way you have to start develop is to install Platform Builder and using built in CEPC BSP to create a CEPC image for a virtual machine and an SDK for it.
After installing this SDK you can use your virtual machine with CEPC image to run your application. In this way you can create an "emulator" for a x86 system with WEC2013 on it.
Paolo.
I need to emulate a Windows CE executable on my Windows 7 64-bit machine. Back in the day, I used eMbedded Visual C++ 4.0's bundled device emulator, but nowadays the cool kids want me to use "Platform Builder" and ActiveSync. So I found a Windows CE Platform Builder 3.0 update here, but I can't find the original download, which it requires:
PB not installed: Please install Windows CE Platform Builder 3.00 before
installing this Update.
My problem stems from having installed the Standard CE SDK (STANDARD_SDK.msi) and a Windows CE BSP, which shows up in Visual Studio 2008's "Device Emulator Manager", but I can't connect to or run them. The Pocket PC images work, though.
Where do I find Windows CE Platform Builder 3.00?
Platform Builder 3.0 is really, really old and I doubt any distributors carry it any more. When it was a shipping product, a distributor (Arrow, Avnet, etc) was the only place you could get it, so that's where I'd at least check on the long-shot chance.
That said, I'm not at all sure why you feel you need it. Platform Builder is for generating an OS image. PB is a difficult tool to get to know, and the 3.0 version was unwieldy at best. It's also not going to run under 64-bit. It also can't create an OS that runs on a 64-bit machine. It also cannot create an SDK that will plug into any version of Studio (well it might work in VS 2003 - it's been a long time since I did that).
What it actually sounds like you're after is an emulator and image for that emulator for a basic CE 3.0 device. Microsoft shipped the HPC Pro emulator, which was a 3.0-based device with the EVC tool set, though I've got no idea where you'd find it (short of digging out old MSDN disks).
For what it's worth, the PocketPC 2003 images are CE 3.0-based, so you do have a CE 3.0 emulator today - it's just not a more generic CE build.
Ideally I think you need to tell us exactly what you need. An emulated version of what sort of CE 3.0 OS? What components? Targeting what OS (the old emulator would only do x86, so if you have some ARM or MIPS app, that was never emulated anyway).