What's new?
There is a new executable called cmdgfx_gdi.exe. It appears to work just like the regular cmdgfx.exe but is much bigger, ~190k instead of ~75k. This is because the 10 cmd bitmap fonts are embedded inside it, and all "text" drawing is in fact bitmaps. As discussed in the thread before, this increases speed (though not in all cases).
Usage: cmdgfx_gdi [operations] [flags] [fgpalette] [bgpalette]
The main thing about cmdgfx_gdi is you should specify which font you want to use. The program does not care which font you are *actually* using at the moment. You do this with the f flag, as in fn[:x,y,w,h;], where n is the font 0-9, and x,y are where to place the resulting bitmap, and w,h are how big it should be (in characters). Default values are n=6, x=0, y=0, w=current number of columns, h=current number of rows.
There is one more thing that is different: you can optionally specify the colors used for foreground and background, i.e. the RGB values of the index 0-15. They should be specified like "RRGGBB," repeated.
The new gfxtest7.bat shows the use of palette and switching font, and shows a nicely gradiented goraud shaded polygon.
So what about speed?
It's a bit confusing. On the one hand it really improves it in some cases, and in some it's worse. The following bats now use the gdi version by default, because it increases speed, more or less:
3dworld2 (~100%)
bob-flag (~2-300%)
interference (~1-200%)
pixeltest1/2
linetest
gfxtest3
dot-flag
pixel-tunnel (not much)
In these cases, you can press 'r' while running to switch between running cmdgfx.exe and cmdgfx_gdi.exe to see the difference
Generally speaking, the more color changes and the smaller the font, the more speed should increase. However I fail to understand why e.g. interference.bat is so much faster with the gdi version, since it uses just one color?!
(Edit: on second thought it does make sense. The XOR'ing in intereference.bat makes the foreground color switch between 0 and 1 over and over)
The linking of gdi with the exe causes a longer overhead time for simply starting the program, which is one of the reasons it's not always faster. Also, if there are mostly big blocks of the same color, it may also be slower.
Blablabla...
