Answer the question
In order to leave comments, you need to log in
What to choose for mastering DirectX - UWP or Win32 API?
Hello.
I read guides on DirectX and Win32 API and wanted to take this topic seriously, but I came across a standard UWP template for DirectX in Visual Studio.
Microsoft recommends UWP for writing games for Windows. In all the help and guides from Microsoft, only UWP appears, while there is nothing at all about UWP on third-party resources about Directx.
Now I just can’t decide what to write toys on - Win32API or UWP?
Please share good materials on this topic, if possible :)
Answer the question
In order to leave comments, you need to log in
Microsoft UWP is an add-on for creating universal applications that, in theory, should be easily portable between different hardware layers of the Windows platform. UWP is only supported on Win10, implemented on top of the C++/CX extension of the C++17 standard , and implemented primarily in an object style.
The Windows API is a low-level layer of interaction between an application and the operating system. The Win32 API is supported by all versions of Windows since Windows 95. However, different versions of Windows support different sets of features. Therefore, the level of support for a particular function from the API set should always be specified in the documentation. The Win32 API is implemented in the C language of the C99 standard and executed in a procedural style.
This information creates a number of assumptions and restrictions for using both UWP and WinAPI. Based on the requirements of the project and relying on both assumptions and limitations, it is possible to deduce an unambiguous decision on the choice of only one of these two technologies.
C++/CX is an extension of the standard and is not supported by other platforms, nor by any compiler other than the Microsoft compiler. At the same time, there are such conditions when it is impossible to refuse the use of C ++ / CX and UWP. In other situations, the special extension syntax and object organization should be taken into account. Say, I would not completely do the entire project based on C ++ / CX.
WinAPI, on the other hand, provides rather low-level access, which makes it a little more difficult to implement the required functionality. A number of abstractions that are available by default in UWP will either need to be done on your own, or will not work at all without direct low-level work with drivers.
In any case, if you choose UWP or WinAPI, you are still better off working exclusively with standard C++ and the standard DirctX implementation for C++. You should get rid of C++/CX at the earliest possible layers of abstraction in platform-specific code. It is also better to get rid of WInAPI types and abstractions, as well as the C99 legacy, as early as possible and switch to working exclusively with standard C ++.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question