Local GDriver:TMax2DDriver GDriver = GLMax2DDriver() If GDriver = Null ' If there is no OpenGL Driver available on this system GDriver = D3D7Max2DDriver() ' then get the D3D driver SetGraphicsDriver(GDriver) ' and set it Print Gdriver.Tostring() ' and print it For drivers:Int = 0 To CountGraphicsModes() -1 ' and print available modes GetGraphicsMode( drivers,width,height,depth,hertz ) Print width+" "+height+" "+depth+" "+hertz Next Else ' but if there is an OpenGL Driver SetGraphicsDriver(GDriver) ' set and print modes Print GDriver.Tostring() For drivers:Int = 0 To CountGraphicsModes() -1 GetGraphicsMode( drivers,width,height,depth,hertz ) Print width+" "+height+" "+depth+" "+hertz Next EndIf
or if you want a function that is aligned with the topic:
GraphicsDriversAvail(GL:TMax2DDriver , D3D:TMax2DDriver) Print GL.tostring() Print D3D.Tostring() SetGraphicsDriver GL SetGraphicsDriver D3D Function GraphicsDriversAvail(GLmax2d:TMax2DDriver Var , DXmax2d:TMax2DDriver Var) GLmax2d = GLMax2DDriver() DXmax2d = D3D7Max2DDriver() End Function