OpenCL and OpenGL take on DirectX

Posted:
in macOS edited January 2014
The broad industry support Apple is building around OpenCL will help increase the critical mass behind OpenGL, the 2D and 3D graphics language Apple uses extensively in Mac OS X.



Since the mid 90s, Microsoft has worked to prevent the adoption of OpenGL as an interoperable industry standard in favor of its own proprietary DirectX portfolio of graphics software and gaming tools.



DirectX at Microsoft



Microsoft's DirectX strategy was originally intended to push DOS game developers to Windows; it has since served to tie PC gaming to Windows, as DirectX is only available on Windows. Successive versions of DirectX have also been used to push developers to the latest version of Windows; for example, the latest version 10 was intended to result in a crop of Vista-only games that would boost Vista sales. However, this did not work out as intended, as the slow uptake of Vista prevented any real market for DirectX 10 games from developing, leaving PC games to target Windows XP instead.



OpenGL and Apple



The basis for OpenGL originated at high end graphics workstation vendor SGI in the 80s and became an open standard during the early 90s; Microsoft released its competing Direct3D as part of Windows 95's DirectX tools. Despite a period of codevelopment between SGI and Microsoft under the name Fahrenheit in the late 90s, efforts to merge the two never successfully materialized. Instead, Microsoft's dominance over PC computing allowed it to develop its proprietary DirectX and push its adoption with GPU makers, leaving the open source community around OpenGL without the support it needed to keep up as a viable option.



OpenGL nearly faded into obscurity until Apple dropped its own QuickDraw 3D architecture and adopted OpenGL as the official 3D library for Mac OS X in the late 90s. The company's consumer platform helped create a wider audience for OpenGL applications. Interest in open source computing since then has also helped, as OpenGL is used by Linux and, more recently, by all of the major game consoles, including Sony's PSP and PS3 and Nintendo's Wii.



The console exception is of course Microsoft's Xbox, which was named after the DirectX graphics libraries it was designed promote in an effort to stop a broad migration to OpenGL in gaming and a subsequent erosion of Microsoft's software monopoly.



OpenGL is now more competitive with DirectX than ever. Microsoft's stumble with Vista and its DirectX/Direct3D version 10 has also helped to stall its momentum in the market. Microsoft plans to add OpenCL-like support for GPGPU computing into DirectX 11 in Windows 7, but Apple's OpenCL, which is designed to work closely with OpenGL code, will arrive first and with broad industry support. Apple has also released OpenCL as a royalty-free, open standard anyone can implement on any platform.



The design similarities between OpenGL and OpenCL make it easy for developers to create code that, for example, calculates the data for a visualization in OpenCL and then uses the same objects to render graphics in OpenGL. Alternatively, graphics rendered in OpenGL can be processed and transformed using tasks built in OpenCL. The adoption and familiarity of each will support the other.



Support for open standards at GPU makers NVIDIA and AMD, as well as platform support from Apple, Sony, Nintendo, and for Linux and Windows appears ready to release direct graphics support and development from Microsoft's Windows-only grasp and give developers from any company the ability to contribute toward driving ahead the state of the art in graphics.
«134

Comments

  • Reply 1 of 73
    taurontauron Posts: 911member
    Quote:
    Originally Posted by AppleInsider View Post


    The broad industry support Apple is building around OpenCL will help increase the critical mass behind OpenGL, the 2D and 3D graphics language Apple uses extensively in Mac OS X.



    Since the mid 90s, Microsoft has worked to prevent the adoption of OpenGL as an interoperable industry standard in favor of its own proprietary DirectX portfolio of graphics software and gaming tools.



    DirectX at Microsoft



    Microsoft's DirectX strategy was originally intended to push DOS game developers to Windows; it has since served to tie PC gaming to Windows, as DirectX is only available on Windows. Successive versions of DirectX have also been used to push developers to the latest version of Windows; for example, the latest version 10 was intended to result in a crop of Vista-only games that would boost Vista sales. However, this did not work out as intended, as the slow uptake of Vista prevented any real market for DirectX 10 games from developing, leaving PC games to target Windows XP instead.



    OpenGL and Apple



    The basis for OpenGL originated at high end graphics workstation vendor SGI in the 80s and became an open standard during the early 90s; Microsoft released its competing Direct3D as part of Windows 95's DirectX tools. Despite a period of codevelopment between SGI and Microsoft under the name Fahrenheit in the late 90s, efforts to merge the two never successfully materialized. Instead, Microsoft's dominance over PC computing allowed it to develop its proprietary DirectX and push its adoption with GPU makers, leaving the open source community around OpenGL without the support it needed to keep up as a viable option.



    OpenGL nearly faded into obscurity until Apple dropped its own QuickDraw 3D architecture and adopted OpenGL as the official 3D library for Mac OS X in the late 90s. The company's consumer platform helped create a wider audience for OpenGL applications. Interest in open source computing since then has also helped, as OpenGL is used by Linux and, more recently, by all of the major game consoles, including Sony's PSP and PS3 and Nintendo's Wii.



    The console exception is of course Microsoft's Xbox, which was named after the DirectX graphics libraries it was designed promote in an effort to stop a broad migration to OpenGL in gaming and a subsequent erosion of Microsoft's software monopoly.



    OpenGL is now more competitive with DirectX than ever. Microsoft's stumble with Vista and its DirectX/Direct3D version 10 has also helped to stall its momentum in the market. Microsoft plans to add OpenCL-like support for GPGPU computing into DirectX 11 in Windows 7, but Apple's OpenCL, which is designed to work closely with OpenGL code, will arrive first and with broad industry support. Apple has also released OpenCL as a royalty-free, open standard anyone can implement on any platform.



    The design similarities between OpenGL and OpenCL make it easy for developers to create code that, for example, calculates the data for a visualization in OpenCL and then uses the same objects to render graphics in OpenGL. Alternatively, graphics rendered in OpenGL can be processed and transformed using tasks built in OpenCL. The adoption and familiarity of each will support the other.



    Support for open standards at GPU makers NVIDIA and AMD, as well as platform support from Apple, Sony, Nintendo, and for Linux and Windows appears ready to release direct graphics support and development from Microsoft's Windows-only grasp and give developers from any company the ability to contribute toward driving ahead the state of the art in graphics.



    Another halfass tactic and halfass effort by the master of halfassed software, microshit.
  • Reply 2 of 73
    ajmasajmas Posts: 559member
    As cross-platform solutions for gaming we have include OpenGL, OpenAL and now OpenCL. I have spoken to a number of Direct-X developers to find out why they use it in favour to OpenGL. The answer generally comes down to good support by the IDE they use (Visual Studio), and then in certain cases because it makes certain things easier. I have no progamming expereince with Direct-X, so I can't give my own opinion.



    Chances are developers who made the games Direct-X centric probably never hand any plans beyond MS-Windows. Using OpenGL would probably have allowed them to change their minds later on, but that obviously was never their game plan.
  • Reply 3 of 73
    DirectX has long been one of Microsoft's crown jewels. By dragging their feet on OpenGL support in Windows - for a long time "OpenGL" was synonymous with "broken or laggy at best" for gamers - MS won a significant position of leverage for itself in graphics. Simply put: the nascent 3D accelerator market of 3DFX, Matrox, ATI and Nvidia formed in DirectX's image. Why? The usual Windows parlay trick courtesy of Microsoft.



    If you wanted to sell hardware, you had to support DirectX. If you wanted to win rave reviews, you had to optimize for it like hell.



    Apple were wise to pick OpenGL. Apple needed hardware acceleration for Quartz and essentially there was no alternative by then. Console makers also helped OpenGL's relevance by using it when they went 3D in the late 90's. Microsoft responded with the Xbox for obvious competitive reasons as the artlcle describes.



    But the GPU industry is still DirectX at its core. Look at the ads or reviews of any card and see how much is made of which DirectX technologies are supported, and how fast. This is what lies at the heart of the game industry's continuing disregard for the Mac (Steam anyone?) and the horrible lateness of Mac compatible drivers.



    If OpenCL and OpenGL do unite and take on DirectX's position of age old dominance, this will be very interesting indeed.



    I'm not even a gamers anymore, but I know that the consequences of this could be vast.





    (Typed on iPod. Excuse the typos.)
  • Reply 4 of 73
    I don't see how this really affects anything. Yes, uptake of DX10 has been slower, but that doesn't mean people are going to run out and make it for a completely new platform. Instead they're just sticking with DX9/DX10 co development. Being first on the market won't really matter either.



    I also feel it is slightly dubious to think Apple will do much in a gaming movement, considering their previous track record.
  • Reply 5 of 73
    It doesn't help that The Chronos Group failed to materialize its promise of OpenGL 3.0 matching DirectX 10's 3D capabilities.
  • Reply 6 of 73
    Quote:
    Originally Posted by StuBeck View Post


    I don't see how this really affects anything. Yes, uptake of DX10 has been slower, but that doesn't mean people are going to run out and make it for a completely new platform. Instead they're just sticking with DX9/DX10 co development. Being first on the market won't really matter either.



    I also feel it is slightly dubious to think Apple will do much in a gaming movement, considering their previous track record.



    I too was skeptical until I started hearing and seeing Apple tout the iPod/iPhone as a great gaming platform. If Apple releases an updated Mac mini with some decent dedicated graphics at an affordable price, the Mac gaming market could explode.



    The MacBook is Apple's best selling computer and until the recent update it could not support high-end games. The new MacBook however is an excellent gaming notebook on par with PC notebooks. The only thing lagging is the games and drivers, and that is solely due to the fact that they haven't reached critical mass yet.
  • Reply 7 of 73
    Quote:
    Originally Posted by Tauron View Post


    Another halfass tactic and halfass effort by the master of halfassed software, microshit.



    Was it worth including the entire article in quotes so you could make this one remark? You're only supposed to quote stuff if you are referencing it in your remarks, dude.
  • Reply 8 of 73
    Quote:
    Originally Posted by Johnny Mozzarella View Post


    I too was skeptical until I started hearing and seeing Apple tout the iPod/iPhone as a great gaming platform. If Apple releases an updated Mac mini with some decent dedicated graphics at an affordable price, the Mac gaming market could explode.



    The MacBook is Apple's best selling computer and until the recent update it could not support high-end games. The new MacBook however is an excellent gaming notebook on par with PC notebooks. The only thing lagging is the games and drivers, and that is solely due to the fact that they haven't reached critical mass yet.



    Both of those are for casual gaming. The previous macbook could do casual gaming just fine. I think the current MB is still lacking in high end gaming (it can do it, just not well) and you're still going to have to go into windows to play games, either because they haven't been released on the Mac or because they cost 3 times more.
  • Reply 9 of 73
    Quote:
    Originally Posted by Snafu View Post


    It doesn't help that The Chronos Group failed to materialize its promise of OpenGL 3.0 matching DirectX 10's 3D capabilities.



    I have to agree. OpenGL had a great opportunity since it allows Windows XP users to unlock the DX10 features of their DX10 GPUs through OpenGL. I'm sure quiet a few developers would have been interested in making an OpenGL game so that DX10 features would be available to both XP and Vista users. However, I think OpenGL squandered it's opportunity since the delay in releasing OpenGL 3.0 and the further delay in Mt Evans which is supposed to add Geometry Shaders, means the time to promote DX10 functionality on XP as a feature is quickly passing.



    And OpenCL's advantage over DX11's Compute Shaders really depends on early adoption. Once DX11 is available, existing DirectX developers, which seems to be most game developers, will just stick with DX11 and it's Compute Shaders rather than spending all the effort to migrate to OpenGL and OpenCL. To gain momentum, hopefully nVidia and ATI release drivers supporting OpenCL quickly.
  • Reply 10 of 73
    mactelmactel Posts: 1,275member
    Quote:
    Originally Posted by Tauron View Post


    Another halfass tactic and halfass effort by the master of halfassed software, microshit.



    DirectX 10 is not "halfassed" software as many game developers attest to. It is just proprietary and tied to Vista. If DirectX was open for everyone to develop to on mult-platforms then this article and OpenGL wouldn't exist.
  • Reply 11 of 73
    Comon OpenGL!!!! You can do it!!!!!
  • Reply 12 of 73
    jeffdmjeffdm Posts: 12,949member
    Quote:
    Originally Posted by ajmas View Post


    As cross-platform solutions for gaming we have include OpenGL, OpenAL and now OpenCL. I have spoken to a number of Direct-X developers to find out why they use it in favour to OpenGL. The answer generally comes down to good support by the IDE they use (Visual Studio), and then in certain cases because it makes certain things easier. I have no progamming expereince with Direct-X, so I can't give my own opinion.



    One thing is still missing though, a good cross-platform input device access, at least not one supported by a major OS. From what I understand, DirectX did make handling inputs relatively easy. Brian Greenstone of Pangea Software showed how hard it was to do the same on OS X in this book:



    http://www.pangeasoft.net/book/index.html



    The short of it is that it takes about 3000 lines of code just to be able to grab a joystick and make sure its buttons are mapped properly and reliably. He showed how much better the old Mac OS 9 Input Sprockets system was, something like five lines of code to use it, with no comparable system in OS X. There is SDL, not officially supported by any major OS, but I haven't tried to use it in a Cocoa program yet.
  • Reply 13 of 73
    Quote:
    Originally Posted by ltcommander.data View Post


    I have to agree. OpenGL had a great opportunity since it allows Windows XP users to unlock the DX10 features of their DX10 GPUs through OpenGL. I'm sure quiet a few developers would have been interested in making an OpenGL game so that DX10 features would be available to both XP and Vista users. However, I think OpenGL squandered it's opportunity since the delay in releasing OpenGL 3.0 and the further delay in Mt Evans which is supposed to add Geometry Shaders, means the time to promote DX10 functionality on XP as a feature is quickly passing.



    OpenGL exposes pretty much all of the DX10 functionality right now, and geometry shaders are present on OS X. No one cares about them because hardly any apps (or games) use them at present.



    OpenGL 3.0 has nothing to do with DX10 functionality being added; it was promoted as a major API clean-up to remove and restructure *older* API instead, which obviously carries with it no small amount of work for vendors.



    As for OpenCL and games, I think the benefits are somewhat overstated: the compute units are typically unused for non-3D work, but when a game is running OpenGL, they are in use, typically running vertex and fragment shaders. I'd expect to see far more benefits from OpenCL in non-gaming applications.
  • Reply 14 of 73
    Quote:
    Originally Posted by JeffDM View Post


    One thing is still missing though, a good cross-platform Input device access. Brian Greenstone of Pangea Software showed how hard it was to do:



    http://www.pangeasoft.net/book/index.html



    The short of it is that it takes about 3000 lines of code just to be able to grab a joystick and make sure its buttons are mapped properly. He showed how much better the old Mac OS 9 Input Sprockets system was, with no comparable system in OS X.



    Brian's example pushes the case a little hard to make the point, although it certainly wasn't easy. Under Leopard, there is a new HID API that provides a lot of the same functionality as DirectInput does so the point is mostly moot now.
  • Reply 15 of 73
    Quote:
    Originally Posted by MacTel View Post


    DirectX 10 is not "halfassed" software as many game developers attest to. It is just proprietary and tied to Vista. If DirectX was open for everyone to develop to on mult-platforms then this article and OpenGL wouldn't exist.



    Agreed. As well, the HLSL shader stack in DirectX is available on other platforms, albeit often "half-assed", as Cg - which Nvidia provides and supports.
  • Reply 16 of 73
    melgrossmelgross Posts: 31,957member
    Quote:
    Originally Posted by StuBeck View Post


    Both of those are for casual gaming. The previous macbook could do casual gaming just fine. I think the current MB is still lacking in high end gaming (it can do it, just not well) and you're still going to have to go into windows to play games, either because they haven't been released on the Mac or because they cost 3 times more.



    In response to Walneys post to me, I realize you were talking about GAME prices. Though I've never seen that difference myself, though Mac games prices are often more, the first two sentences of this post are no longer in answer to that, though, they stand by themselves to the larger argument about Mac pricing.



    No one into gaming is going to be buying a PC that costs one third that of a Mac. Those computers are sorely lacking in much of anything.



    Considering that 90% of gaming is "casual" gaming, the new Macs are just dandy.



    The fact that they are also much better than previous generations does mean that more people who are thinking of buying a Mac will now have less reasons for not doing so.



    What OpenCL will do is make it easier to do games for the PC that are not DirectX based, if the companies suspect that the emerging Mac audience would be interested.



    Remember that right now, Macs comprise 20% of computers bought at retail. That number is rising. It means that there is now a mass of people out there in the consumer space that Apple didn't have before. That mass is enough to support games as long as the technology is there. OpenCL is one of the biggest bricks to be laid.



    With both ATI and Nvidia incorporating OpenCL in their GPU's, it will be effectively, everywhere there is a GPU powerful enough for games. The GPU's don't have to be the most powerful, and very few PC users playing games buy those expensive boards. Most have much more modest systems, much closer to what Apple is beginning to offer.



    So, yes, while Macs are more expensive than the cheap low end PCs out there, an old argument which is too tired to continue, people are taking them up in ever increasing numbers. We only have to look at the fact that Macs are being bought at levels that are rising much faster than the PC industry as a whole, to see the truth in that.



    It could very well be another year from now when more than 25% of all computers bought at retail will be Macs. With that marketshare, game developers will see a requirement to look at the Mac, if the users are interested in games, which is something else entirely.



    But if it proves they are, then OpenCL is certainly a, er, game changer. Support will be everywhere. Remember that most computers come with no independent GPU, but rather an Intel integrated solution, or now, an Nvidia integrated solution. If those also contain OpenCL abilities, then OpenCL WILL be everywhere.



    This will make writing games to it more desireable, because it makes moving those games to the Mac platform, and the Linux based platforms much easier. It's certainly not out of the realm of possibility that game companies may be willing to give up that last little bit of performance that DirectX gives them for some functions for the much wider performance advantages of OpenCL when that larger customer base comes with it. After all, sales is the thing, and most consumers can't use those complex enhancers such as 8x AA and such now anyway.



    If sales to Apple and Linux users is serious enough for those companies first willing to take the plunge, and there will be some, then the others will do so as well. Greater use of OpenGL will prod more work on that too.



    As MS seems to be about the only company of weight not backing this standard, it looks as though it will be a success.
  • Reply 17 of 73
    Quote:
    Originally Posted by Johnny Mozzarella View Post


    I too was skeptical until I started hearing and seeing Apple tout the iPod/iPhone as a great gaming platform. If Apple releases an updated Mac mini with some decent dedicated graphics at an affordable price, the Mac gaming market could explode.



    The PC gaming market is currently imploding in the face of competition from consoles. For the Mac to 'explode' it would have to take on console gaming directly. That's unlikely outside of the most optimistic fanboy fantasies.
  • Reply 18 of 73
    Quote:
    Originally Posted by Brad Oliver View Post


    OpenGL 3.0 has nothing to do with DX10 functionality being added; it was promoted as a major API clean-up to remove and restructure *older* API instead, which obviously carries with it no small amount of work for vendors.



    I was wondering how effective the clean-up was in OpenGL 3.0 from OpenGL 2.1? The way the tech news sites were reporting it, they made it seem like OpenGL 3.0 was supposed to be a clean break but in the end they only implemented a depreciation model and marked things as depreciated without removing them yet causing an uproar in the community. I wouldn't be surprised if OpenGL 3.0 was actually fairly well received and the news sites were just playing up some disagreements.



    I guess OpenGL 3.0 support will come in Snow Leopard along with OpenCL, unless 3.0 is already being incorporated into Leopard.
  • Reply 19 of 73
    Quote:
    Originally Posted by melgross View Post


    What OpenCL will do is make it easier to do games for the PC that are not DirectX based, if the companies suspect that the emerging Mac audience would be interested.



    This is my biggest beef with the article: the author seems to not know what OpenCL is. Can you tell me how, exactly, you expect it to help out with games? It's a general compute language designed to make non-gaming algorithms run on the GPU with a CPU fallback when the GPU is busy (as it is when GL is typically running). CL use will require work to take advantage of it, not unlike the work you might dig for when planning multi-threaded code because you have to locate and identify algorithms that can run in discrete chunks on a separate processor.
  • Reply 20 of 73
    melgrossmelgross Posts: 31,957member
    Quote:
    Originally Posted by ltcommander.data View Post


    I have to agree. OpenGL had a great opportunity since it allows Windows XP users to unlock the DX10 features of their DX10 GPUs through OpenGL. I'm sure quiet a few developers would have been interested in making an OpenGL game so that DX10 features would be available to both XP and Vista users. However, I think OpenGL squandered it's opportunity since the delay in releasing OpenGL 3.0 and the further delay in Mt Evans which is supposed to add Geometry Shaders, means the time to promote DX10 functionality on XP as a feature is quickly passing.



    And OpenCL's advantage over DX11's Compute Shaders really depends on early adoption. Once DX11 is available, existing DirectX developers, which seems to be most game developers, will just stick with DX11 and it's Compute Shaders rather than spending all the effort to migrate to OpenGL and OpenCL. To gain momentum, hopefully nVidia and ATI release drivers supporting OpenCL quickly.



    When something isn't used very much, development tends to slow down.



    This could very well give it the boost it needs.



    Don't forget that there have been OpenGL games on the PC, and the ones for the Mac must be OpenGL. But that wasn't enough.



    It will take some time for DirectX 11 to get off the ground. Win 7 won't be released until at least mid year, possibly later. Then it will take some time after that for adoption to get to a useful level. Developers will have to play with 11 before they write to it. We may not see any serious move to it until mid to late 2010, possibly even later, depending on how the adoption of Win 7 goes.



    OpenCL has a very good shot here.



    I think that Apple should do what MS has done over the years, and simply pay some big game developer to bring one or more of their major games to the Mac and find out if users are interested.
Sign In or Register to comment.