Is OS X bad at Opengl?

Discussion in 'Mac and PC Games' started by mark28, Aug 9, 2010.

  1. mark28 macrumors 68000

    Joined:
    Jan 29, 2010
    #1
  2. Xavier macrumors 68020

    Joined:
    Mar 23, 2006
    Location:
    Columbus
    #2
    OpenGL is an open source standard. It is not restricted or limited to Mac OS X.

    And everyone knows that Apple has not taken a lot of time to fine tune graphics drivers to provide better gaming performance.
     
  3. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #3
    Mac OS X isn't the fastest at adopting new OpenGL versions. Nor is Apple particularly quick to adopt new GPUs, or improve their drivers for existing GPUs. These 3 factors hold 3D performance back, which is used in many games. However, 2D performance isn't affected as much, because OpenGL isn't a factor.
     
  4. Libertine Lush macrumors 6502a

    Joined:
    Nov 23, 2009
    #4
    Out of curiosity, what's the name of the thing or things --I'm so tech-savvy--that powers 2D performance? Does OpenGL also contribute to it to some small extent?
     
  5. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #5
    OpenGL only contributes to 2D performance when it is invoked via a compositing engine, such as Quartz. (Side note: There was, at one time, a set of technologies called Quartz 2D Extreme, but no mention of them has been made since their initial appearance in Quartz Debug, part of Xcode.) The biggest factor in 2D performance for a GPU is the speed of its RAMDAC, though - this chip does, among other things, convert digital signals to analog for CRTs to use.
     
  6. Libertine Lush macrumors 6502a

    Joined:
    Nov 23, 2009
  7. ezekielrage_99 macrumors 68040

    ezekielrage_99

    Joined:
    Oct 12, 2005
    #7
    It's a mixture of factors why Mac OSX OpenGL is pretty poor, but this has nothing to do with OpenGL on a Mac (I know this sounds like a contradiction though).

    It's a mix of using older graphics chipsets, Ati (seriously, ATi maybe be "faster" but the performance/driver support is always poor compared to nVidia especially on UNIX systems), not tuning drivers for the application and most game being "ported" from DirectX environments.

    Really it has nothing to do with Mac hardware/software being good or bad it's just older chipsets and untuned drivers, OpenGL is open source and there's no reason why the performance can't be better imo.
     
  8. edddeduck macrumors 68020

    edddeduck

    Joined:
    Mar 26, 2004
    #8
    OpenGL is used quite a lot in drawing the 2D images on your Mac's screen. To start with let me explain how things get drawn (I might skip features that are not relevant to how things are drawn like event handling).

    Quartz Compositor (aka "WindowServer" in Activity Viewer) - This is the overall controller of what gets drawn on the screen, every renderer system sends it's information to Quartz Compositor and then Quartz Compositor draws the final image onto the screen. No matter what renderer you use you cannot bypass Quartz Compositor. Quartz Compositor works with bitmap files only (the most basic of image formats).

    To draw images you can use a number of different renderers depending on what you are doing. The main ones are Quartz 2D, OpenGL, Core Image & QuickTime.

    The process works like this, all of the renderers draw one single frame save it as a bitmap and send it to Quartz Compositor. Quartz Compositor will take all these frames and build up these individual images into the final image you see on your screen.

    For example lets say you have a Quicktime video playing and have finder open with two windows open and no files on your desktop.

    1. Finder will render the two folders as two images and send them to the compositor (Quartz 2D Renderer)
    2. Your desktop background will also be sent as an image to the compositor (Quartz 2D Renderer)
    3. QuickTime will render the current frame of the video and also send that to the compositor as an image. (QuickTime Renderer)
    4. Quartz Composter will take all these images and combine them into one image which is what your desktop looks like and send this to the card which in turn makes it appear on your screen.

    The individual renders have the following hardware accelerated statuses.

    Quartz2D - software only.
    OpenGL - hardware accelerated on graphics card
    Core Image* - hardware accelerated on certain graphics cards
    QuickTime* - hardware acceleration on certain cards when using certain codecs

    Quartz2D has a new technology called Quartz 2D Extreme which was designed to hardware accelerate the rendering but it is currently not available in anything bug debug mode as it has side effects.

    As you can see the rendering of a single window is still not hardware accelerated at the current time and is done using the CPU.

    Once all these images are collated Quartz Compositor creates one overall image for your monitor to display, Quartz Compositor DOES use OpenGL** very heavily when combining these images, this allows you to have a very fast response to moving windows around and other similar tasks by not having to use the CPU at all and running everything on the GPU using OpenGL instead.

    How it works is instead of combining all the images on the computer and sending one image to the graphics card it sends all the different parts of the image and gets the card to combine them using OpenGL then drawing the result to your monitor. As OpenGL and graphics cards are optimised to do things like this it is a lot faster than doing it all manually every frame on your CPU.

    To summarise drawing of individual finder windows etc does not use OpenGL and is not hardware accelerated at this time, but the combining of all the windows to draw what you finally see on the screen is hardware accelerated using OpenGL.

    Hope that all makes sense :)

    Edwin

    *Might use small bits of OpenGL but I have not checked either way
    ** Before 10.2 Quartz Compositor was not hardware accelerated using OpenGL and as a result the windowing system was very noticeably slower.
     
  9. rasmasyean macrumors 6502a

    Joined:
    Jul 11, 2008
    #9
    That statement can be argued on in. One factor that drives innovation in most technologies is capitalism. Hence since "open source" has traditionally lacked many avenues to profit from, it often lags close source. Hence the reason why linux finds such a small niche market.
     
  10. Huntn macrumors G5

    Huntn

    Joined:
    May 5, 2008
    Location:
    The Misty Mountains
    #10
    Very informative. Edwin, thanks! :)
     
  11. ezekielrage_99 macrumors 68040

    ezekielrage_99

    Joined:
    Oct 12, 2005
    #11
    I understand what you mean, it's really dependent on the overall use and if it is profitable.

    For games it's simple, DirectX has OpenGL beat... More money into it thus generally better results.

    On the other hand if you look at commercial application then OpenGL is a much better option IMO with far better results. If you look at GeoQuad/Geospatial rendering it's all OpenGL, quality and speed is far better while the overall support kills DirectX there simply is no comparison here.
     
  12. Objectivist-C macrumors 6502

    Joined:
    Jul 1, 2006
    #12
    It's worth pointing out that 10.6.3 killed OpenGL performance, and that there's a graphics update being seeded to developers at the moment.
     
  13. reberto macrumors 65816

    reberto

    Joined:
    Jul 20, 2005
    #13
    OS X is great with OGL (hell it's probably the best with it), but the horrible drivers Apple makes for graphics card make it a unenjoyable experience.
     
  14. Libertine Lush macrumors 6502a

    Joined:
    Nov 23, 2009
    #14
    What a wonderful read. Thank you for taking the time to explain it to us, edddeduck.

    I noticed your signature, that you work for Feral. So I clicked on it and happily found that there's apparently a Mini Ninjas demo out for Mac now! I only had a change to try the demo out in crippled form on a Windows laptop with only an integrated graphics card. The frame rate got in the way of playability, but I could tell it's an exceptional game. So I'm excited now to try it on my MPB. Here's a link to the Mini Ninjas demo, and other Feral demos: http://downloads.feralinteractive.com/?language=english Highly recommend you all try it!

    EDIT: Will Mini Ninjas eventually make its way to Steam? The Windows version is already there.

    10.6.4 was the one that killed it. Hopefully these newly seeded graphics stuff pertain to improved performance, as I recall the MacRumors article couldn't say for certain if it was merely stability issues or performance. I believe it also addresses a waking from sleep issue; I hope so, as my MBP keeps waking from sleep and AppleCare keeps saying that's normal behavior.
     
  15. edddeduck macrumors 68020

    edddeduck

    Joined:
    Mar 26, 2004
    #15
    No problem! If it helps everyone understand a little more about how everything works it was worth the time :)

    We are very keen to work with Valve. Unfortunately, Steam's business model makes it difficult for us to participate at this time.
    As soon as we have a game which will work with the business model we will be delighted to have it delivered by Steam. Feral will be making it's games available for digital download from it's own store and through a range of 3rd party partners during 2010.

    That's all I can say publicly right now but as soon as we have more news we will let everyone know.

    What one update gives you another can take away ;) The problem often is one program might be optimised to get the best performance one way and another program runs slowly due to an issue with the driver in the same area. By fixing the second problem you can often have an unexpected performance hit in another area. We had issues with I think the 10.6.2 beta and BioShock where the performance dropped and the game got a stutter, however that same change made another application faster so I don't envy ATI and NVIDIA as it is a tricky thing to master improving performance without effecting other applications.


    It is such a well reported rumour that it has become accepted as truth in forums but it's not actually true. :) ATI and NVIDIA write their own drivers for their cards and then Apple bundle them with the OS releases, they also work with Apple Mac Developers like us to make sure the drivers that make it into OS updates have as much testing as possible.

    Working in games I can say every OS update and every new version of the OS has usually brought more performance and better support for high end graphics (although a few side effects can sneak in from time to time). If you look back a few years and look at how fast and how far we have come since OS9 OGL support it should give everyone hope for the future.

    One follow up note to this is new features cannot often be used straight away in an application because you cannot release an application which only runs on the latest version of the OS as it would restrict the number of people who could use it. This and the development time in implementing new features means you get a lag between new features being included in the OS and applications taking advantage of them.

    As I said before what kills one program speeds another up. Yes I have also heard about this graphics update reported by Mac Rumors ;)

    Edwin
     
  16. rasmasyean macrumors 6502a

    Joined:
    Jul 11, 2008
    #16
    I think that the gist of what happened was that OpenGL was first and applied to commercial apps (where many were of Unix origins). Therefore that legacy made that standard stick to the industries that use it, even though nearly everyone of them has a Windows equivalent product nowadays. DirectX made it easier and more "quick" for non-hardcore engineering types to implement in the commercial sector. Game devs, whose "product line" lasts in the order of months rather than years found DirectX more advantageous (and since their primary...often only...market is in the Windows sector).

    The question is, going forward as many of these "design apps" settle into the Windows sector more, will they and DirectX adapt to eachother to make it dominant like it is for games. Since clearly, DirectX has shown that it does actually perform better on most levels. And of course, M$ will throw lots of $ into where there's $ to be made.
     
  17. Libertine Lush macrumors 6502a

    Joined:
    Nov 23, 2009
    #17
    That's great to hear!

    Indeed when so many people complain about the graphics drivers in Macs, the frustration is articulated in a way that seems too simple or lacking in nuance: that Apple was being sloppy yet again or just doesn't care. Though when I see benchmarks comparing Windows vs. OSX vs Ubuntu OpenGL performance or the very real performance difference of games in OSX vs the BootCamp partition, I can also understand why so many people, myself included, believe in all these criticisms voiced online. But I also held out the possibility that it's not quite so straightforward, that OS updates are about balance and progression, much as you just explained. It's great to hear from someone with credibility that Apple isn't handling graphics as poorly as many of us believe. Not that I'm ready to praise them.

    You've disabused me of yet another online "fact" I've often read about Apple. You should post more often. You're awfully educational.
     
  18. rbarris macrumors 6502

    Joined:
    Oct 28, 2003
    Location:
    Irvine CA
    #18
    I can't wait to see what people have to say about the next update.
     
  19. rasmasyean macrumors 6502a

    Joined:
    Jul 11, 2008
    #19
    In reality, "interoperability" does not always work so great. OpenGL is meant to be everywhere. DirectX is meant to be on Windows...with the Windows ppl working on it...in their very own environment! Think of how crappy Java turned out to be. They try to be versatile for all and be optimized for none. THAT including M$$ helps make the DirectX technology "better" as long as you're in Windows. Now if Apple makes their own OSXGL, then that's another story. Although since there's not as much of a market for it from Apple users...they'd best spend their efforts in the iPod sector. In reality, ppl who care enough to be in this type of topic are maybe like 1% of the Mac users...which total like 5% of the computer users to top that off. So you're talking about such a small sub industry that many Execs will find it not worth it to bother with it that much.

    I hate to be a doom and gloom spreader, but the reality of it is in the $. Unless Macs get adopted like crazy in the next few years (which will lead to more Mac gamers), and gamers find Macs suitable for games, you will see OpenGL lag DirectX for a long time. One huge force (that also involves $ from the consumer sector) is that specing a dream machine to play games is like half the price of a barely-specable Mac. And since much of these gamers who care that much about this crap are young and poor, it doesn't help.
     

Share This Page