no opengl, fallback to directx?

BlitzMax Forums/BlitzMax Beginners Area/no opengl, fallback to directx?

Spot-Nothing(Posted 2005) [#1]
i do have a perhaps a bit an amateur question to blitzmax, but the following question pings around in my head since some weeks while watching the development of blitzmax: if i have a system which only supports directx with a good gfx card but no direct opengl support will there be any fallback to directx then to keep up the graphics performance? is this technically possible? i've made some tests on diverse systems and i observed that on machines with no opengl support of the software drivers the fps drops down to 1 fps while having up to 60 fps on systems with "normal" open gl support. is this a normal symptom?


Dreamora(Posted 2005) [#2]
You could write your own directx drivers ( this is why driver is abstract so you can theoretically use everything ) for the Max2D module then this would be no problem ...

and yes this is normal, as with no opengl support ( and so no usefull drivers ) they have to use very bad software drivers.

if you have a system with no opengl support try to download Mesa3D ... it should perform far better I think.


Spot-Nothing(Posted 2005) [#3]
thanks for the info, i'm just a bit concerned about distributing opengl based games to a audience which has no idea about opengl/ directx so installing drivers etc. is a bit a problem for those "casual gamers" (so they think the game is crap when they have 1fps on their new computer) and i'm just looking around for a perfect deployment process where the installer or the games is checking the system first before displaying anything - this idea doesn't seem to be an easy task.


Dreamora(Posted 2005) [#4]
On Linux and Apple it is no problem as they focus on OpenGL.
Only Windows is a problem as the drivers ( beside the newer generation of Intel Extreme, NVidia and ATI drivers) only are focused on DirectX.


Spot-Nothing(Posted 2005) [#5]
exactly. that's my conclusion, too. as windows is the main os where our products are sold to a good deployment process is a necessity. i'm also unsure if all those mainstream gfx cards and its drivers are going to support opengl. my tests showed that i had to update nearly every computer system before i could launch a bmax program at a reasonable frame rate... looks like distributing the bmax based products need a warning sign that the client has to install the latest drivers first - even if he has directx 9.0c on his windows. any other "technical ideas" about this case?


Dreamora(Posted 2005) [#6]
For systems without support a link to Mesa3D would be an idea ( SiS, S3, intel onboard beside Intel Extreme ) ...

although the mainstream seem to be GF2 MX / GF4 MX. Most common problems there are outdate drivers that are not even fully compatible with DX9c


Spot-Nothing(Posted 2005) [#7]
i'll dig into that mesa3d idea... thanks for pointing me there to. it's true that many mainstream gfx cards don't support even dx9c, but it's just a bit a pity that even simple 2d games do have an extreme low framerate while it would be possible with dx 7+ ten times faster. i was suprised that even a matrox g450 didn't support opengl that's why i was so scared that bmax based products can only be distributed to "high end" home users - not to modern standard office computers which would have enough power with a fallback to directx.


FlameDuck(Posted 2005) [#8]
i'm also unsure if all those mainstream gfx cards and its drivers are going to support opengl.
All mainstream cards do support OpenGL - Even most non-mainstream (like Matrox cards) as well as high-end professional cards (like FireGL, Wildcat and Quadro).

my tests showed that i had to update nearly every computer system before i could launch a bmax program at a reasonable frame rate.
Really? Exactly how old systems are we talking here? BlitzMax ran at an excellent framerate on both the TabletPC (WinXP Tablet Edition), my old desktop PC (GeForce III, Windows 2000) and my new desktop PC (Intel on-board graphics and Radeon X600XT, WinXP Pro) using nothing but whatever drivers shiped either with XP or the graphics cards in question.

it's true that many mainstream gfx cards don't support even dx9c
That depends on how you define the word "support". It's true that few cards take advantage of the entire DX9c feature set, but I don't think there are any cards that flat out refuse to work on dx9c - which is surely the issue here.

i was suprised that even a matrox g450 didn't support opengl
Except it does.


Dreamora(Posted 2005) [#9]
1. Nvidia cards with driver before the 5X Series refuse to work with DX9c or better there are some bugs within ( in 3D modellers you are unable to select a single vertex and other similar things ), that will force you to update.

2. Not all mainstream cards support OpenGL, or better their drivers don't do! SiS, S3 and intels non-extreme chipset are only for office and not for 3d stuff and so don't even have full DX7 support nor do they have OpenGL support.
Other cards like NVidias, ATI and Intel Extreme need more recent drivers ( there are people with NV 4X drivers and similar ... 2 years and older drivers ), as their old drivers were not optimized for OpenGL, so the difference is quite large between old drivers and new drivers.


Spot-Nothing(Posted 2005) [#10]
uh, thanks flameduck for your reply. i have the following test report, perhaps i didn't find the correct driver on matrox.com? i'm really stuck with the matrox card (check the last entry in the test list)... i'd be more than happy if you're right.

+++

win xp, sp2, pentium 4 dual xeon 2.6 ghz, 1gb ram,
directx 9.0c
ati fire gl e1
-> 100 fps, everything works perfect

win xp, sp2, pentium 4, 2 ghz, 512mb ram,
directx 9.0c
nvidia geforce440 go (mobile)
-> 1 fps, extremely slow, but using standard drivers, so new drivers would solve this problem.

win 2k, sp4, amd 1.8 ghz, 256mb ram
directx 7.0
nvidia geforce2 ultra 64mb
-> 100 fps, everything works perfect

winxp, sp2, amd athlon 1.92mhz, 192mb ram,
directx 9.0c
via/s3 unichrome graphics 64mb
-> 25 fps, in my opinion too slow for a 1.92mhz cpu, but it’s a very cheap gfx card which should perhaps have updated drivers

winxp, sp2, pentium 4, 2.5 mhz, 1gb ram
directx 9.0c
matrox g450 dualhead 32mb
-> 1 fps, perhaps having the wrong drivers? using the latest from matrox didn't fix the low fps rate.

+++


Spot-Nothing(Posted 2005) [#11]
hi dreamora, yes... that's what i experienced, too. especially on intel internal gfx chips the difference is enormous when comparing drivers which are about 6 months old.


Dreamora(Posted 2005) [#12]
for your mobile system visit:

http://www.geocities.com/madtoast/

This is a good source for NV mobile drivers. ( had 61.80 working on similar ... Dell Inspiron 8200 with GF4 440go. Dell has no usefull driversupport. 27.8 is no recent although they tell you ;) )
For ATI there is a simple tool that modifies the extracted setup to work with mobile chipsets :)


jhague(Posted 2005) [#13]
All mainstream cards do support OpenGL - Even most non-mainstream (like Matrox cards) as well as high-end professional cards (like FireGL, Wildcat and Quadro).

While this is true, a large percentage of PCs don't come with OpenGL drivers installed. This applies to all those PCs that come with Intel's motherboard graphics chipset, which is what all the low-end Dell's come with. You have to go to Intel's website to get the OpenGL driver, which is definitely something you don't want customers to have to do.

On Linux and Apple it is no problem as they focus on OpenGL.
Only Windows is a problem

Exactly. And Windows is 90+% of the market, unfortunately. I fully support Mark's decision to go with OpenGL, though, because I understand what a pain it would be to support both options. But it would be nice to have alternate versions of the 2D modules that use DirectX. I expect we'll see that as a third party add-on.


Warren(Posted 2005) [#14]
Really? Exactly how old systems are we talking here? BlitzMax ran at an excellent framerate on both the TabletPC (WinXP Tablet Edition), my old desktop PC (GeForce III, Windows 2000) and my new desktop PC (Intel on-board graphics and Radeon X600XT, WinXP Pro) using nothing but whatever drivers shiped either with XP or the graphics cards in question.

I know a guy who sells casual games written in OpenGL and he has a 50% failure rate from Windows based customers. They just don't have proper drivers installed.

His failure rate on Mac is something like 5%.


Dreamora(Posted 2005) [#15]
Only solution would perhaps be this OGL - DX fallback thing mentioned here somewhere which bases on Mesa3D ...

This one could perhaps help ... but I haven't tested it so far ...

A true Direct3D driver for Max2D would be better in any case instead of fallback and crossover "emulation"


Spot-Nothing(Posted 2005) [#16]
failure rate of 50%?... oops, that's what i've feared. we do have the exactly same audience for our products (casual games).


LeisureSuitLurie(Posted 2005) [#17]
I am inclined to agree. I don't particularly care what Max2D uses 'under the hood,' but Mark would go mad supporting two different APIs across 3 platforms, I think.

I'd thought early on he'd said there would be a pure software renderer in BlitzMax.


xlsior(Posted 2005) [#18]
By default, Windows uses a software renderer for OpenGL is the card has no native support.

The problems is that the windows software drivers has incredibly bad performance.


Dreamora(Posted 2005) [#19]
Mark wouldn't go mad supporting 2 APIs

1. It is only needed for Windows where OpenGL can be dropped as it is next to useless for most users due to PC system sellers.

2. It would only be rewriting the Max2D Driver, not the whole module and for an experienced DirectX programmer like Mark this shouldn't be that of a problem, especially as he has the B+ / B3D Sources to fall back for this 2D driver.


FlameDuck(Posted 2005) [#20]
This applies to all those PCs that come with Intel's motherboard graphics chipset, which is what all the low-end Dell's come with.
Not true. My ABit IG-80 motherboard uses an on-board Intel chipset and it runs BlitzMAX applications flawlessly. It runs CircleMania roughly at the same speed as the Radeon X800XT does, (that is capped by the refreshrate).

I know a guy who sells casual games written in OpenGL and he has a 50% failure rate from Windows based customers. They just don't have proper drivers installed.
That's pretty disturbing. Is this driver issue specific to a certain brand of chipsets?

Incidently, if someone doesn't have the right drivers installed, a DirectX fallback wouldn't be of any use either. Unless it was a fall-back to DX3 or something (no 3D hardware acceleration).

And Dreamora - S3 isn't a mainstream manufacturer anymore. It hasn't even been a company the last 10 years or so.


LeisureSuitLurie(Posted 2005) [#21]
By default, Windows uses a software renderer for OpenGL is the card has no native support.


My impression was that meant a software blitter, not defaulting to M$'s 10 year old OpenGL drivers.


Dreamora(Posted 2005) [#22]
S3 is the only reason we can use textures in a usefull way ( S3 TC compression is their algorithm ) so I wouldn't say that they haven't been a company the last 10 years ;)

Driver Issues:

NVidia until 4X series or so. Dell still offers only 27.8 for their systems with mobile nvidia cards of GF4 go generation just to show that not all have up to date drivers.

ATI until Catalyst 4 I think, not sure

Intel until half a year or a year ago when they worked on drivers for Intel Extreme 1 / 2 which is their first real graphics chip ;)


Btw: I tested out this thing mentioned here ... GLDirect ( should be some kind of fallback from OpenGL to DirectX ). The result was pc breaking.
After installing and activating it, opengl didn't even work anymore ( got the bug with createpixmap etc when you try to create an image etc )
had to throw it out again.
( have a system with mobility radeon 9700 and fully working most actual catalyst which it bypassed )

So I can NOT recommend this thing.

so Mesa3D could be the only usable solution ...


FlameDuck(Posted 2005) [#23]
S3 is the only reason we can use textures in a usefull way ( S3 TC compression is their algorithm ) so I wouldn't say that they haven't been a company the last 10 years ;)
I know. It was introduced in the S3 Virge series of chips. The same one that (amoungst other things) powered the graphics card in my Amiga. Ten years ago.

They also made (at least parts of) the FireGL card that used to be in my IBM IntelliStation, roughly 7 years ago, around the time they where acquired by ATi and Via respectively. So okay, maybe it was only in the last 5 years, but still...


jhague(Posted 2005) [#24]
Not true. My ABit IG-80 motherboard uses an on-board Intel chipset and it runs BlitzMAX applications flawlessly. It runs CircleMania roughly at the same speed as the Radeon X800XT does, (that is capped by the refreshrate).

Oh, yes, it will work, but the OpenGL drivers aren't installed by default on many PCs. You can always grab them yourself, or possibly some PC manufacturers install them. This is based on seeing failure reports from a shareware author who required OpenGL drivers.


HappyCat(Posted 2005) [#25]
Oh, yes, it will work, but the OpenGL drivers aren't installed by default on many PCs.


But isn't that the same situation with DX drivers? By which I mean that the default drivers are usually useless.

I have a brand new Dell GX280 at work and I had to update the drivers myself to get Blitz3D working at a decent speed.
And at home I also have one of those Dell laptops that Dreamora talks about above that Dell only supply NVidia 27.something drivers for and I had to go hunting for later hacked drivers myself to run stuff like Call of Duty and Half-Life 2.

So what makes OpenGL support any more difficult or troublesome than DirectX support on these types of PCs?

Edit: Don't get me wrong, OpenGL still puts me off BMax, I just think the scale of the problem may be being exaggerated.


Dreamora(Posted 2005) [#26]
No it isn't the same situation.
On Windows drivers are DirectX drivers by default, while OpenGL is optional. While 3D cards normally support OpenGL straight out of the box with their drivers, office cards won't do it ( SiS, Intel ). Intel has some drivers that solve the problem at least to a given degree ( the chip itself is on the same level as TNT2 / GF1 from its capabilities ), but on side of SiS, you will have bad problems as the driver cracks don't create hacked or modified drivers for fun cards with no 3D capabilities.


Mr. Write Errors Man(Posted 2005) [#27]
OpenGL is a real issue on Windows platform if you are planning to make money with your games. It's a simple fact that isn't worth arguing about. Those that are interested in doing so should first take a peek at the numerous threads about the issue at for example indiegamer.com.

I can see only one real option to overcome the situation. That would be writing a DirectX wrapper for Max. It shouldn't be that much of work, because there already are a great number of high level opensource DirectX wrappers out there. All that is needed is that someone ports SDL, Allegro or whatever to Max.


jhague(Posted 2005) [#28]
Yes, I think once the feature set of the max2d module is worked out and enhanced, there should be a Direct3D version.