Does BlitzMax use DX9 by default?

BlitzMax Forums/BlitzMax Programming/Does BlitzMax use DX9 by default?

Grey Alien(Posted 2011) [#1]
If I make a basic project is it using DX9 or DX7 if I don't specify? Thanks.

Also my framework still uses DX7 with SetGraphicsDriver D3D7Max2DDriver()

Is there any problem with that? Should I detect switch to DX9 if I detect Win Vista or above for example? Seems like DX9 still has some kind of texture memory leak according to the bugs forum. Thx for any advice.

Last edited 2011


Chugs40(Posted 2011) [#2]
I'm pretty sure when writing a basic project in Bmax it's using DX7 unless switched, but I'm still using an older version - haven't updated in awhile.

You may have to switch to DX9, I don't suppose you need an SDK to do that? I've always kinda wondered this myself.

Last edited 2011


therevills(Posted 2011) [#3]
Since v1.35 DirectX9 is the default graphics driver for Windows:

* Added new official D3D9Max2DDriver. This is the new default for Windows.


http://www.blitzbasic.co.nz/Community/posts.php?topic=87819#996218

And a tiny code sample to test with:

SuperStrict

Select GetGraphicsDriver()
	Case D3D9Max2DDriver()
		Print "9"
	Case D3D7Max2DDriver()
		Print "7"
	Case GLMax2DDriver()
		Print "GL"
End Select



Grey Alien(Posted 2011) [#4]
Hey thanks!

*So commercial BlitzMax devs* Did you use DX7 or DX9 for your last game? Any reported problems with either such as slow downs with DX7 being emulated on modern Windows or with DX9's BMax memory leak? Thx.

Last edited 2011


GfK(Posted 2011) [#5]
I used DX9 but was unaware of the memory leak bug at the time. That said, it only manifests itself (to any extent) if you change the screen resolution hundreds and hundreds of times so its not a massive worry.

Wish it was fixed, though. Zeke's solution didn't seem to work well for me, unless I ballsed it up, but the instructions for fixing it were a bit flakey in places.


Grey Alien(Posted 2011) [#6]
Ok thanks GfK. Btw, are you working on another game?


GfK(Posted 2011) [#7]
Yep, but its a secret. :D


Oddball(Posted 2011) [#8]
I've had lots of problems with both the dx7 and dx9 drivers with my games. Things like graphics displaying in the wrong place or not at all and various crashes. That said it has never been one symptomatic problem of the drivers but more problems specific to each persons set up. Usually asking the end user to switch to the gl driver solves the problem, but the gl driver does have the dead/white texture problem on Macs. I think it's hard to get something that works on every setup these days.

Last edited 2011


GfK(Posted 2011) [#9]
Usually asking the end user to switch to the gl driver solves the problem, but the gl driver does have the dead/white texture problem on Macs.
But on Macs, there is no alternative to GL anyway.


Grafos(Posted 2011) [#10]
I used DX9 but was unaware of the memory leak bug at the time. That said, it only manifests itself (to any extent) if you change the screen resolution hundreds and hundreds of times so its not a massive worry.

Wish it was fixed, though. Zeke's solution didn't seem to work well for me, unless I ballsed it up, but the instructions for fixing it were a bit flakey in places.


I used DX9 on my first (well, my only so far) game. Got the memory leak, but Zeke's solution worked fine. No complaints from customers so far.
An official fix on the memory leak would still give me more peace of mind for my future projects. I'm sure there will be one sooner or later.


Grey Alien(Posted 2011) [#11]
Yeah GL is the only Mac Option. How bad is that white texture thing, I scanned the bug thread but couldn't get a clear picture of what was likely to cause it. I've not had it reported for my games.


therevills(Posted 2011) [#12]
I've only been able to reproduce the white texture bug using AntonM code, to me it looks like you get the bug if you load an image into a local variable... Ive had no reports either...


Grey Alien(Posted 2011) [#13]
Good to know thanks therevills.