GFX Driver test

BlitzPlus Forums/BlitzPlus Programming/GFX Driver test

EOF(Posted 2003) [#1]

Just to give the various graphics drivers a good kicking.
Uses Rects, Ovals, Lines, Text, Image

; GFX Driver test for BlitzPlus v1.34

Const screenmode=1 ; 0=auto 1=full 2=win 3=scaled

Dim tm(numdrivers)

For drv=1 To numdrivers
	SetGfxDriver drv
	Graphics 640,480,0,screenmode
	img=CreateImage(96,96) : SetBuffer ImageBuffer(img)
	Color 255,0,0
	For s=1 To 20 Step 5 : Oval s,s,96-s,96-s,0 : Next
	SetBuffer BackBuffer() : Cls
	Text 320,240,GfxDriverName(drv),1,1
	Flip False : Delay 1500
	Gosub RunTest

msg$="Test Results (in millisecs)"+Chr$(10)+Chr$(10)
For drv=1 To numdrivers
	dname$=Left$(GfxDriverName(drv)+"    ",10)+": "
Notify msg$

For d=1 To 10000
	Color Rand(255),Rand(255),Rand(255)
	If d Mod 1000=0 Then drawmode=drawmode+1
	If drawmode=6 Then drawmode=1
	Select drawmode
		Case 1 : Text Rand(640),Rand(480),"Blitz GFX Driver Test"
		Case 2 : Rect Rand(640),Rand(480),Rand(10,40),Rand(10,40),1
		Case 3 : Oval Rand(640),Rand(480),Rand(20,80),Rand(20,80),1
		Case 4 : Line Rand(640),Rand(480),Rand(640),Rand(480)
		Case 5 : DrawImage img,Rand(640),Rand(480)
	End Select
	If d Mod 25=0 Flip False

I get these results (full screen)

Native > 1816 m/secs
OpenGL > 6645 m/secs **
DirectDraw > 851 m/secs

Winner = DirectDraw

** For some reason OpenGL flickers in full screen.
Buffer {Flip} problem?
Also, it appears to ignore Flip False (therefore waiting for the screen to sync). This gives poor results.
If I use Flip True then directdraw is tiny bit slower.

dirkduck(Posted 2003) [#2]
I get roughly:


Eikon(Posted 2003) [#3]
Native: 3384
OpenGL: 665
DDraw: 2025

Not bad for a PII 233 ;)

Hotcakes(Posted 2003) [#4]
Native --> 1929
OpenGL --> 246
DirectX--> 544

Go GL!

EDIT by request ;] : 128MB GeForce3 Ti200

rino(Posted 2003) [#5]
Native : 2218
OpenGL : 1549
DirectX : 747


go directx?

Drago(Posted 2003) [#6]
note: you should say why video card you have, since some (older ones) don't support hardware GL

rino(Posted 2003) [#7]
hehe i think mine doesn't support HW GL.. it's ATI RAGE mobility with 8MB RAM :D
i think my PC is not the only one that's equipped with non-open GL GFX card.. it would be nice to include an opotion for selecting GFX driver or auto-checking and selecting code..

QuietBloke(Posted 2003) [#8]
Native: 894
OpenGL : 245
DirectX : 367

GeForce4 MX440

Russell(Posted 2003) [#9]
Yet another argument for dumping DX ;)


Blue Steel(Posted 2003) [#10]
with the boost OGL gives, it looks like its time to dust off my old B2D NES emulator I started on a year or so back.

Bagels(Posted 2003) [#11]
Rino - also, try installing the OpenGL hardware drivers. I think you can grab them at .

Orca(Posted 2003) [#12]
I get...

Native 1786
OpenGL 3000
DirectX 506

Hotcakes(Posted 2003) [#13]
Wooooowwww, go Radeon! =]

QuietBloke(Posted 2003) [#14]
Native : 14840
OpenGl : 28980
DirectX : 10432

On my little laptop
NeoMagic MagicGraph 128XD.

Zster(Posted 2003) [#15]
Uhm ain't this a bit too simple a test? I'm going to work on something with sprites as native seems way faster than DX in this regard.

Hotcakes(Posted 2003) [#16]
Yeh, agreed. Rectangles are a bit simplistic for a real test. This was a nice quick'n'dirty sorta test, but let's get into something a bit more realistic =D

Drago(Posted 2003) [#17]
I know 100% now that you need to fix your drivers up Poed, since it seems that you havn't installed them properly, since both blitz and my Dll doesn't work properly, since it Uses microsofts Crappy software GL

here is a program that test for that.
if it list microsoft Corp or any thing like that as the vendor, then it uses software.
btw up/down cursor keys move the list up and down.. (eh specis... 9 extensions... ;) )

btw I get
native: 1176
OpenGL: 392
DirectX: 622

Orca(Posted 2003) [#18]
Drago, I installed the drivers that came with the card-- there wasnt really any way for me to install them improperly as the whole thing was automated.

Also like I said before, Jedi Knight II runs fine, and returns a number of gl extensions.

I'd say most likely ati's the culprit, not me =P

cyberseth(Posted 2003) [#19]
If the user needs to install "proper" GL drivers to make the game work up to speed, you ought to include them when you distribute your game.

EOF(Posted 2003) [#20]
Just updated the code to include tests for:

Rects, Ovals, Lines, Text, Image

Steve Fash(Posted 2003) [#21]
Right, I get :-
Native 2469
Open GL 6650
DirectDraw 873

Geforce2 mx400
256mb ram (100mhz)
Athlon 1300


julianbury(Posted 2003) [#22]
I got:-
Native : 1718
OpenGL : 452
DirectDraw : 661

Athlon 1800 - Windows XP - Radeon 9700 - B+ v1.34


Anthony Flack(Posted 2003) [#23]

If the user needs to install "proper" GL drivers to make the game work up to speed, you ought to include them when you distribute your game.

You think that the GL drivers for every card your end user might conceivably have should be included in the download? Most people won't like that much.

cyberseth(Posted 2003) [#24]
Well I was really referring to the "boxed" game, ie on CD. If the game was to be downloaded, then a link ought to be provided, rather than included in the download.

RocketGnome(Posted 2003) [#25]
No commercial boxed game does this. I think Quake3 provided an early version of GL Setup... but unless they've seriously updated that (last I checked, it was current as of Sept or Oct 2001, and didn't support Win2000.. WinXP wasn't even in existance yet), it's a relatively pointless program.

Even providing a link or links to drivers is unreasonable and unrealistic because of the number of manufacturers out there.

To quote themselves..

Each OpenGL accelerator manufacturer writes their own OpenGL drivers. So if you need a new or updated driver, go to the manufacturer's web site for your OpenGL accelerator board and download and install their latest OpenGL driver.

If the writers of the API themselves won't go through the trouble...

In short, driver support is way beyond the scope that any developer should have to provide for their software. If you decide to take on that responsibility, you'll get nothing else done.

Russell(Posted 2003) [#26]
For maximum speed, maybe a test such as this (although more comprehensive) should be performed at the beginning to see which is better on the host computer, since it seems that none of the modes wins all the time.

This is a nice flexibility to have in a language (the ability to switch drivers). Good work, Mark!


cyberseth(Posted 2003) [#27]
I recently downloaded new nVidia drivers, and now OpenGL doesn't work in Blitz Basic at all!!! :(