I'm starting game development with DirectX and I was wondering if I somehow play games that I make on Xbox. I know you can use Xbox controller controls, but only on computer (as I know).
Xbox One supports a "Developer mode" which runs UWP applications written for DirectX 11 or DirectX 12. See Microsoft Docs
See this blog post for some additional notes.
To sum up:
For UWP on Xbox One, only x64 native apps are supported
Direct3D 11 with D3D_FEATURE_LEVEL_10_0 is supported
Direct3D 12 with D3D_FEATURE_LEVEL_12_0 is supported in 'game mode' only
Direct3D 9 or earlier is not supported.
For UWP development you do NOT use the legacy DirectX SDK or the deprecated D3DX library.
Game controllers are accessed via Windows.Gaming.Input, and there is an XINPUT emulation library you can use xinput_uap.lib. DirectInput is not supported.
XAudio2 is supported. DirectSound and XACT are not supported.
If you are looking to learn low-level graphics in C++ see DirectX Tool Kit. This library is supported for UWP apps including UWP on Xbox One as well as Win32 desktop apps on Windows 7 or later. The UWP templates at directx-vs-templates work for UWP on Xbox One.
There are a number of UWP samples on GitHub which will run on UWP for Xbox One.
Unity can also be used to target UWP on Xbox One
Related
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.
I'm currently developing the cross-platform application for Android, iOS and UWP (Universal Windows Platform). I have found OpenGL examples for iOS and Android, but did not find any of them for UWP.
So, the question is, How can I use OpenGL in UWP applications?
OpenGL does not run out-of-the-box with the Universal Windows Platform. A solution to this is ANGLE that layers WebGL's subset of the OpenGL ES APIs over DirectX API calls.
Useful NuGet packages can be found here but I don't know how this can be implemented in a Xamarin project, if it can be implemented at all.
Is there any sample/tutorial/resource of using EAX with DirectSound or XAudio2 in C++? I cant find anything and I really need that for my game engine.
First of all, DirectSound is ancient at this point. It is still supported for older games, and the DirectSound 8 headers are in the Windows SDK, but there's been no samples or documentation updates for it in over a decade.
The Windows audio driver model (WDM), however, does not support hardware audio mixing like that required for Creative EAX. Support for this was removed as of Windows Vista, so EAX cannot be used through either DirectSound or XAudio2.
To sum up the Windows Vista driver model changes w.r.t to DirectSound:
LOC_SOFTWARE buffers can support surround sound multi-channel formats. On Windows XP only mono or stereo were supported for LOC_SOFTWARE.
LOC_HARDWARE buffers are not supported.
Effects (I3DL, EAX, etc.) are not supported through DirectSound.
DirectSound 3D positioning is limited to mono sounds.
XAudio2 supports environmental reverb and 3D audio positioning including multi-channel sources, all done in software.
XAudio 2.8 is in the Windows SDK, although you need to use the legacy DirectX SDK for XAudio 2.7 to target Windows 7 or Windows Vista--see this post for details. Samples can be found on GitHub. The DirectX Tool Kit for Audio is very useful abstraction for using XAudio2 from C++.
UPDATE: XAudio 2.9 is now available on Windows 7 SP1 or later via the XAudio2Redist and avoids any need to use the legacy DirectX SDK or legacy DirectSetup deployment.
To get hardware access for features like EAX, you have to use a 3rd party solution like OpenAL. See the Creative site for more.
I have experimented with XAML UI programming using C++ for Windows 8 Store apps. I really like the developer experience, the XAML designer and the fact that I can get pure native apps with a modern rich user interface and high performance.
I want to create similar XAML apps using C++ for Desktop Windows (the non-Store world). How do I do this? For years I have waited for a native UI stack for Windows Desktop which is newer than MFC and somewhat higher level than direct Win32/GDI programming.
Both Silverlight and WPF use XAML along with code-behind to implement apps. Neither are still maintained but if you want to play with the same technology, it's there.
As Jeff McClintock mentioned, Microsoft has announced that a future update to Windows 8 will allow apps to run on the desktop, but I expect that this will merely be a windowing change and the apps will still run in the restricted sandbox that Store Apps run within. Maybe Microsoft will introduce yet another desktop-based UI framework and support it for three years before killing it.
WTL is newer than MFC, although its last update was six years ago. I personally recommend Qt, as it allows access to native Win32 calls (so you can do whatever ganky stuff Win32 apps normally want to do) while still having a rich, robust UI framework to build upon.
A future update to Windows 8.1 will allow Windows 8 Store Apps to run in a Window on the Desktop, and appear on the taskbar like a Win32 Application. This allows Store apps to Act a lot like Desktop Apps. MS have hinted store-app XMAL will be available to Desktop apps at some point in future.
http://www.gottabemobile.com/2014/04/02/microsoft-listens-to-users-start-menu-and-windowed-apps-are-on-the-way/
Codejock has some markup language support in MFC (native C++).
http://www.codejock.com/inc/img/downloads/samples/toolkitpro_markupsample_full.png
What I am looking at is C++/WinRT for native C++ applications that use the WinRT framework for UWP apps, at least for Windows 10. See C++/WinRT in the Microsoft Dev Center for a starting place.
C++/WinRT is an entirely standard modern C++17 language projection for
Windows Runtime (WinRT) APIs, implemented as a header-file-based
library, and designed to provide you with first-class access to the
modern Windows API. With C++/WinRT, you can author and consume Windows
Runtime APIs using any standards-compliant C++17 compiler. The Windows
SDK includes C++/WinRT; it was introduced in version 10.0.17134.0
(Windows 10, version 1803).
The intro article in the series goes on to say:
For authoring and consuming Windows Runtime APIs using C++, there is
C++/WinRT. This is Microsoft's recommended replacement for the Windows
Runtime C++ Template Library (WRL) and C++/CX.
I first got started with UWP apps for Windows 10 using C++/CX which uses the Microsoft Visual Studio C++ extensions with ref and all of the C# like extensions for C++ in a .NET world.
I am now working with Visual Studio 2017 and the C++/WinRT framework which uses native C++17 features along with an SDK. I believe you can also use C++/WinRT with Visual Studio 2015 with the latest updates, update 3.
There is also a package available from Extensions and Updates within Visual Studio, C++/WinRT, which contains a couple of Visual Studio templates for a couple of different application types.
C++/WinRT seems to be a work in progress. It seems best if you are using Visual Studio 2017 with the latest Windows 10, Version 1803, which contains the SDK and the XAML editor works fine. I have had problems with the XAML editor with an earlier build of Windows 10 Enterprise at work (IT Services maintains its own update servers and is a couple of builds behind the bleeding edge).
See also my question synchronizing SDK with Windows 10 update and using WinRT with Standard C++ which has an updated version of a test program from this article, C++ - Introducing C++/WinRT.
I am looking for a GUI library to design the interface for my application. Are there any libraries that work well with the Intel Perceptual Computing SDK?
Any GUI library that is available for Microsoft Visual C++ 2008 or later and runs on Microsoft Windows 7 or later should work well.
If you want GUI that works both on Linux and Windows then for example Qt. It can
be integrated with MSVC++.
I strongly advise you to use QT framework. It is cross-platform and runs on the major desktop platforms.
You can check my demo ipcQTgesture hosted at github.
The GUI is very simple and it is created with Qt. Even though Qt is cross-platform framework for building graphical applications, the Intel® Perceptual Computing SDK is not, so for the moment we are stuck to Windows.