• Please review our updated Terms and Rules here

DarkGL - OpenGL driver for vintage computers

Geri

Experienced Member
Joined
Apr 24, 2019
Messages
147
DarkGL is a software-rendering based OpenGL driver.

Unlike other software rendered opengl drivers (they target modern 64 bit multicore systems), DarkGL targets 5x86 class computers (Pentium1, AMD K5, Cyrix 6x86 or above) and playability in 320x240 or sometimes in 400x300.

DarkGL supports most of OpenGL 1.0, 1.1, 1.2 1.3 and 1.4 features including 16, 24 and 32 bit texturing, z-buffer, true color rendering, multitexturing, vertex buffer object, vertex arrays, element array, non-power-of-two textures, light and color support, triangle, triangle strip, triangle fan, quad, n-polygon based rendering.

The fill-rate of DarkGL on a Pentium1 MMX is comparable to a S3 Virge 325 in 320x200.
The vertex processing performance is about 3000 polygons on the screen on a first gen Pentium1, and around 6000 on a Pentium2.

Screenshots:
qvmcpjW.jpg

U6viEov.jpg



DarkGL is multiplatform. For now, Windows 95/98 compatible dll file is being released, Linux and BSD version will be released later on.
DarkGL supports multithreaded rendering, to utilize multiple CPU cores as well.

DarkGL is available for free, its a freeware software.
You can download it from: http://users.atw.hu/darkgl/index.html
 
Interesting. Maybe this could be handy on newer systems running an older OS, which are forced to use a generic VESA video driver or the like. I'll have to try it on NT 3.51 later. I ran a few tests already with programs that I made for the sake of learning some OpenGL.

I tried a program that uses gldrawpixels to show a 24-bit BGR bitmap inside a window (as an alternative to using GDI setdibitstodevice). This program ran but only showed a black window.

I tried a benchmark program that renders a model with 500,000 triangles. The result on my Athlon II X2 with DarkGL was 1.2 million triangles/second. But it rendered as a solid color without the usual lighting effects.

Lastly I tried a textured, spinning cube demo but this freezes without showing anything. I'll attach the demo since it is a small zip file in case you want to try it. This demo runs successfully on NT4 with the Microsoft renderer, on an XP laptop with Radeon 7500, and on newer stuff with OpenGL 3.2+ hardware support. (It tries OpenGL 3.2 first, and should fall back to 1.x if necessary)
 

Attachments

  • OGL75.ZIP
    8.4 KB · Views: 1
bakemono: Thankyou for checking out the program, i will try the demo you have sent, i will check what is wrong in the last example, probably just something minor problem.

The gldrawpixels call is supported, but its limited to rgb, rgba, char and float data types. If other data types are being issued, then the function will return without doing anything. Of course i can patch too if give a testcase example about that test too.

(edit: i have patched gldrawpixels blindly, hoping it will work, i dont know when i will release a new version but we will see if it works)
 
Last edited:
Bakemono, i processed your bug reports. I throw everything besides, because the bug was critical.
The result is a hotfix.

2020/11/09 - Hotfix
-Fixed missing BGR, BGRA, and ABGR formats in glDrawPixels
-Circumvented several compiler bugs in the matrix management
-Enabled more compiler optimizations

There was multiple issues with the build (well after all this is just an alpha-test). Actually, the bug was not even in my code, and not even in yours. MINGW32 outputted totally garbled code for matrix transformations - ending up in infs and nans everywhere, garbling the results on the FPU, resulting infinite loops and fpu exceptions to be fired. I have tried to fall back to o2, not helped, then o1, nothing, of course i didnt wanted to totally disable optimizations because that would mean slideshow. Locally disabling the optimizations didnt helped.

So i have founded the critical parts in gltranslatef and glrotatef, and modified these parts of the matrix management code to derail every matrix-related optimizations GCC could do, putting some branches and pointless operations into the code, which killed the optimization paths and resulted in a working code (this will not slow down the rendering whatsoever).

Also i have added the new formats for gldrawpixels but i cant test them, so lets hope it works.
 
Might want to put a warning up not to use this with multiplayer games. Altering opengl.dll will trip many cheat detection softwares resulting in bans.

This happened with a Half-Life mod called SOHL a bit over a decade ago. It used a custom renderer that included a custom opengl.dll, hw.dll and sw.dll which got a bunch of people VAC banned for altered rendering libraries.
 
2020/11/14 - Various bugfix
-Fixed garbled textures when data aligment was 2
-Fixed a crash with List based rendering
-The lighting engine has been simplified, and a few bugs were fixed in it
 
Last edited:
2020/11/16 - Scissor fix
-Strange scissor settings sometimes caused crash
 
This is the last update this year.

2020/12/09 - Big upgrade
-25% speed-up in rendering in some cases
-Fixed coloring issue with some alpha modes
-Fixed a stability problem
-Linux x86 and x86_64 version is released
-ARM v5 version for Linux is released
-ARM v7 version for Linux is released

http://users.atw.hu/darkgl/index.html
 
Back
Top