|
|||||||
| Register | Members List | New Posts | Mark Forums Read |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Kasper's Automated Slave
Join Date: Nov 1997
Posts: 6,151
|
OpenCL and OpenGL take on DirectX
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. |
|
|
|
|
|
#2 | |
|
Registered User
Join Date: Jun 2008
Posts: 888
|
Quote:
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: May 2002
Posts: 364
|
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. |
|
|
|
|
|
#4 |
|
Registered User
Join Date: Oct 2005
Location: Edinburgh, Scotland
Posts: 293
|
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.) |
|
|
|
|
|
#5 |
|
Registered User
Join Date: Jun 2007
Posts: 140
|
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. |
|
|
|
|
|
#6 |
|
Registered User
Join Date: Aug 2008
Posts: 32
|
It doesn't help that The Chronos Group failed to materialize its promise of OpenGL 3.0 matching DirectX 10's 3D capabilities.
|
|
|
|
|
|
#7 | |
|
Registered User
Join Date: Mar 2006
Posts: 955
|
Quote:
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. |
|
|
|
|
|
|
#8 |
|
Registered User
Join Date: Feb 2008
Posts: 1,415
|
|
|
|
|
|
|
#9 | |
|
Registered User
Join Date: Jun 2007
Posts: 140
|
Quote:
|
|
|
|
|
|
|
#10 | |
|
Registered User
Join Date: Jun 2008
Posts: 204
|
Quote:
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. |
|
|
|
|
|
|
#11 |
|
Registered User
Join Date: Mar 2006
Posts: 634
|
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.
Tory Hagen
Break the Wedge! |
|
|
|
|
|
#12 |
|
Registered User
Join Date: Aug 2007
Posts: 465
|
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.
|
|
|
|
|
|
#13 | |
|
Global Moderator
Join Date: Jun 2004
Location: .US
Posts: 9,127
|
Quote:
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. Last edited by JeffDM; 12-16-2008 at 12:05 PM.. |
|
|
|
|
|
|
#14 | |
|
Registered User
Join Date: Jul 2004
Location: Glendale, AZ
Posts: 15
|
Quote:
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. |
|
|
|
|
|
|
#15 | |
|
Registered User
Join Date: Jul 2004
Location: Glendale, AZ
Posts: 15
|
Quote:
|
|
|
|
|
|
|
#16 |
|
Registered User
Join Date: Jul 2004
Location: Glendale, AZ
Posts: 15
|
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.
|
|
|
|
|
|
#17 | |
|
Global Moderator
Join Date: Sep 2004
Location: NYC
Posts: 19,612
|
Quote:
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. Last edited by melgross; 12-16-2008 at 12:34 PM.. |
|
|
|
|
|
|
#18 |
|
Registered User
Join Date: Jul 2004
Location: Glendale, AZ
Posts: 15
|
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.
|
|
|
|
|
|
#19 | |
|
Registered User
Join Date: Jun 2008
Posts: 204
|
Quote:
I guess OpenGL 3.0 support will come in Snow Leopard along with OpenCL, unless 3.0 is already being incorporated into Leopard. |
|
|
|
|
|
|
#20 |
|
Registered User
Join Date: Jul 2004
Location: Glendale, AZ
Posts: 15
|
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.
|
|
|
|
|
|
#21 | |
|
Global Moderator
Join Date: Sep 2004
Location: NYC
Posts: 19,612
|
Quote:
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. |
|
|
|
|
|
|
#22 |
|
Global Moderator
Join Date: Sep 2004
Location: NYC
Posts: 19,612
|
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.
|
|
|
|
|
|
#23 | |
|
Global Moderator
Join Date: Nov 2001
Location: Seattle, WA
Posts: 10,457
|
Quote:
|
|
|
|
|
|
|
#24 |
|
Registered User
Join Date: Dec 2008
Location: UK
Posts: 20
|
|
|
|
|
|
|
#25 | |
|
Global Moderator
Join Date: Sep 2004
Location: NYC
Posts: 19,612
|
Quote:
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? |
|
|
|
|
|
|
#26 | |
|
Global Moderator
Join Date: Sep 2004
Location: NYC
Posts: 19,612
|
Quote:
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. |
|
|
|
|
|
|
#27 | ||
|
Registered User
Join Date: Jun 2008
Posts: 204
|
Quote:
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:
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. |
||
|
|
|
|
|
#28 | ||
|
Global Moderator
Join Date: Sep 2004
Location: NYC
Posts: 19,612
|
Quote:
Quote:
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. |
||
|
|
|
|
|
#29 | |
|
Registered User
Join Date: Jul 2004
Location: Glendale, AZ
Posts: 15
|
Quote:
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". |
|
|
|
|
|
|
#30 |
|
Global Moderator
Join Date: Jun 2004
Location: .US
Posts: 9,127
|
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.
|
|
|
|
|
|
#31 | |
|
Registered User
Join Date: Jun 2008
Posts: 204
|
Quote:
|
|
|
|
|
|
|
#32 | |
|
Registered User
Join Date: Jul 2004
Location: Glendale, AZ
Posts: 15
|
Quote:
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. |
|
|
|
|
|
|
#33 | |
|
Registered User
Join Date: Jul 2004
Location: Glendale, AZ
Posts: 15
|
Quote:
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. |
|
|
|
|
|
|
#34 | |
|
Global Moderator
Join Date: Jun 2004
Location: .US
Posts: 9,127
|
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. |
|
|
|
|
|
|
#35 | ||
|
Registered User
Join Date: Jul 2004
Location: Glendale, AZ
Posts: 15
|
Quote:
Quote:
|
||
|
|
|
|
|
#36 | |
|
Global Moderator
Join Date: Sep 2004
Location: NYC
Posts: 19,612
|
Quote:
|
|
|
|
|
|
|
#37 | |
|
Registered User
Join Date: Jan 2008
Posts: 330
|
Quote:
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. |
|
|
|
|
|
|
#38 |
|
Registered User
Join Date: Aug 2008
Posts: 32
|
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. Last edited by Snafu; 12-16-2008 at 05:04 PM.. |
|
|
|
|
|
#39 |
|
Registered User
Join Date: Jul 2004
Location: Glendale, AZ
Posts: 15
|
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.
|
|
|
|
|
|
#40 | |||
|
Registered User
Join Date: Jul 2004
Location: Glendale, AZ
Posts: 15
|
Quote:
Quote:
Quote:
|
|||
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|