![]() |
|
OpenGL and D3D wrapper |
vbovio
Member #8,283
January 2007
|
Hi guys, probably this has been asked before, just want to know if anybody have experience with both OpenGL and D3D, how easy/difficult would be to make such a wrapper ?, I know OpenGL but nothing about D3D, I would appreciate if someone can point out some tutorials/docs on learning D3D. Many Thanks. --------------- |
Richard Phipps
Member #1,632
November 2001
![]() |
Why not look into existing wrappers first before trying to make your own? |
vbovio
Member #8,283
January 2007
|
Good point Richard, although I would like to learn D3D anyway.. I want to get an idea of how much effort is required to do it, Just want to make basic sprite bliting (2D textures) with some blendings, nothing fancy I guess.. --------------- |
Paul whoknows
Member #5,081
September 2004
![]() |
Dustin Dettmer has written an Opengl and D3D wrapper, known as the Thing library for unknowns reasons ,it is not easy to find, you can try using the search engine. ____ "The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner. |
ImLeftFooted
Member #3,935
October 2003
![]() |
Thing 1.0. Let me know if its helpful. If you're going to piece apart the D3D source code I would start in conf.cpp in the initD3D function and then move onto bitmap_d3d.cpp (look at bitmap.h for the 'purpose' of each method). I also started with this article: The article has some holes in it that you'll have to figure out on your own though. Feel free to ask me anything. |
vbovio
Member #8,283
January 2007
|
Dustin: I saw the article before your post, I'll look at it, I'm sure it is usefull. Now I just have to actually learn D3D Thank you guys for the replies. --------------- |
Kitty Cat
Member #2,815
October 2002
![]() |
Is there a particular reason you want to wrap OpenGL and D3D? OpenGL is already available on every platform D3D is, plus more. nVidia drivers handle OpenGL splendidly, Intel has released open source drivers so you can expect OpenGL support to become better for those cards/chipsets, and ATi (AMD) has promised open source drivers (not that their OpenGL support is that terrible to begin with, though it can admittedly be better). -- |
Archon
Member #4,195
January 2004
![]() |
I too would like to know why you would wrap both. It'll restrict you to the lowest common denominator for features. |
Kitty Cat
Member #2,815
October 2002
![]() |
Quote: It'll restrict you to the lowest common denominator for features. Worse than that, it'll restrict your design to have to take into account both APIs and how they handle a given feature. So if they have radically different ways to handle the same feature, you'll be that much more seperated from either. OpenGL is already designed to handle differences in hardware. The only things you really need to worry about is GLX vs. WGL, but that's comparitively small (and you'd have to handle that anyway). -- |
Paul whoknows
Member #5,081
September 2004
![]() |
OpenGL vs D3D another classic Allegro.cc fight! ____ "The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner. |
Archon
Member #4,195
January 2004
![]() |
Quote: Why do people understimate the importance of D3D? Enlighten us. |
Richard Phipps
Member #1,632
November 2001
![]() |
KC: There ARE laptops with poor or no OpenGL support. And the companies making the gfx set have no intention of doing a proper OpenGL driver. One example is the piece of Sh*t that is the S3 Unichrome Pro IGP which is still in quite modern PC's yet has no OpenGL support and pretty poor DirectX support. |
Archon
Member #4,195
January 2004
![]() |
Quote: One example is the piece of Sh*t that is the S3 Unichrome Pro IGP which is still in quite modern PC's yet has no OpenGL support and pretty poor DirectX support. Then that sounds like its the buyers fault and problem. |
Richard Phipps
Member #1,632
November 2001
![]() |
Not when it's part of laptops that are common in PC shops. |
Kitty Cat
Member #2,815
October 2002
![]() |
Quote: One example is the piece of Sh*t that is the S3 Unichrome Pro IGP which is still in quite modern PC's yet has no OpenGL support and pretty poor DirectX support. So what would be gained by wrapping nothing (OpenGL) with crap (DirectX)? At best, you have crap (actually slightly worse crap, because it has to abstract what is already poor with something the chipset doesn't have support for). If you go with D3D, you have Windows + those corner-case cards. If you go with OpenGL, you have Windows + corner-case users (ie. Linux, FreeBSD, etc. users; some of whom have very capable cards). By using a D3D+OpenGL wrapper, you marginalize those corner case cards, thereby losing what you may have gained with pure D3D. -- |
Archon
Member #4,195
January 2004
![]() |
Quote: Not when it's part of laptops that are common in PC shops. I went through the newegg catalog and all of the laptops (about 36 of them) that listed a video card (all but one) had either an Intel, nVidia or ATi graphics card. If someone goes for a really cheap laptop that has one of these cards then they can't expect to be able to play games on them. |
Richard Phipps
Member #1,632
November 2001
![]() |
Quote: So what would be gained by wrapping nothing (OpenGL) with crap (DirectX)? Simple.. Neon Wars doesn't work in OpenGL on this chipset, but does work in DirectX in a medium quality mode (not low, medium). It is perfectly playable in DirectX on this chipset, yet the game would NEVER be playable if I only had OpenGL support. By your rationale, the game would never be playable on this chipset. Quote: By using a D3D+OpenGL wrapper, you marginalize those corner case cards, thereby losing what you may have gained with pure D3D. A D3D+OpenGL wrapper is perfectly capable of doing good 2D accelerated games such as you can do with OpenLayer. Quote: If someone goes for a really cheap laptop that has one of these cards then they can't expect to be able to play games on them. Yes, they can. Not the latest games for sure, but they would expect to be able to play games that aren't too intensive. There are issues with other integrated chipsets with OpenGL as well, but supporting D3D and OpenGL makes more games playable. I do not buy into the arguement that it is the customers fault for buying an integrated chipset. Most people don't have the expertise to know the pros and cons of hardware. |
m c
Member #5,337
December 2004
![]() |
Quote: Why do people understimate the irrelevance of D3D?
TFTFY (\ /) |
Archon
Member #4,195
January 2004
![]() |
Quote: I do not buy into the arguement that it is the customers fault for buying an integrated chipset. Most people don't have the expertise to know the pros and cons of hardware.
Isn't that making technology get held back... because people are cutting back on hardware upgrades or they are buying the cheapest thing available? |
Trezker
Member #1,739
December 2001
![]() |
I we keep making awesome games that support only OpenGL, then people will not want computers that doesn't support OpenGL and marketing such computers will be less profitable. |
Kibiz0r
Member #6,203
September 2005
![]() |
Quote: If you want OpenGL to be successful, you must use it.
But the status quo is warm and comfy. --- |
BAF
Member #2,981
December 2002
![]() |
Quote: Then that sounds like its the buyers fault and problem. Way to go, Linux mentality! It's the DEVELOPER's job to make stuff work if (s)he wants people to use it, not just say "oh it's your fault, your computer sucks." In Richard's case, he is selling this game. He can't just say "oh, get a new computer," when he can work around it by utilizing D3D. Quote: I went through the newegg catalog and all of the laptops (about 36 of them) that listed a video card (all but one) had either an Intel, nVidia or ATi graphics card. Intel and ATi don't have very good OpenGL support. My laptop has an ATi card in it, and it sucks balls. OpenGL is like nonexistent, but DirectX/D3D are pretty good. Of course, it may just be the drivers, because when I tried Linux on there, OGL worked fairly well (though not great) with the DRI drivers. Quote:
Isn't that making technology get held back... because people are cutting back on hardware upgrades or they are buying the cheapest thing available? No. Technology is still moving forward. Most people don't give a rats ass if they have the newest l33test video card or CPU. And, he is not accommodating old hardware/software, rather supporting current software. Why should the player need a mega gaming box to play Neon Wars? Neon Wars is a great game, but not quite 3D or anything that should require too beefy a setup. |
vbovio
Member #8,283
January 2007
|
wow, I did not expect this to become a discussion.. I second Richard arguments. Personally I don't like DirectX, it's really ugly, but I see it from the users side, if the game does not run then the user won't play the game. Period. If the reason is because OGL is not supported but D3D is, then you may have a chance if you support it. That's it, as a vendor you just get more chances in selling the game. Anyway, thanks for the replies, it's good info. --------------- |
kikabo
Member #3,679
July 2003
![]() |
I've heard alot of people say how ugly DirectX is, I've got a good/intermediate knowledge of OpenGL and at the moment I'm reading Introduction to 3D Game Programming with DirectX 9.0 that a friend gave to me, I must admit that it is nowhere near as bad as I had imagined. There are lots of building blocks that I wasn't expecting to be there for free, the SDK examples are numerous and very good, documentation is excellent and all works with Visual c++ 2005 express for free. DirectX doesn't work on all platforms but it does on the one that matters. Writing OpenGL games as a sole programmer isn't going to convert any users to Linux, save it until you're part of a successful team in the game industry then push for a free Linux port. |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Quote: even die hard Linux users have Wine or dual boot systems that they don't admit to. I use neither. Go figure. -- |
|
|