On Windows - Why Use OpenGL?

BlitzMax Forums/BlitzMax Programming/On Windows - Why Use OpenGL?

MGE(Posted 2008) [#1]
Is it even relevant to use OpenGL when running on the Windows platform? If so...why? Thanks.


plash(Posted 2008) [#2]
Sure, if your writing cross-platform code there isn't a need to change support to DirectX for windows.


Sledge(Posted 2008) [#3]
People get a bit paranoid about DX7 support breaking in future iterations of DirectX so you might hear the view that OpenGL is the 'safer' option.


MGE(Posted 2008) [#4]
hmm... I'd be more concerned about OpenGL breaking than DX7. Perhaps I'm wrong, but it seems OpenGL is anything but stable on Vista?


Space_guy(Posted 2008) [#5]
In my game I got some 40fps extra when i added opengl support.
However I use alot of textured polygons and less of the regular blitz image drawing commands. That might make thge difference bigger for me.


ziggy(Posted 2008) [#6]
OpenGL is usually faster on BlitzMax and it is nativelly supported on Vista. There are some issues with some very common intel cards running OpenGL applications, but a recent driver update from intel solved the issues.


Mahan(Posted 2008) [#7]
Vista has had general problems with lots of drivers since release, but most work great now. This also happened with previous versions of Windows like XP and W2k etc when they where released. It's unlikely that MS will drop support for OpenGL though because of the huge amount of games that use it on windows.

I imagine MS themselves would love if noone used OpenGL and that all gamedevs wrote DirectX games that only worked on Windows, for obvious business reasons. (If they cannot compete with quality and TCO they might attempt to "lock out" the competition)

Note however that some game-houses, most notably Blizzard (Diablo/(World of) Warcraft/starcraft) has written huge titles with OpenGL support enabling themselves to sell their games for Windows, (Linux) and Mac OS.

note: World of Warcraft is known to run under linux (I have done this myself under Ubuntu) eventhough blizzard does not support that plattform officially.

Other notable developers like John Carmack of ID Software (Doom/Quake) have (at least in the past) expressed thier preference for OpenGL.

Maybe I should try some rethorics ;) : On windows - why use DirectX when there is an alternative that works on multiple platforms?


MGE(Posted 2008) [#8]
Thanks for the info! I found this as well:
http://www.opengl.org/pipeline/article/vol003_9/

But still...every store Laption Vista computer I've tested some Blitzmax demos on run them very slow and choppy compared to DirectX. But like others have said, probably driver related.


GfK(Posted 2008) [#9]
People get a bit paranoid about DX7 support breaking in future iterations of DirectX so you might hear the view that OpenGL is the 'safer' option.
I don't see how its 'safer' when OpenGL is already wobbly on many hardware configurations.


*(Posted 2008) [#10]
tbh its easier to use DX on windows as the support frame is there most of the time. IIRC there is a way of getting max to choose the best renderer for the OS in code.


Mahan(Posted 2008) [#11]
I don't see how its 'safer' when OpenGL is already wobbly on many hardware configurations.


In my experience (using ~10 different computers regularly) I think OpenGL works very well on all Nvidia and ATI setups. Intel chipsets (as mentioned) have been a bit wobbly but it's been driver issues several of which have been corrected.

But thats just my experience from my computer park back home and not representative for PC computing at whole ;)


GfK(Posted 2008) [#12]
In my experience (using ~10 different computers regularly) I think OpenGL works very well on all Nvidia and ATI setups.
Apparently ATI drivers are 'fixed' at the moment. You obviously weren't around when we had to put up with Catalyst 7.2.

Intel GMA drivers are also much better than they used to be. Even so I'd still like to see know how GL stuff runs on "off the shelf" PCs with two year old drivers since that's what a lot of potential customers are going to be using.


Mahan(Posted 2008) [#13]
I partly agree with you, but on the other hand new directx games that rely heavily on the latest video features often also recommend the users to upgrade their drivers during installation.
And on their respective support forums the first sticky usually is: "How to update you drivers ..." so the issues are not entirely OpenGL related eighter.


GfK(Posted 2008) [#14]
but on the other hand new directx games that rely heavily on the latest video features often also recommend the users to upgrade their drivers during installation.
Yep but we're talking about Blitzmax games which don't require state-of-the-art graphics cards. The kind of people that buy their games from the likes of Reflexive or BFG wouldn't know a graphics card driver if it bit them on the arse.


Muttley(Posted 2008) [#15]
On my main development machine OpenGL in a window is faster than DirectX in a window. With fullscreen they're about the same.

TBH, though. It's really irrelevant. Both work equally well in my experience and you can support both very easily.


*(Posted 2008) [#16]
maybe now is the time for M$ to build in 'download and install latest drivers for muppets' option to thier installer system ;)


GfK(Posted 2008) [#17]
Yeah, graphics card drivers should be available via Windows Update, imho.


Who was John Galt?(Posted 2008) [#18]
Il2 Sturmovic can only run in its top graphics mode using OGL, as apparently there are a more comprehensive set of tests that an openGL implementation has to meet than the D3D equivalent, giving a more consistent graphical reproduction between machines.


ImaginaryHuman(Posted 2008) [#19]
This sounds like an overall pretty positive thread in favor of OpenGL at the moment. There are always going to be some issues no matter which API you go with, DX or GL. There will always be some driver issues, always some customer's who can't get their latest driver, always people with corrupt drivers, always people with low-end graphics cards or lack thereof, always people whose DX runs faster or slower than GL, etc. This isn't likely to change much in the coming years.

Many BlitzMax games that I've seen for Windows will often offer a DX or OpenGL option, but usually only if they're using Max2D, since otherwise someone would have had to write a DX and GL based 3D api. Who knows maybe Max3D will be a capable solution.

For cross-platform development your ONLY choice is OpenGL. It's very well supported on the Mac and pretty good on Linux (although as usual on Linux it's a bit of a fiddle installing it). On Windows so far most GL games run pretty much as good as or better than in DX modes, for me anyway on a low-mid-range ATI card. On some ATI tech demos Windows DX drivers were a bit faster than Mac GL drivers running the same demo, but hey.

GL is also supported industry wide beyond just games, has a lot of good books and documentation and tutorials. I don't think you can go much wrong with it unless your market is a narrow focus that particularly hilites the areas where GL is not too happy, like those Intel cards etc.


Canardian(Posted 2008) [#20]
There's so little difference between OpenGL and DirectX, so why use DirectX then, when OpenGL works on all platforms?

It's like you have learned to write, but you can write only in english, although you speak many languages.


Gabriel(Posted 2008) [#21]
It's like you have learned to write, but you can write only in english, although you speak many languages.

No, it's nothing like that. A better analogy would be that you speak many languages but you only use English when you're in England. Which is a pretty good idea when consider that most English don't speak anything else. Similarly, using DirectX on Windows is a good idea because Windows drivers don't speak OpenGL very well. It doesn't - as your analogy incorrectly suggests - have any limitation as regards working on other platforms. That's what the platform-specific compiler switches are for.

Of course, if you're using some bleeding-edge 3D engine which doesn't work anything other than Nvidia and ATI, and even then only if the drivers are right, then I guess it won't matter.

Horses for courses.


ImaginaryHuman(Posted 2008) [#22]
There are so many different opinions about whether GL is well supported on Windows or not, some people are quite sure that it's not a problem and others are quite sure that you want to avoid it at all costs. There is no objective fact here if we can't agree what's true.


smilertoo(Posted 2008) [#23]
MS chose to break opengl on vista for the sake of pointless features like glass effect windows.


xlsior(Posted 2008) [#24]
My old laptop gives me ~60 FPS in DX, and 0.5 FPS in OpenGL...


JoshK(Posted 2008) [#25]
OpenGL runs on Windows XP and Windows Vista. Microsoft's own graphics API doesn't. :\


MGE(Posted 2008) [#26]
I think for a casual game it should default to the DX driver and then optinally allow the use to switch to OpenGL. Especially on Vista.


ziggy(Posted 2008) [#27]
MS chose to break opengl on vista for the sake of pointless features like glass effect windows.
That's not true. This was a rumour before Vista was released, but it is not true. Vista supports GL on fullscreen without any emulation. DX7 software is emulated and translated to a subset of the DX10 API. That makes DX7 slower in Vista than in XP, while OpenGL runs more or less at the same speed on both platforms.


smilertoo(Posted 2008) [#28]
It is true, every time i run Wolfenstein:ET vista complains that it cant do it in the current display settings and lowers the desktop settings. How the hell can an old dx7 game struggle on a quad core pc with a GTX260.