or Connect
AppleInsider › Forums › Software › Mac OS X › OpenCL and OpenGL take on DirectX
New Posts  All Forums:Forum Nav:

OpenCL and OpenGL take on DirectX

post #1 of 74
Thread Starter 
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.
post #2 of 74
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.
post #3 of 74
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.
post #4 of 74
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.)
post #5 of 74
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.
post #6 of 74
It doesn't help that The Chronos Group failed to materialize its promise of OpenGL 3.0 matching DirectX 10's 3D capabilities.
post #7 of 74
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.
post #8 of 74
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.
In Windows, a window can be a document, it can be an application, or it can be a window that contains other documents or applications. Theres just no consistency. Its just a big grab bag of monkey...
Reply
In Windows, a window can be a document, it can be an application, or it can be a window that contains other documents or applications. Theres just no consistency. Its just a big grab bag of monkey...
Reply
post #9 of 74
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.
post #10 of 74
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.
post #11 of 74
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.
post #12 of 74
Comon OpenGL!!!! You can do it!!!!!
Apple is a hardware company, dont believe me? Read this Article!. For those who understand my message, help me spread this info to those who dont get it.
Reply
Apple is a hardware company, dont believe me? Read this Article!. For those who understand my message, help me spread this info to those who dont get it.
Reply
post #13 of 74
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.
post #14 of 74
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.
post #15 of 74
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.
post #16 of 74
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.
post #17 of 74
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.
post #18 of 74
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.
post #19 of 74
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.
post #20 of 74
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.
post #21 of 74
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.
post #22 of 74
Quote:
Originally Posted by Brad Oliver View Post

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.

That's not true. PC gaming is not imploding. That's a myth that console manufacturers want people to believe, to make it a self fulfilling prophecy.
post #23 of 74
Quote:
Originally Posted by Brad Oliver View Post


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.

Welcome to the boards Brad! I agree...why would I want OpenCL in gaming? I could be naive but gaming and parallel processing sound like an odd couple. I would think the dynamic nature of a game makes it difficult to break out components and tap the GPU effectively.
He's a mod so he has a few extra vBulletin privileges. That doesn't mean he should stop posting or should start acting like Digital Jesus.
- SolipsismX
Reply
He's a mod so he has a few extra vBulletin privileges. That doesn't mean he should stop posting or should start acting like Digital Jesus.
- SolipsismX
Reply
post #24 of 74
.....
post #25 of 74
Quote:
Originally Posted by Brad Oliver View Post

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.

OpenCL works with any program, and that includes games. It's advantage is in parallel programming, which is where most companies, including gaming developers are having some of their biggest difficulties in leveraging the new multi core machines.

By integrating the GPU with the multiple core CPU's, each processor will be able to do the functions it does best, integrating them all.

How does DirectX compare?
post #26 of 74
Quote:
Originally Posted by Walney View Post

I think that Stubeck was saying that the games cost 3 times more than the PC equivalent...

Upon a re-read of his post, I agree that's what he said.

I've never seen that price differential though, so it just seems as though he was talking bout the computers themselves. I'll note that on my answer to him.
post #27 of 74
Quote:
Originally Posted by melgross View Post

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.

I guess that's what WARP is for, to provide a DX10/DX10.1/DX11 compliant renderer completely in software. I believe WARP and DX11 is already out in beta in the latest DirectX SDK so developers can try it even if no DX11 hardware is available.

From the reports that Intel's Core i7 can achieve higher fps in WARP than Intel's IGPs in hardware, it makes me wonder whether Intel should be proud or not.

Quote:
Originally Posted by melgross View Post

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.

Wasn't it reported that Newell wanted Jobs to pay him $1 million to bring Half Life 2 to Mac? Steve Jobs probably didn't respond well to that.

But yeah, maybe now that Bungie is free, Apple could do something to entice them back to Mac. Or Ensemble Studios which had many of their games come to Mac and who Microsoft is letting go. I guess Apple tried this with EA too, but that seemed to have quieted down now.
post #28 of 74
Quote:
Originally Posted by ltcommander.data View Post

I guess that's what WARP is for, to provide a DX10/DX10.1/DX11 compliant renderer completely in software. I believe WARP and DX11 is already out in beta in the latest DirectX SDK so developers can try it even if no DX11 hardware is available.

From the reports that Intel's Core i7 can achieve higher fps in WARP than Intel's IGPs in hardware, it makes me wonder whether Intel should be proud or not.

As far as I know, that's true. But developers are a conservative lot. They won't want to pour too much money into something unless they decide it's worth it.

Quote:
Wasn't it reported that Newell wanted Jobs to pay him $1 million to bring Half Life 2 to Mac? Steve Jobs probably didn't respond well to that.

But yeah, maybe now that Bungie is free, Apple could do something to entice them back to Mac. Or Ensemble Studios which had many of their games come to Mac and who Microsoft is letting go. I guess Apple tried this with EA too, but that seemed to have quieted down now.

Something like that.

Apple has enough money to buy EA if they wanted to, or any other company. At least to take a stake in one. They are all small, and cheap. Apple should have their own games division like MS does, at least to get the ball rolling with a couple of major hits.
post #29 of 74
Quote:
Originally Posted by melgross View Post

OpenCL works with any program, and that includes games. It's advantage is in parallel programming, which is where most companies, including gaming developers are having some of their biggest difficulties in leveraging the new multi core machines.

By integrating the GPU with the multiple core CPU's, each processor will be able to do the functions it does best, integrating them all.

How does DirectX compare?

DirectX and OpenGL are comparable - they are 3D graphics APIs that use the GPU. OpenCL and CUDA are comparable - they are compute APIs that use the GPU for more generalized tasks. DirectX and OpenCL are not comparable in the same way that OpenGL and CUDA are not - they do different things, albeit with the same piece of hardware.

Here's the thing: the GPU is not a magical wonderland of unlimited resources. If you're *already* using OpenGL (or DirectX) for your 3D games, OpenCL (and CUDA) are of more limited use. If you are *not* using the GPU already, then OpenCL and/or CUDA can help a great deal, not unlike making use of SSE or Altivec, albeit more generalized and useful. OpenCL's benefit will come primarily from apps that are already CPU-bound, don't rely on the GPU and could benefit from "one more core".
post #30 of 74
Quote:
Originally Posted by Brad Oliver View Post

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.

Is it easy to use and properly documented? One major problem I had with the old HID was that it was confusing, and the header files that the Apple docs suggest that I read lacked comments explaining the meaning or intent of the entries.
post #31 of 74
Quote:
Originally Posted by Brad Oliver View Post

Here's the thing: the GPU is not a magical wonderland of unlimited resources. If you're *already* using OpenGL (or DirectX) for your 3D games, OpenCL (and CUDA) are of more limited use. If you are *not* using the GPU already, then OpenCL and/or CUDA can help a great deal, not unlike making use of SSE or Altivec, albeit more generalized and useful. OpenCL's benefit will come primarily from apps that are already CPU-bound, don't rely on the GPU and could benefit from "one more core".

I thought nVidia's big CUDA push in games was hardware PhysX acceleration, trying to push the idea that the GPU can handle physics faster than a CPU. Granted the GPU may already be heavily loaded, but couldn't a developer take a small fps hit say 10% to offload some physics processing onto the GPU? Since the GPU does physics faster than a CPU, you'd probably free up a proportionally larger amount of CPU cycles for other things like a more advanced AI. It might be a worthwhile tradeoff.
post #32 of 74
Quote:
Originally Posted by JeffDM View Post

Is it easy to use and properly documented? One major problem I had with the old HID was that it was confusing, and the header files that the Apple docs suggest that I read lacked comments explaining the meaning or intent of the entries.

The "old" HID should never have been used directly - the 'HID Utilities" library Apple provided as sample code was a nice, easy-to-use wrapper around it which we used (and which negates a lot of Brian's 3000 lines).

The new HID is essentially the HID Utilities library cleaned up and provided in OS form. There's a technote on it here. That technote is a little bit of a headache to read, so I'd suggest checking out the sample code, particularly this app.

