🔒 Locked
Opengl VS directx (***Discussion not question***)
Advertisement
Original Post
I prefer OpenGL because nVidia always has the best booth babes, and their OpenGL support is better than ATI's. So Booth babes --> nVidia --> OpenGL. Plain and simple.
OpenGL hands down because it is quick and easy to do what you need to do without learning *that* much. I personally find using OpenGL easy as pie. There are a lot of resources avaliable for OpenGL, so why not? I can easily point you to a number of OpenGL resources that you can easily put together and have a game in no time. Cross platform? Nah, I use it because I like the API style and it is rather simple to understand, not in hopes to make something to run on an OS I won't ever use.
Another reason is extensibility. I can also point you to at least 4 other libraries that can use OpenGL, and make using it ever more easy. GLUT, GLFW, SDL, and Allegro. Great libraries in them selves that truly challenge the features of DX. That's about it really [smile]
Oh that and what smart_idiot said, no arguments there [grin]
Another reason is extensibility. I can also point you to at least 4 other libraries that can use OpenGL, and make using it ever more easy. GLUT, GLFW, SDL, and Allegro. Great libraries in them selves that truly challenge the features of DX. That's about it really [smile]
Oh that and what smart_idiot said, no arguments there [grin]
It's hard to have a rational discussion if your reason for preferring OpenGL over DirectX is because of its "power", without a much more in-depth reason or explanation. I could say that DirectX has "power" too and where would we stand? I like OpenGL because it's quick and easy to use and get started with and a lot of online resources, while I like D3D because it's closer to home with my OOP style and can do a lot of neat stuff without relying on vender-specific extensions.
I like DX, because it has MSDN ;) Which is a really proffessional reference guide (no need to explain that).
I know that there are many good sites about GL, but somethimes it's really difficult to find a solution for a non-standard problem.
So this, and what Zipster said, OOP.
But to be honest, I mainly use GL, because lately my programs have to work on linux, too. But for personal usage - DX.
/def
I know that there are many good sites about GL, but somethimes it's really difficult to find a solution for a non-standard problem.
So this, and what Zipster said, OOP.
But to be honest, I mainly use GL, because lately my programs have to work on linux, too. But for personal usage - DX.
/def
True, I also like the fact that DX has MSDN. Althogh OpenGL is also documented there, DX is better deocumented.
And also, as you have just specified DirectX and not Direct3D, I like the fact that DX has lots of different components, ie. DInput, DSound, DPlay etc... Where there is OpenAL etc... DX has alot more to offer.
And also, as you have just specified DirectX and not Direct3D, I like the fact that DX has lots of different components, ie. DInput, DSound, DPlay etc... Where there is OpenAL etc... DX has alot more to offer.
I prefer OpenGL because I have used it more and it's the only one I know really well.
That's supposed to be funny... you know... saying that people (including myself) don't have any better reasons for liking one over the other, other than their experience.
Saying that though, I did learn DirectX back with the version 5 SDK. And then I bought a book on Direct3D which was version 7. Then a month or so later DirectX 8 came out which was a major redesign over version 7. So my knowledge of DirectX isn't actually useful for the more current versions.
So maybe that's why I like OpenGL. The goalposts haven't moved too much over the years and its design has been adaptable enough to take in the new capabilities of hardware. The pipeline was already in good shape. DirectX seems to have moved more and more towards the same model so there is little between them now. I just don't have the knowledge of DirectX that I do of OpenGL.
I have on my shelf the 'OpenGL Programming Guide' for OpenGL 1.4 (redbook) which is excellent. Also 'The OpenGL Shading Language' (orange book) which is a little disappointing.
[Edited by - petewood on April 13, 2005 12:05:43 PM]
That's supposed to be funny... you know... saying that people (including myself) don't have any better reasons for liking one over the other, other than their experience.
Saying that though, I did learn DirectX back with the version 5 SDK. And then I bought a book on Direct3D which was version 7. Then a month or so later DirectX 8 came out which was a major redesign over version 7. So my knowledge of DirectX isn't actually useful for the more current versions.
So maybe that's why I like OpenGL. The goalposts haven't moved too much over the years and its design has been adaptable enough to take in the new capabilities of hardware. The pipeline was already in good shape. DirectX seems to have moved more and more towards the same model so there is little between them now. I just don't have the knowledge of DirectX that I do of OpenGL.
I have on my shelf the 'OpenGL Programming Guide' for OpenGL 1.4 (redbook) which is excellent. Also 'The OpenGL Shading Language' (orange book) which is a little disappointing.
[Edited by - petewood on April 13, 2005 12:05:43 PM]
Quote:
Original post by rpg_code_master
And also, as you have just specified DirectX and not Direct3D, I like the fact that DX has lots of different components, ie. DInput, DSound, DPlay etc... Where there is OpenAL etc... DX has alot more to offer.
OpenGL does not try to be everything. If you use other libraries like SDL, you can do everything DirectX can. You mention DirectPlay but that has been deprecated - along with DirectShow and DirectDraw. I would rather be able to choose good API's whose maintainers are dedicated to them then use all Microsoft's crap.
While I like OOP, having objects of types like LPDIRECT3DVERTEXBUFFER8, it really starts to detract from the elegance of OOP. But maybe that's just me.
In the end I just can't understand choosing a proprietary API that ties you to one operating system when there are other options.
I never knew DirectPlay has been deprecated. How is networking in games done nowdays then?
Yer, the names are long and ugly. I like the fact that D3D actually has in built vertex buffer objects etc.. so you dont ahve to waste time creating your own (assuming your not using a game engine or anything like that :P). And plus, my graphics card only has support for HLSL, not GLSL :'(
Yer, the names are long and ugly. I like the fact that D3D actually has in built vertex buffer objects etc.. so you dont ahve to waste time creating your own (assuming your not using a game engine or anything like that :P). And plus, my graphics card only has support for HLSL, not GLSL :'(
Quote:
Original post by rpg_code_master
I never knew DirectPlay has been deprecated. How is networking in games done nowdays then?
Winsock.
I seem to remember something about plans to port the XBox live technology with Longhorn as well, but don't quote me on that.
I prefer OGL, to me the code style seems a bit cleaner, and more intuitive. In addition, having the option of doing some cross-platform work is something that I'd be interested in getting into in the future. That being said, I havn't made much of an effort to work with DirectX in C++, and really should sometime. My DirectX experience instead comes from Visual Basic 6, where OpenGL isn't really an option; there are a few libraries to interface with OGL that I've seen, but the support is very shaky, lacks features, and tends to be somewhat messy to implement.
Quote:
From the DirectX forum FAQ
DirectPlay is deprecated (it may be reincarnated later on the XNA platform). You can still use it, but Microsoft isn't updating it anymore.
I think most Windows things use Winscok.
Quote:
Original post by Solance
Opengl because of its power
More detail please, otherwise this isn't a proper reason. [wink] Direct3D is very 'powerful' as well, if we're going to have a proper discussion you should at least explain your own preference in a little more detail.
DirectX only because it was the first I learned, havent bothered learning open gl yet.
About the whole DirectPlay vs Winsock issue...a lot of developers were using winsock over DirectPlay in their games because it was more well known, tested, and offered more flexibility. It came to a point where Microsoft wondered "Why are we working on this when no one is using it?"
Now then, back to the subject. I personally prefer DirectX. There are items I like about each though and those should help you choose what fits your needs the best. For example:
OpenGL has:
- Immediate mode - Send one vertex at a time if you wish. This has poor performance and shouldn't be used in games. However it is a great tool to teach someone how to program.
- Cross-platform - Though you will have to change much of your code to get OpenGL to work on more than one platform, it still offers that. DirectX simply doesn't.
- Extensions - Can use hardware more directly and completely. This allows for better optimizations. However because it takes much work and gives only minor benefit, this can be overlooked for a more broad range of optimization.
- Ample documentation - Though sometimes poorly written or incorrect.
DirectX has:
- Many components - To allow more direct access to the hardware. IE Direct3D for video cards (comparable to OpenGL). But DirectX also has DirectInput for Mouse, Joystick, Keyboard, etc; DirectSound for audio cards. Each well designed.
- Very clear and easy to understand documentation - However less docs than OpenGL.
- Direct3DX - A tool to help beginners understand what certain technologies are and how they work. This shouldn't be used in games, but can be helpful when trying to make a quick proof of concept or learn.
- More clear code - This is obviously a matter of opinion and some will disagree with me. However I think that writing for DirectX is easier and more self-documenting than writing for OpenGL.
As you can see the differences are rather limited. Some items will appeal to some people while others appeal to others. However both solve the same problem. Thus we should not suggest that one is better than another. They are pretty close to identical. Just pick the issues that matter to you and choose your API based on that.
Now then, back to the subject. I personally prefer DirectX. There are items I like about each though and those should help you choose what fits your needs the best. For example:
OpenGL has:
- Immediate mode - Send one vertex at a time if you wish. This has poor performance and shouldn't be used in games. However it is a great tool to teach someone how to program.
- Cross-platform - Though you will have to change much of your code to get OpenGL to work on more than one platform, it still offers that. DirectX simply doesn't.
- Extensions - Can use hardware more directly and completely. This allows for better optimizations. However because it takes much work and gives only minor benefit, this can be overlooked for a more broad range of optimization.
- Ample documentation - Though sometimes poorly written or incorrect.
DirectX has:
- Many components - To allow more direct access to the hardware. IE Direct3D for video cards (comparable to OpenGL). But DirectX also has DirectInput for Mouse, Joystick, Keyboard, etc; DirectSound for audio cards. Each well designed.
- Very clear and easy to understand documentation - However less docs than OpenGL.
- Direct3DX - A tool to help beginners understand what certain technologies are and how they work. This shouldn't be used in games, but can be helpful when trying to make a quick proof of concept or learn.
- More clear code - This is obviously a matter of opinion and some will disagree with me. However I think that writing for DirectX is easier and more self-documenting than writing for OpenGL.
As you can see the differences are rather limited. Some items will appeal to some people while others appeal to others. However both solve the same problem. Thus we should not suggest that one is better than another. They are pretty close to identical. Just pick the issues that matter to you and choose your API based on that.
Quote:
Original post by Diodor
As far as I know OpenGL won't really work on many Windows machines due to missing drivers or some such.
bzzt! wrong.
OpenGL1.1 has been shipping since the Win98 days, under WinXP with a default install its very slow due to it being in software, however once you install the correct graphics drivers it works fine.
Personally, I'm an OpenGL person, I looked at both when I was just starting out and found OpenGL info alot easier to come by (via NeHe to start with) and just prefer the syntax.
MSDN is sometimes handy for looking up wgl functions but imo the Red Book, Orange Book and the extension specs (either online or in the book) are the perfect combo and you'll be hard pressed to beat it for infomaion (personal bias in that I like having my infomation on dead trees)
Also, the immediate mode, while slower than a 50cc scooter going up a steep hill, does allow you to knock up things quickly without having to worry about buffers, locks and other things.
Window creation is a bit annoying in its low level form, however I've got my own window lib to wrap that away from me so I dont need to care any more.
Also, the lack of the framebuffer object extension in current drivers makes me cry, but thats not so much a fault with OpenGL as with ATI for having not released a driver set with it yet [wink]
Something like D3DX would be handy, glu goes some way to help but from my limited understanding od D3DX doesnt go nearly far enuff.
and please note, I managed to avoid the terms 'power' and 'crossplatform' in all of that, mainly coz (a) cross platform doesnt matter to most people, certianly when starting out and (b) the power of D3D and OGL is limited only by the graphics cards and what the drivers expose.
@Zipster
Vender specific extensions arent needed as much as they were, infact pre-DX9 class hardware shaders is the only place they are needed really.
- VBO takes care of vertex buffers
- PBO takes care of async uploads/downloads (no ATI support atm however)
- FBO will take care of render-to-texture issue
- GLSL is a cross vender HLSL
- vertex/fragment programs cover the assembler sytle interface if you prefer it
- MRTs are now standard as of OpenGL2.0 (drivers shipping now)
- Point sprites are core as well
thats alot of functionality which is cross vendor and apart from PBO all of them are now 'core' OpenGL as of Version2.0 [smile]
Quote:
Original post by _the_phantom_ Quote:
Original post by Diodor
As far as I know OpenGL won't really work on many Windows machines due to missing drivers or some such.
bzzt! wrong.
OpenGL1.1 has been shipping since the Win98 days, under WinXP with a default install its very slow due to it being in software
Is it that bad? It must be, I've heard figures like 50% of users unable to run an OpenGL game.
Quote:
however once you install the correct graphics drivers it works fine.
I can't afford to rely on users installing drivers just to play my game.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement