How To Tell Which Graphics Driver Is Running?

BlitzMax Forums/BlitzMax Beginners Area/How To Tell Which Graphics Driver Is Running?

MGE(Posted 2008) [#1]
How would I code sumpin like...
If DXDriver
 ' render directx
else
 ' render open gl
endif

Thanks.


ImaginaryHuman(Posted 2008) [#2]
I think someone asked this once and it was something to do with calling GLGraphicsDriver() or similar and seeing what value it returns to see if it was sucessful, and if false or null then you know it's not supported?


MGE(Posted 2008) [#3]
Thanks. But I'm not trying to see if it's supported, I'm trying to tell which is the active driver so I can render specific code depending on driver. I could set a global var, but I wanted to write self containing code that could reply on some system var.


Yan(Posted 2008) [#4]
If TD3D7Max2DDriver(_max2dDriver)
	Print "DX"
Else
	Print "GL"
EndIf

...or...

If _max2dDriver.ToString() = "DirectX7"
	Print "DX"
Else
	Print "GL"
EndIf



MGE(Posted 2008) [#5]
Thanks Yan! :)