2

I recently installed VC++ 6.0 on an old machine with Windows 95. On Windows 95 there is a 3D maze screensaver made with OpenGL but the computer doesn't have a 3D video card. I would like to know how I can make 3D graphics like in the 3D maze for no 3D video cards.

If you know of a good tutorial or book, I would be happy with your suggestion.

Midas
  • 7,012
  • 5
  • 34
  • 52

3 Answers3

5

OpenGL, if no dedicated 3D hardware is available, can render the graphics on the CPU. You might have noticed that, while the screensaver is running, CPU usage gets pretty high. If you want to learn more about OpenGL, the I would recommend that you take a look at https://stackoverflow.com/q/62540/1103747. My personal favorite is the OpenGL Superbible. But as a suggestion, if you want to learn 3D graphics and your target OS is Windows, I think that you should study something else (WPF, DirectX, XNA, etc). Obviously you will probably want to upgrade from Windows 95.

Community
  • 1
  • 1
Felice Pollano
  • 32,832
  • 9
  • 75
  • 115
  • OpenGL is well supported under Windows, and also in Vista and Win7 if a proper ICD is installed. And if you've installed your GPUs drivers, you got that ICD. And instead of DirectX and the other Windows-only-APIs OpenGL is true plattform and can be used almost everywhere. – datenwolf Mar 16 '11 at 16:53
  • @datenwolf true, but if you are planning to stay on win, for game developement I think XNA/WPF be the best solution expecially for assets managements ( importing and using models and so on ) – Felice Pollano Mar 16 '11 at 16:57
  • -1 OpenGL was not included in the very first versions of Win95. I remember having to download OpenGL long after I had played with the maze demo. – Timothy Baldridge Mar 16 '11 at 17:04
  • @Timothy thank for the -1, but since @Midas has the screen saver working, I suppose he has OpenGL already installed. – Felice Pollano Mar 16 '11 at 17:07
  • 1
    @Midas, that's just it, it's not a OpenGL-based engine. It's a software ray-caster. The frame rate the maze has would be impossible with software polygon rendering on a 60Mhz Pentium. The first game engine to pull off the number of polygons used in the maze is Quake (Descent used a portal engine). That required a level of programming that MS wouldn't have thrown into some random screensaver. No, it's a raycaster, it's simple to implement, and blazing fast, and the resulting images look exactly like what we see in the maze. – Timothy Baldridge Mar 16 '11 at 17:11
  • 1
    @Felice Pollano: Any serious 3D engine will use it's very own asset management. And then whatever the API provides in that regard becomes irrelevant. – datenwolf Mar 16 '11 at 17:13
  • I assume OP has a good reason for using Win95. Using VC++ 6.0 isn't a good choice. For Win95 use Delphi or Lazarus/FPC. You may want to look into TinyGL as well as looking into into on very old GPU:s, but software rendering is required for good 9X support. If you want code that runs well on 9X and later you'll need backends for at least two graphics API:s. They've changed a lot since that. – user1657170 May 27 '19 at 09:06
2

Many 3D games were written with graphics provided by software. Both Open GL and Direct 3D have modes that allow for software rendering.

The original version of Half Life can run without graphics hardware and this was one of the reasons for its success.

Back when Windows 95 was current, very few machines had graphics cards with 3D accelerators and so this was how PC games worked.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
2

The demo is actually a raycaster. It's the same tech that is used in Wolfenstein, and Doom 1/2.

More info here: http://en.wikipedia.org/wiki/Ray_casting

Timothy Baldridge
  • 10,455
  • 1
  • 44
  • 80
  • The source code for this screensaver is in the Microsoft Win32 SDK circa 1996, under the path `MSTOOLS\SAMPLES\OPENGL\SCRSAVE\MAZE`. It is in OpenGL and is not a raycaster. – polpo Jan 17 '23 at 05:07