28

enter image description here

The windows 95 is known for introducing a couple of classic screensavers including: Maze, Pipes and starfield among others. It looks like DirectX is a collection of multimedia APIs but for this question is really only Direct3D sublibrary.

It looks like most Windows 95 shipped with DirectX 2 but I could foresee the developers using their own libraries or procedure calls.

nabulator
  • 919
  • 1
  • 9
  • 24
  • 25
    The Pipes screensaver (and probably the others) shipped with Windows NT, which predated both Windows 95 and DirectX anything. I believe Pipes used OpenGL. – Greg Hewgill Dec 04 '19 at 20:16
  • 8
    I’m pretty sure starfield was in at least Windows 3.1. Most likely doesn’t use a 3D API. EDIT: confirmed; https://youtu.be/9ps3wngQspE https://youtu.be/KheYW_G0goY – Tommy Dec 04 '19 at 20:47
  • 5
    Random side info: I remember learning from a magazine that the "flying windows" screen saver used the windows logo from the Windings font. If you changed the right byte you could change glyph it'd render. I used to have flying skull and crossbones because I thought I was a badass hacker :) – Matt Lacey Dec 06 '19 at 01:54
  • Don't forget direct x 7, was not compatible with 5 and lower anything running 5 and lower stopped working if you installed 7. Screen saves kept working. – D s Dec 06 '19 at 16:58

1 Answers1

29

All of the classic 3D screensavers (3D Maze, 3D Pipes, 3D Flying Objects, 3D Text, and 3D Flower Box) used OpenGL instead of DirectX. This was a virtual necessity for two reasons: (1) the original version of Windows 95 didn't ship with any version of DirectX, and (2) the Direct3D API required hardware acceleration that most PCs of the time wouldn't have had. On the other hand, OpenGL could fall back to software rending if hardware acceleration wasn't available. (In fact, I'm not sure there was any hardware support for OpenGL on Windows 95 when it first came out.)

At least some of these 3D screensavers—in particular, 3D Pipes—were actually introduced in Windows NT 3.5, a year before Windows 95 came out. In theory, these screensavers could have been rewritten to use Direct3D in later releases of Windows, but that never happened. While DirectX became a standard part of Windows with Windows 95 OSR2, by the time you could pretty much always depend on 3D hardware support (some time during the Windows XP era), these screensavers were no longer being included with Windows. Direct3D never got a practical software renderer that you could use in production applications until Windows 7. There was a painfully slow reference rasterizer before that, but it has never been part of Windows or the DirectX end-user installs. You can only use it if you have the DirectX SDK installed.

There were at least some third-party screensavers that used Direct3D, but they were very uncommon. It didn't help that the official Windows screensaver API made it difficult to write a screen saver using Direct3D.

Cody Gray - on strike
  • 1,554
  • 14
  • 21
  • 2
    Direct3D did have software rendering too, at least on some of the very early versions (maybe v3 or v5) – tuomas Dec 04 '19 at 21:09
  • Windows 95 did ship with DirectX - Pitfall Mayan Adventure was an early game that used it. It did not ship with Direct3D as that came latter. – Brian Dec 04 '19 at 21:14
  • 4
    @tuomas No, not really. There was the reference rasterizer, but it was too slow for real-time 3D and was only available as part of the Direct3D SDK and couldn't be redistributed to users. You might also being thinking of retained mode, but this was just a higher level layer over the lower level immediate mode. No one used retained mode, so Microsoft eventually removed it. –  Dec 04 '19 at 21:33
  • @Brian It's likely that Pitfall Mayan Adventure came with some sort DirectX install. This was how WinG, DirectX's predecessor worked and most DirectX games up until Direct3D 10 also shipped with a DirectX installer. –  Dec 04 '19 at 21:43
  • 21
    I seem to recall it being "hilarious" when someone enabled the open gl screensavers on an NT 4.0 IIS server that definitely fell back to software rendering which ate a non-trivial chunk of CPU time that was supposed to go to the web server... – Foon Dec 04 '19 at 22:12
  • 1
    Having never worked with Direct3D, but being quite familiar with the Windows screensaver API, can you elaborate a bit on what the difficulties were in mixing the two? – Cody Gray - on strike Dec 05 '19 at 06:31
  • 10
  • 4
    Fun fact: the source code for these OpenGL screensavers was shipped with the Windows SDK. If you have a copy, or an MSDN subscription, you should be able to find them with the Windows NT 4.0 SDK or bundled with a copy of Visual Studio Professional of the appropriate vintage (say, v5.0 circa 1997). – Cody Gray - on strike Dec 05 '19 at 06:47
  • 2
    @CodyGray The standard Direct3D application uses a modified message loop, one that calls PeekMessage instead of GetMessage and renders frames whenever there aren't any messages to process. The screensaver API has its own message loop, preventing this. There are ways around this, but the standard solution was to just not to use the screensaver API. Instead they used the formerly undocumented lower-level screensaver interface. https://support.microsoft.com/en-us/help/182383/info-screen-saver-command-line-arguments –  Dec 05 '19 at 06:52
  • @RossRidge Dxdiag would list an unaccelerated mode, though, saying that it couldn't use the accelerated mode. If that wasn't using software rendering, what was it doing? Were the games that still ran while in that configuration using some other renderer instead of DirectX? – trlkly Dec 05 '19 at 06:53
  • @trlkly You might be thinking of DirectDraw or DirectSound. Most games back in the era of Direct3D 3 or 5 had their own software renderers they would use if hardware acceleration wasn't available. –  Dec 05 '19 at 07:01
  • 3
    As far as I remember (at least in some later Windows versions - 98/Millennium), the default text for the 3D Text screensaver was indeed OpenGL. – trolley813 Dec 05 '19 at 10:05
  • Not-so-fun fact: Many games of the era (like FIFA98) indeed came with DirectX 5 installer, which would upgrade some system dll. But if you had Windows95/98 in non-English language (enabled or localized), then the original system dll was also different, so the English version that came with the DirectX installer would render Windows unbootable, including in safe mode. To fix, I'd have to boot to actual DOS and replace the file back. – Jonathan Dec 05 '19 at 13:51
  • 4
    How many saw the teapot easter egg in the Pipes screensaver? – Stephen Kitt Dec 05 '19 at 22:33