Detect DX version (and OpenGL version) installed?

BlitzMax Forums/BlitzMax Programming/Detect DX version (and OpenGL version) installed?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Is there a way to detect the DX version installed? Currently if you play my game on a DX6 box, you don't get any error message just a load of crappy white boxes type thing. Probably because I'm using something like this:

If not D3D7Max2DDriver() Then
	'See if OpenGL is available and use that
EndIf

So basically OpenGL is probably being used instead of DX but at some crappy level where it can't render the game (I've seen the OpenGL drive "work" before on pleny of PCs but just display white stuff).

Any ideas how to detect DX version please?

OR maybe there's a way to detect the OpenGL version or something so that the game doesn't try to work in a version which is totally useless for BMax. That would work.

Thanks in advance for any help you may offer.