The usage is not unlike DirectInput on the PC: you query IOHID for the attached devices, pick out the ones you want to use, enumerate the elements on those devices and query those elements for their status. There's calls to hook all that into your run loop as an optional convenience, which makes the API appear more complicated at first glance than it really is. I suspect you'll find it's simple enough to deal with once you dig in.
post #33 of 74
Quote:
Originally Posted by ltcommander.data View Post

I thought nVidia's big CUDA push in games was hardware PhysX acceleration, trying to push the idea that the GPU can handle physics faster than a CPU.

It isn't that the GPU is faster at it than the CPU, it's that the GPU can do it at all, so why not let it?

There are two caveats right now: one is that the G80-class hardware (the GeForce 8000 and up) are the only cards Nvidia provides that can cope with a generic compute library on the GPU. When the GPU is busy (or not capable), everything has to fall back to the CPU. The second is that fillrate-intensive games (those running extensive fragment shaders or using multisampling, for example) rob the GPU of most of its spare horsepower. There's a UT3 benchmark out there with PhysX that shows this - as the resolution goes up, the PhysX offloading goes down. The UT3 test I saw didn't make use of multisampling, which has a large impact as well.
post #34 of 74
Quote:
Originally Posted by Brad Oliver View Post

The "old" HID should never have been used directly - the 'HID Utilities" library Apple provided as sample code was a nice, easy-to-use wrapper around it which we used (and which negates a lot of Brian's 3000 lines).

The new HID is essentially the HID Utilities library cleaned up and provided in OS form. There's a technote on it here. That technote is a little bit of a headache to read, so I'd suggest checking out the sample code, particularly this app.

The usage is not unlike DirectInput on the PC: you query IOHID for the attached devices, pick out the ones you want to use, enumerate the elements on those devices and query those elements for their status. There's calls to hook all that into your run loop as an optional convenience, which makes the API appear more complicated at first glance than it really is. I suspect you'll find it's simple enough to deal with once you dig in.

I think maybe the book in question might have predated the publication of HID Utilities.

HID Utilities always looked like a mess to me. I'm not seeing much better by looking at the tech note or the code to this HID Calibrator either. main.c is 872 lines.
post #35 of 74
Quote:
Originally Posted by JeffDM View Post

I think maybe the book in question might have predated the publication of HID Utilities.

HID Utilities have been around since at least 2004, the book came after.

Quote:
HID Utilities always looked like a mess to me. I'm not seeing much better by looking at the tech note or the code to this HID Calibrator either. main.c is 872 lines.

Don't take the "Wil Shipley" line-counting approach and conflate comments, white-space and robust error checking in with raw functionality. The API itself is fairly concise: the example code (in a departure from a lot of samples) attempts to do everything and account for every error. In practice, you'll have maybe a few dozen lines, particularly if you use Cocoa for the dictionaries instead of the CoreFoundation APIs.
post #36 of 74
Quote:
Originally Posted by Brad Oliver View Post

DirectX and OpenGL are comparable - they are 3D graphics APIs that use the GPU. OpenCL and CUDA are comparable - they are compute APIs that use the GPU for more generalized tasks. DirectX and OpenCL are not comparable in the same way that OpenGL and CUDA are not - they do different things, albeit with the same piece of hardware.

Here's the thing: the GPU is not a magical wonderland of unlimited resources. If you're *already* using OpenGL (or DirectX) for your 3D games, OpenCL (and CUDA) are of more limited use. If you are *not* using the GPU already, then OpenCL and/or CUDA can help a great deal, not unlike making use of SSE or Altivec, albeit more generalized and useful. OpenCL's benefit will come primarily from apps that are already CPU-bound, don't rely on the GPU and could benefit from "one more core".

OpenCL is quite a bit more than that.
post #37 of 74
Quote:
Originally Posted by fuyutsuki View Post

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.)

Microsoft is going to need a major game change if they wish to prevent OpenGL/CL from taking the cake.

