From: pgarceau AT teleport DOT com (Paul Garceau) Subject: Re: DirectX (was Re: server X) 26 Sep 1998 09:28:58 -0700 Message-ID: <199809252235.PAA17482.cygnus.gnu-win32@cygnus.com> References: <01J27VP3NPSO000L5V AT scottish-newcastle DOT co DOT uk> Reply-To: pgarceau AT teleport DOT com Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT To: gnu-win32 AT cygnus DOT com Hi folks, On 25 Sep 98, at 9:20, the Illustrious Robert DOT Cross AT scottish-newcast wrote: From: Robert DOT Cross AT scottish-newcastle DOT co DOT uk Date sent: Fri, 25 Sep 1998 09:20:18 +0100 (GDT) Subject: DirectX (was Re: server X) To: gnu-win32 AT cygnus DOT com > Alexander Kriegisch wrote: > > #I do not know enough about it, so this is more a question than a hint: > #How about DirectX and the like? Is it not designed for granting the > #developer direct hardware access? > > As far as I can tell from M'softs' literature, DirectX is *not* designed > to give direct hardware access. It appears to be graphics middleware, that > is an application can rely on a certain set of services and capabilities, > and a hardware vendor can ensure that their driver performs these services > in the most optimal way possible, (or not - there's some really lousy > driver code out there!). This is, for the most part, accurate. You can, via D3D "directly access hardware", however, the true definition is, "you can directly access hardware on any NT4 system, as long as you traverse the GDI and the HAL system levels along the way." In other words, the terms "Direct" h/w Access and "Direct" 3D are not the same thing and are definitely, imho, MS perpetuated misnomers...I won't get into my cynicism re: MS and stick to "just the facts" re: MS NT4 System Architecture: The NT4 GDI (not the same as the Win9x or NT 3.51 GDIs) is actually set, hierarchically, above the HAL (Hardware Abstraction Layer). Any and all GDI calls for NT4 *must*, logically and quite reasonably, go through the GDI before they can get to the HAL. GDI calls for Win9x (possibly NT3.51) do not. It is here where you find the biggest security flaws for Win9x. It is also, as I understand it, within the Win9x GDI that you find no security whatsoever. NT4, on the other hand, includes all security checks at the GDI level and the HAL so that once an NT4 GDI call is passed from the GDI to the HAL, the HAL does another check against the _currently available_ h/w drivers. If the _currently available_ h/w driver exists, then NT4 passes control to the h/w devices themselves. This is not limited to a particular set of h/w drivers but to all the currently available h/w drivers (includes all i/o ports) that NT4 has, previously authorized, access to. As a quick example, say you have a 16bit Tape Backup system that is in perfect working condition, and that Tape Backup System is not recognized as a valid or _currently available_ piece of hardware by NT... If you try to access the tapes' hardware from the NT system, HAL, not recognizing the Tape Backup System as "valid && _currently available_", ignores any attempts to access that tape backup system, even if the tape backup system may work fine under Win95/WFW or MS-DOS and has all the necessary drivers that NT4 needs in order to operate it. > > We keep being told that DirectX will make an appearance in NT, (5.0 > perhaps?). Actually, under the beta versions of NT5, DirectX and a newer version of D3D (DX5.x) is there and is working, but only as a DX5.x D3D h/w device call structure. MS says they will provide an SP(#4) to modify the NT kernel to handle D3D for DX5...I'm not holding my breath. The DirectX 3 D3D is already enabled (out of the box -- using MSVC/C++) once SP3 is applied. The problem is that the D3D portion is extremely difficult to deal with when it comes to porting unless you are a DX3 D3D guru of some sort. > This being the case if it provided direct hardware access, > wouldn't that break NT's security model? Actually, no...see my description about the GDI <--> HAL interface stuff above. > > Any other opinions anyone? Final opinion, DX3/DX5 D3D is badly flawed. This is largely due to the inherent inefficiency of the Win9x GDI/HAL interface. It is also the reason behind "why it is such a long time between DirectX updates for the NT4 OS", since MS has to modify the NT4 kernel32.dll every single time that MS releases a new version of DirectX for Win9x. In closing, if you are planning on using any accellerated h/w, such as a VooDoo or Banshee, you would be better served to develop your application using OpenGL since D3D (DX3 and DX5) apparently are not designed to, easily or conveniently, support such things. [For more on OpenGL vs. D3D, you might want to check out what the creators of QuakeII have to say on the subject. It was an eye-opener for me, perhaps it will be for you as well -- in other words, you don't have to believe me; you can find this out for yourself if you are so inclined.] Peace, Paul G. Information Systems Consultant NewDawn Productions http://www.teleport.com/~pgarceau/newdawn/ - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".