It’s almost weekend, and time for a lighthearted post on the two realtime 3D computer graphics libraries that are available on Windows in 2011: OpenGL and Direct3D. The reason I mention the year is simply because of the fact that two years from now, this information will be as untrue as the Wikipedia article* on this matter due to rapid hardware and software developments. But for now, let’s bash it out.
Microsoft confirmed today at the 2011 CES that the next generation of the Windows operating system will indeed run on ARM processors, following wild rumors and speculation this past week.
Windows on ARM processors means that the operating system is now capable of running on a plethora of mobile devices, thus opening up an entirely new market segment for Microsoft. Is this the end of Windows Phone? Will Windows 8 be the new Microsoft mobile OS?
EDIT (01/06): Not much more info was released in last night’s keynote speech by Steve Ballmer. However, the implications of having the full-fledged Windows operating system on a mobile device such as a phone are tremendous. Android and iOS will have to pick up some speed to compete with the OS that has been in the making since 1985 and has excellent hardware and software support e.g.: multi-threading, scheduling, peripheral support, .NET Framework, WPF, Win32 API, etc., etc.
Looking at the few mentioned features on the page (tessellation, multithreaded rendering, compute shaders, Shader Model 5), I’d say OpenGL is in big trouble if they want to catch up.
This weekend I took some time out to reformat my development computer in preparation for Windows Vista. I used Vista before but switched back to XP x64 in less than a week’s time. But heck, after a year and a Service Pack, I was willing to take the chance with Vista.
I wanted to take advantage of the DirectX 10 features Vista exposes since they’re not available on XP but was kind of disappointed with the performance of the API in Vista. It seems to me that the samples provided in the DirectX SDK simply run much slower than on XP.
Granted, I bought the most budget oriented GPU that supports DX10 (Geforce 8500GT 512VRAM) but that was simply because of the reason that I want my projects to be able to run on the lowest budget hardware possible while still being able to access DX10-like features. Dell, in fact, offers the 8400 on their laptops and budget desktop PCs, which is a fair share of the market and should be targeted.
Vista itself seems pretty solid so far; it certainly responds better than a year ago and supports all of my hardware and development tools (VS 2008, AQTime, Intel C++ compiler, etc). The big test will be OpenGL: Will it also have performance drops or stay the same? I’ll see tonight.
There has been a firestorm of discussions on the topic of “Is Direct3D 10 on Windows XP Possible?” This article will attempt to provide an answer to this hot topic. The answer has already been provided by Microsoft’s officials on several occasions but regardless of the manner in which DirectX 10 functions in Vista, would the functionality provided in Direct3D 10 be possible to implement? The official answer is a resounding no for the entire DirectX API, but what about Direct3D 10 which would be the only API of interest here?
What’s the argument?
Like any Direct3D version, Direct3D 10 is an API which abstracts a pre-defined set of functionality (as much as the API supports) of the underlying hardware. Ever since Direct3D 10 came out however, the minimum hardware capabilities were defined by the API rather than the hardware. This was a way to eliminate the old DEVCAPS (Device Capabilities) struct found in Direct3D 9 and below and to push a certain level of standardization or conformance.
If we take a close look at the features presented in Direct3D 10, which is easy since it’s predefined (non-expandable), we’ll notice shortly that none of the features are limited to Vista; neither are they unique to Direct3D in general:
Unified Architecture (programmable pipelines)
Shader Model 4: HLSL Pixel Shader v4.0, Vertex Shader v4.0
Geometry Shaders
Texture Arrays
Predicated Rendering
Instancing 2.0, which is a redo of the previous Microsoft Geometry Instancing
When a notice is made that these features were already available under Windows XP through OpenGL 2 and up, attention will most likely be redirected towards the WDDM, which is the Windows Display Driver Model, unique to Windows Vista.
What’s WDDM?
WDDM (Windows Display Driver Model) is a Windows Vista-only Windows Driver Model for IHVs (Independent Hardware Vendors) to base their display drivers on. WDDM allows the developers to take advantage of several new functions not available in the old XPDM Windows XP Display Driver Model, namely:
Virtualized Video Memory:
Allows the Operating system to (optionally) utilize system RAM if the Video RAM (VRAM) is insufficient.
Application requires a to push some data to VRAM via D3D API calls:
D3D10 User-Mode abstract layer handles event and triggers:
The Kernel-Mode WDDM interface determines:
If VRAM is not full, push onto VRAM stack, else:
Push onto RAM stack.
If the application needs to pop the memory from the stack, it doesn’t have to determine where to pop it from since WDDM handles this process. The stack push/pop terminology is used solely for simplifying the example and doesn’t denote the actual inner workings of the WDDM in any way since this is indeterminable.
GPU Threading:
A GPU process runs as a thread on the GPU and allows CPU-like multi-threading on a regular CPU. This means that you can spaw multiple Direct3D processes on a single GPU, thus WDDM must support the following item on this list.
GPU Interruptibility:
Allows process interruption, which means that you can switch from one GPU process to another without the process losing its context and resources.
Direct3D Surface Sharing:
Allows for a different process to access a D3D10 surface. This is necessary for the DWM (Desktop Window Manager) to function properly to allow for a final Desktop composition.
Other Features:
Allows for a Display Driver restart on failure without requiring a total reboot.
The Main Problem
Since the functionality introduced in WDDM is Kernel-Mode, there is no chance this could be implemented into Windows XP unless a total rewrite of the XPDM is initiated. The reason for this is that developers don’t have access to the underlying hardware directly, only through the usage of APIs such as Direct3D or OpenGL. This conversion of XPDM, naturally, will not happen since Windows XP is being deprecated in favor of Windows Vista.
While there have been attempts at porting Direct3D 10 / DirectX 10 over to Windows XP, this will always continue to be the main problem.
Alternative Solution
Using Direct3D 10 as it is provided in Windows Vista in Windows XP is impossible. Yet there is a possibility to achieve the same graphics quality on hardware that supports it on Windows XP; by using the OpenGL API instead. OpenGL allows the developer to access the same functionality provided by Direct3D 10 by using so-called IHV provided extensions but that’s an entirely different article. Also, note that this would only provide the same features which Direct3D provides and none of the WDDM functionality unless you find a way to emulate the Kernel-Mode functionality in User-Mode in Windows XP.
Matthew Mullenweg at Photomatt.net “predicts” that:
Microsoft will Open Source Windows before 2017.
While I usually like Matt’s posts — I get them through the Wordpress control panel — I think that he might be a bit off this time. The Windows kernel is still under constant development and was derived from the DOS base architecture first founded in 1981.
This means that DOS is now 26 years old, almost 27.
Since MS-DOS hasn’t been released under an Open Source license I think it’s ridiculous to say that MS Windows will be releasing it under an O.S. license any time in the distant future — even with Open Source getting more and more popular.
An older product, BASIC which was first released on the Altair in 1975 (32 years old) is no longer being developed, is no longer being shipped with any Microsoft Operating Systems but has evolved in Microsoft’s Visual Basic / Visual Basic .NET. Products which in their own right have helped form products like C# and the Visual Studio product line. While you could get the BASIC source “code” (in patch point form), later binary versions of BASIC aren’t open and haven’t been opened up ever since.
While Microsoft gives you many tools to build upon the Windows Platform, I don’t think that Microsoft will open the source to Windows, not even Windows 1.0. I might be wrong — and I hope I am — but I got a pretty good feeling that current Microsoft CEO Steve Ballmer is more focussed on monetary rewards for him and Microsoft than anything else.
Quite recently I released a small article discussing if you (as a developer) should upgrade to Vista to take advantage of DirectX 10 functionality only available in Windows Vista. Quite simply the answer was “yes” in my article. As a developer you should always take advantage of new technologies, specially if that technology will replace an existing technology.
HotHardware.com has released an article more aimed towards the end-user than the developer which discusses the State of DirectX 10. In this article both performance and image quality are evaluated to give a fair estimation.
It’s 13 pages long but worth the read, check it out at HotHardware.com.
Is it me or has this last season been the most productive one at Microsoft in a long time? First we get the new version of the DirectX SDK and now we finally have the final version of Internet Explorer 7, not to mention the plethora of CTPs that came out the last couple of weeks..
So, what’s going on? More marketing on MS’ side? Let’s hope so since free software is great - even though most products expire next year and it’s not free in the manner of beer and speech.
Still, allowing everyone to become a “beta-tester” is a great marketing strategy. People use the products for almost a year, become dependent on it and will have to buy the product when in comes out since the CTPs expire.
Take Windows Vista RC1 for example. This version of Windows is freely download-able but will expire on June 1st 2007. For home-users this is a great way of getting a Next Generation operating system for free and even be able to work with it for quite some time. By using CTPs/Betas you are not limited in saving files etc, there’s simply a time period - similar to trial software. Now, June 1st 2007 - Vista expires. You’re stuck with your CTP and all your important data on your hard-drive. Your copy of windows has expired and the only way to get back in is to buy Vista/License key.
Now that’s how you sell products — by creating a dependency.