1. Not only is Apple advancing more rapidly than any other computer vendor but they are especially popular with media & younger crowds. Anyone who knows marketing knows these are the groups you want on your side if you want to take over a market, especially kids.

2. XBox is a flop that has been kept barely alive by the Halo effect. PS3 blows the pants off XBox in performance & the Wii is outselling both consoles.

3. People don't buy computers for gaming anymore so the market for who cares about advanced pixel shading or other key Direct3D features is rapidly shrinking & becoming niche. All the money for gaming is shifting towards portables & this is rapidly pushing game developers into the world of OpenGL.

4. Visual Studio has long been in a league of it's own, but the developer tools coming together in XCode is rapidly advancing & becoming more & more comparable to Visual Studio.

5. Developers preference can help guide a product but ultimately it is money. The market has already begun the shift & what will happen is the gaming industry will slowly follow at first & then at some point the developers will get a good kick in the rear (either by company heads or by drop off in sale of their product). You will see a sudden & rapid burst in development towards OpenGL.

Microsoft knows all this & this is why they jumped into consoles & why Halo is probably not the last title that they buy & then lock down to their systems. They have never known how to compete on the technology level, but they have always been good at locking in vendors & manufacturers & then squeezing out the competition. Those tactics don't work anymore in todays society, especially since many younger technologists are tired of it & don't want anything to do with Microsoft.

The only thing that could stop this train now would be for Apple to make some horrible blunder that would completely shut them down, & I just don't see that happening. They've long ago passed the point of small company that could disappear overnight.
post #38 of 74
I don't know: the last market stats show things being Wii first (by an ample margin), XBox as comfortably second and PS3 third and falling even further back unless its pricing changes.

As I see it, OpenCL is not going to help OpenGL one bit. If anything, there is the risk of it meaning more overhead. OpenCL's real promise is not in gaming but everywhere else where the GPU and other resources are at idle. Also, OpenCL is not going to magically turn apps into multithreading beasts, the same way CUDA doesn't. "Human decision required" here.

OpenGL needs to be a true DirectX counterpart for game developers to decide they can target it and do multiplatform programming. These hopes were dashed with that last iteration after a year of promises.

So I don't think Microsoft has too much to worry about.
post #39 of 74
Quote:
Originally Posted by melgross View Post

OpenCL is quite a bit more than that.

I worked on Apple's OpenGL team for a year alongside 4 of the people simultaneously working on OpenCL. A lot of the GL team's work was enabling CL to gain better access to the GPU. Suppose for the moment that I failed to understand a single thing about it and enlighten me.
post #40 of 74
Quote:
Originally Posted by hezekiahb View Post

2. XBox is a flop that has been kept barely alive by the Halo effect. PS3 blows the pants off XBox in performance & the Wii is outselling both consoles.

In terms of market share and performance, it's actually the Xbox 360 that is pulling ahead of the PS3 this generation with sales nearly 2:1 over the PS3 using the November 2008 NPD numbers. In raw numbers, the 360 outsells the PS3 and PS2 combined in the US. The Wii is, as you note, miles above.

Quote:
3. People don't buy computers for gaming anymore so the market for who cares about advanced pixel shading or other key Direct3D features is rapidly shrinking & becoming niche. All the money for gaming is shifting towards portables & this is rapidly pushing game developers into the world of OpenGL.

Agreed about not buying computers for gaming. That said, the main API on the main gaming platform - the Xbox 360 - is DirectX. The PS3 has a stripped down OpenGL ES library, but for best performance developers use Sony's proprietary API, not OpenGL.

Quote:
Microsoft ... have never known how to compete on the technology level, but they have always been good at locking in vendors & manufacturers & then squeezing out the competition.

Microsoft has indeed competed on the technology level with DirectX, and done it well. As for console exclusives, in no way is Microsoft alone here: Sony has also snapped up or purchased rights from developers for Playstation exclusives. Naughty Dog (Crash Bandicoot, Jak/Daxter and Uncharted) comes immediately to mind.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Mac OS X
AppleInsider › Forums › Software › Mac OS X › OpenCL and OpenGL take on DirectX