PDA

View Full Version : Why is OpenGL better than Direct3D?



TheGecko
04-09-2000, 07:38 PM
This has been the starting point of countless flame wars on many message boards. But I have still found no answer to this very questiong.No one has given me one good reason why OpenGL is better than Direct3D.

To start off,I can honestly say that DirectX FAR surpasses OpenGL in terms of 2D graphics.That has already been established. But why is OpenGL better than Direct3D? From what I can tell,they both do the same thing on the same grphics cards and both of them have great API's (totally based on my opinion)The only thing going for OpenGL that I see is that it is platform independant. However,to those programming their 3D applications for Windows,I can't see why they won't use DirectX.What better API to use for windows?

I am not trying to start a flame war mind you.I'm just seeking answers http://www.opengl.org/discussion_boards/ubb/smile.gif

dmy
04-09-2000, 07:59 PM
yes, with d3d you can do as much as you can do with opengl, if not more...
but imo, opengl is better because it is:
-more elegant
-easier to learn
-more compact

when i was starting and i was wondering what api to choose, i took a look to d3d sources: a darn mess!
then i said "well, it's such a popular API, why don't give it a try?" so i coded my personal version of the hello world, a 3D starfield.
it took about 1 month to gather the needed knowledge, some days to code.

some time later i tried opengl with ms aux library... hey! just 3 days of reading and 1 hour of coding!

then, for me the decision was simple: stay with the opengl family, and never care about designing for d3d.

sometime, though, i have some look somewhere on the net... i see dx is constantly and fastly adding features (but it's not improving in code quality) and that's a thing that opengl lacks...

opengl is controlled by the arb, and any changes/addition/specs from the manufacturers has to be submitted to the arb, wich is a bit slow in approving things...

hope to have clarified thins up.

Dolo/\/\ighty

Eric
04-09-2000, 09:19 PM
Well, I'd agree with dmy (once again ! I'll end with asking you to marry me !).

First thing, I have never coded with D3D. But I had to port a program from Mac to PC. As I wanted to turn the visualization system from 2D to 3D, I had a look at the various 3D API available. As I ported FROM the Mac, I had a go with QuickDraw 3D (which at the time was supported on both PCs and Macs). Unfortunately, some days after I had completed the conversion, Apple announced they abandoned QD3D for OpenGL... So I started to have a look at OpenGL. Meanwhile, I found some code in my company : someone before me had tried to port the program using Direct3D....

As dmy said, the code was really awful (I mean, hard to read !).

One of my other objectives was to develop a version of the converted program for UNIX systems and Macs (yeah, port-back !). So I stuck with OpenGL and am very VERY happy with it...

As everybody on this board, I just hope that the ARB won't make the mistake of not improving OpenGL constantly...

Regards.

Eric

P.S. : if I had to do Windows-Only programs, perhaps I would use D3D...

TheGecko
04-10-2000, 06:42 AM
Thanx for the replies guys...I do respect your opinions of coarse,but that's what they are....just opinions.What I was looking for was maybe some benchmark tests or something to show that OpenGL is truly better than Direct3D. What I found out from other message boards was that people hated DirectX just because it's a Microsoft product (which,needless to say,is totally unfair)

As I said,I looked at both API's and in my opinion I liked the both of them (I made a particle system in both OpenGL and Direct3D and they both turned out fine.Then again,I love programming in MFC so I prolly like messy API's http://www.opengl.org/discussion_boards/ubb/tongue.gif

Gorg
04-10-2000, 07:50 AM
Well, I don't have a real benchmark but Tim Sweeny(Unreal) is saying everywhere that Direct3d is faster than opengl on windows.

I believe him, because the Unreal Engine is fast like hell and has a bunch of nice features.

But, you have to think that the code will be as fast as the programmer can make it!. If you worked with opengl all your life and try direct3d, well, the direct3d code will probably be slower than the opengl code.

Humus
04-10-2000, 01:01 PM
You should also consider that how fast an OpenGL app or Direct3D app runs depends a lot of how well the drivers are written for each API. Some graphic board are better performers in OpenGL and some in Direct3D depending on which API the developer team had most in mind while developing it, and a lot of which drivers they prioritize to optimize.

Roderic (Ingenu)
04-10-2000, 11:14 PM
I've tried both Direct3D and OpenGL, beginning with D3D.
I agree with all.

I want to point out, that *if* you think microsoft is having a monopole, and that you don't want it to continue having one, you mustn't only support MS OS.

Because OpenGL is platform indepent, you might want to use it.

About benchmarks, I can tell you for sure that OpenGL is more friendly to non standard architecture than D3D.
D3D devellopers don't follow all the directives (late directives) from MS about the begin and end, killing rendering on scene captures cards like PowerVR.

Because the scene captures/tile rendering cards are really nice (see the Dreamcast) and more efficient than traditional architecture, you might prefer to use OpenGL to use them efficiently.

With nVidia pushing OpenGL features, I think OpenGL could/would stay a really good API.
Until now no fx can be achieved in D3D than can't in OpenGL.

One other thing I want to point out, is that the OpenGL state machine has a scheme, while MS Direct3D looks like a black box in which you don't know what happens, making it harder for you to speed up your engine.

This is not only an opinion.

MikeC
04-11-2000, 07:00 AM
Gecko, no benchmark will prove that OpenGL is better than D3D, or vice versa. OpenGL and D3D are specifications for INTERFACES, not implementations. Benchmark performance will depend on a combination of hardware, application design and (ESPECIALLY) driver.

My 2 cents:

1) OpenGL is extremely portable. D3D isn't.

2) OpenGL has conformance specs. D3D doesn't.

3) OpenGL is stable - most functions will do nothing if an error occurs. D3D can do ANYTHING if an error occurs.

4) OpenGL is well-behaved. D3D isn't. When I was using it (around DX5), it didn't allow any GDI call while the drawing surface was locked. So if you hit a debugger breakpoint inside drawing code, your machine did an immediate hard reboot. Nice.

5) OpenGL code is small, readable, consistent, clean, easy to learn and just very nice to work with. DirectX is the ugliest interface I have ever seen in around 10 years of programming. Okay, this is just an "opinion", but to me it's an order of magnitude more important than any slight benchmark differences. I program graphics for fun, and at the end of the day OpenGL is fun and DirectX is not.

Couple of other points:

About Tim Sweeney's comments - the performance difference for Unreal was, AFAIK, largely due to some texture management issues. Unreal did a fair amount of procedural texture generation, so the DX ability to directly access texture surfaces made a sizeable difference. Fair enough - I'm looking at procedural textures a lot myself - but this isn't a typical app, and there were good reasons why OpenGL doesn't allow direct access to texture mem. (It places major constraints on drivers/hardware; optimizations such as 3Dlabs' virtual texture management just wouldn't be possible.)

I'd add more, but this has all been said before and will all be said again, and I really doubt that it's going to change anybody's mind.

Closing thought. I know lots of people who use OpenGL and like it, and lots of people who use D3D and like it. I don't know ANYONE who has used both APIs and prefers D3D.

04-12-2000, 12:43 PM
Microsoft is illegal against the anti-trust-law, and has very high risk about its future. How can we use API of such a company? Due to illegal Microsoft, any additional function to its OS can be illegal.

Using such API implies the death of your project.

In fact, many companies cancelled the order of Office2000 since its arogant and illegal anti-competition methods.

04-12-2000, 01:03 PM
OpenGL is much faster than Direct3D if the video board supports Transform & Lightning.

Most video cards will support Transform & Lightning in about 6 months, and they will support more OpenGL hardware specs.

OpenGL is the future.

Gorg
04-12-2000, 01:11 PM
Originally posted by skdir:
OpenGL is much faster than Direct3D if the video board supports Transform & Lightning.

How can you say that? Directx 7 support hardware T&L.


OpenGL is the future.

hmm... if only the ARB would be little more faster and flexible...

TheGecko
04-12-2000, 01:13 PM
Hey skdir,

As for your first post,you're stating that Microsoft will fall.Regardless to what you have set,this is not going to happen anytime soon.(actually,not for a long time) So whether Microsoft will be split up or whatever,there will always be a Microsoft.
(And ,no,using the Microsoft API is not illegal.And if you think Microsoft is dying then why are they still selling Windows2000 which is as stable as linux?)

As for your second post,DirectX 7 supports T&L so this basically destroys your second argument.

And OpenGL is the future to those who like OpenGL and DirectX is the future to those who like DirectX.This is ,once again,a totally opinion based statement.

[This message has been edited by TheGecko (edited 04-12-2000).]

04-12-2000, 01:35 PM
>Regardless to what you have set,this is not going to happen anytime soon.(actually,not for a long time)

Wow, that is your illusion. How can a company survive violating the law?

Did you read the conclusion of the law? No one can criticize the logic and evidences of the conclusion, while Microsoft still insisted on innocent holding its illusion. Microsoft behaves as if it is the owner of the country.

More than 100 law suits are waiting. Not only in USA. There will be a big anti-trust-law suit in Europe, soon.

Unless Microsoft will seriously make plans to follow the law, it is surely dying.

>And ,no,using the Microsoft API is not illegal.

But good supports are not expected. Microsoft is now a certified monopoly. Any additional functions can be considered as illegal for a monopoly. No way for a monopoly to support an illegal business.

>As for your second post,DirectX 7 supports T&L so this basically destroys your second argument.

You did not read my sentence? I did not wrote Direct3D does not support Transforming & Lightning.

>they still selling Windows2000

Many dying companies are still doing business.

MikeC
04-12-2000, 02:23 PM
skdir is, I think, massively overoptimistic. Microsoft is not going to go away any time soon, and the antitrust proceedings don't really have any relevance to DirectX. It's not an illegal API, it's just a bad one.

I'd also agree with Gecko that T&L isn't a deciding issue. Although the fact that hardware T&L could be done in OpenGL right from the start, whereas in DX it had to wait for Microsoft to explicitly add it as a feature, might suggest something about the relative merits of the two architectures.

Also, remember that DX doesn't have conformance specs, so the fact that DX "supports" a feature doesn't mean you can actually use it. I think the D3D API advertised the Phong lighting model as far back as DX3, but last time I looked it still wasn't implemented.

Lastly, although MS isn't going to go away, their stranglehold on the desktop is starting to crack. You might write everything else off as "opinion" (what do you want, divine judgement?), but if you want to maximise your potential user base then a platform-independent API that works on Linux, Mac, BeOS, Solaris, Amiga, PS2 etc etc is a very real and very concrete benefit.

Humus
04-13-2000, 10:48 AM
Yeah, i agree, we are probably not going to get rid of microsoft (but i surely want it to happend) ...
However, about T&L and such things ... the main difference here between OpenGL and Direct3D is that OpenGL was formed without thinking to much about what was actually in hardware. D3D is revised with every new generation of hardware to better suite the current situation, while OpenGL is a general solution of 3D grahics. OpenGL was done with the developer in mind, while D3D was done with the hardware in mind ... that is, the current hardware, not the future hardware. That mean like now that the T&L unit was implemented in the GeForce, OpenGL as a general solution to 3D graphics could imediatly use it, while D3D had to be revised to be able to use. This is only because Microsoft had presupposed that the CPU should do the transforming and lighting. SGI didn't make such assumptions, they thought of what kind of tools do the developer need to make powerful graphics easy and efficient. No thoughts about what was in hardware at the moment. This made OpenGL very complete all from the start and it has now gone from version 1.0 to 1.2 in almost 10 years. DirectX is soon coming in version 8, and it is still a much younger API!
This is the main reason why OpenGL rocks and D3D sucks. OpenGL is done with the developer in mind, D3D is done with the hardware in mind. This of course might make give D3D a slight edge over OpenGL in performance some times since it done to fit the current hardware. But i makes D3D programming a pain in the ass. It's like you get best performance of programming in assembler, but 99% of the people out there prefer something like C/C++ because it gives you much simplier tools for the developer to do powerful applications. And since C/C++ like OpenGL is a general solution, it doesn't lock you to a certain environment.

I also want to add my own experience:
Like 2 years ago when i first began to do to some 3d programs i looked for an API. First i considered DirectX, but it seamed rather complex. But then 3dfx was king of the hill so i check about there homesite so see if there was any information about programming for 3dfx. I found the Glide SDK and checked some info about it. It looked rather easy to use so i bought a Voodoo2, downloaded the Glide SDK at a couple of megabytes and started to code. I was up and running my first hardware accelerated program in an hour. And i liked it. But there were the problem that it would of course only run at 3dfx hardware, that was bad. But i sticked to Glide as long as kept had my Voodoo2. Later on when i thought about upgrading, the Voodoo3 spec was rather dissappointing, so i thought about buying an non-3dfx card, and last summer i bought me an G400. This made me again look for a API, and my thought was that i might be time to learn D3D. So i downloaded the DirectX 7 API at some 128 Megabytes (yes, i am a lucky guy with 10 Mbit/s Ethernet connection ...) and started to read some documentation. After reading x^18 pages of docs i still didn't have o clue how to get a triangle on the screen. So i searched the web for some simple example programs, but they seamed to be hard to find. So i read more docs and after x^18 more docs, lots of crasches and onehundredandfiftyeleven reboots my first DirectX app saw the light of the day. It changed the resolution to 640x480x32 ... but i still wasn't able to draw! I checked the examples included in the SDK and found out that the simpliest app was at 2500 lines of code, and it did only draw a rotating green triangle. But i thought "hey, this is microsoft code ... let's clean the mess". So i started to clean up all i found unnecessary. I was able to reduce it to 1800 lines, but that was still far to much for me to get an survey of. So i gave up ...
After some time i thought ... hmm, what about OpenGL then? So, i started to read the documentation of OpenGL functions which came with VC++ 6.0. It seamed a little hard at the beginning ... but after finding some examples on the net i was up and running a simple app, but i got into a lot of problems now and then. But, later on i found out that this wasn't because OpenGL was badly designed, it was because the microsofts documentation included in VC++ 6.0 was badly designed. So i bought the "OpenGL SuperBible" book and made fast moving progress and i took me only a couple of days to solve all my problems a had earlier and have now progressed to creating advanced effects like reflection, shadows and such ... just in a few weeks!

So, finally, my choice is easy, OpenGL is heaven. I hope DirectX suffers when it burns in hell.

Thank you for the word.

/Humus, happily married to a wonderful API.

TheGecko
04-13-2000, 01:02 PM
Wow...some good replies here. http://www.opengl.org/discussion_boards/ubb/smile.gif

OK to start,sorry skdir...I misinterpreted your sentence.I thought you meant that there was no T&L in DirectX.My bad.

Now,as for DirectX being a good or bad API,that is all just what your experience was and I do respect all your opinions.I've tried both API's and I love both of them to death.Yes,DirectX might be a bit of a mess (I admit it) but once I sorted through all that,I am now able to write 3D programs easily with both APIs.

I'm not going to be one sided here.I know that I'm prolly digging my own grave ranting about how good DirectX is on an OpenGL message board http://www.opengl.org/discussion_boards/ubb/tongue.gif . I for one do not take sides in such matters since BOTH API's have their ups and downs.

One more thing you all overlook is that DirectX is going through constant revisions all the time is because there are alot of stuff that needs to be upgraded all the time. DirectX does not mean Direct3D and DirectDraw only.Miscrosoft has to worry about DirectSound , DirectInput,DirectMusic,DirectVoice etc. This is prolly one of the main reasons why DirectX is messy.The DirectX team have too many things to worry about.

Off topic,I don't understand the hatred towards Microsoft on this board (and many others) This is just one of the many things that happen in the USA.When a company grows big,they tend to get sued alot more.It's a natural thing.(Look at AT&T and some other gas company,I forgot the name) They grew big,they got sued.Just another life cycle. Am I saying Microsoft is innocent? I don't know.I haven't heard their side of the story.I for one am a big Microsoft supporter.I enjoy programming for Windows. That's just me. I also like Linux but to be honest,I don't see Linux distributions being an everyday operating system in an average American family's home anytime soon.It's too high tech and there are not enought drivers for certain hardware.

(Once again,I am not trying to start an OS flame war here! http://www.opengl.org/discussion_boards/ubb/smile.gif I was just making an observation that there is this Anti-Microsoft atmosphere going on here.)

Humus
04-13-2000, 02:04 PM
The reason DirectX is going to constant revisions is because it is based on the current hardware situation, and not based on what kinda tools the developers would like to have to make powerful graphics. But i agree that DirectX is better in the way that you have everything in it, not only the graphics part. But i saw a headline here at opengl.org lately which said the was some sort of "OpenML" API comming which should if i understanded it right include OpenGL but also have audio/input and such that DirectX has but not OpenGL. That would really be great.
About the Microsoft hate ... yes, i don't like Microsofts behavour against other companies and against customers. But i don't say that everything they do is wrong and awful. I run Win 98SE/2000 dualbooted and i write all my docs in Word, since windows got the best user interface (but could be more stable and have an better system architecture) and word is the best wordprocessor out there. I do surf the web with explorer too, and write my mail in Outlook. But, microsoft has to think more about security and less about functionality (it's like 99% of all computerviruses is because of security issues in microsofts products), more about future possibilities and less about current situations, and espescially more about customers and less about profit. And it would have been nice if they played a fair game too. They should compete with competetitive products and pricing and not with monopoly, power, money, doubt and uncertainty, breach of law and lies.

MikeC
04-14-2000, 01:13 AM
Gecko, you're arguing that DX is necessarily messy and unstable because it includes Direct3D, DirectSound, DirectMusic, DirectInput, DirectKitchenSink etc etc. I don't think that holds water. Remember, DX is essentially a hardware abstraction, and (aside for some grouping, such as DDraw/D3D and DSound/DMusic), these APIs are dealing with physically separate bits of hardware. So if DirectSound is getting broken or messy because of DirectDraw changes, their architecture and/or implementation is seriously screwed up. The whole POINT of COM is that implementation is supposed to be modular and transparent.

As to the anti-Microsoft sentiment on these boards... when programmers want to use a mature, scalable, portable industry-standard technology, and Microsoft does its level best to stop them and force them into using its own messy, limited, badly-designed, proprietary technology, said programmers tend to get a tad annoyed. We want to use the best tools for the job, they want to make as much money as possible out of us and everything we do. There's a direct conflict of interest here. Until MS starts giving people what they want, rather than what MS wants us to have, there's going to be hostility.

(see http://www.vcnet.com/bms/features/3d.html for some slightly biased background)

As for the whole monopoly thing, personally I think they're a bunch of crooks, but that's getting WAY off topic for this forum. Let's not go there.

Eric
04-14-2000, 05:06 AM
Hey MikeC, in you list of OS you forgot GEM that still runs perfectly on my Atari Falcon 030....

Well, OK, I have nothing to say....

Eric

TheGecko
04-14-2000, 09:11 AM
Thanx again for all your replies.

MikeC,I did admit that DirectX is messy but I never did say it was unstable.Perhaps the programmers are more prone to error because it is messy.That might be it.I'm not sure.I certainly had my share of problems with bot API's and I can't really say one is better than the other.
And you misunderstood what I was trying to say.I know that all the DirectX components focus on separate bits of hardware.What I meant to say was that the Microsoft DirectX TEAM had to worry about all different parts of the API.They've got alot of work on thier hands and the ARB will too pretty soon because they are going to be creating the OpenML.Now if this task was left to just one company it will prolly be a messy API too.But because 5 or 6 different companies are in this together it will prolly be as "clean" as OpenGL.

Now,a question to all of you.If you had a corporation,wouldn't you be doing ALL that you can to see to it that you remain on top? (I don't want to carry this conversation on because I've already heard all the arguments from both sides,the Linux comunity and the Windows comunity,and I'm telling you both sides had really good arguments.But no side did win.I just wanted you guys to answer this little question so you can see it from a software corporation's side that relies on it's OS as it's source of income and not from a free OS)

MikeC
04-14-2000, 10:48 AM
:: the Microsoft DirectX TEAM had to
:: worry about all different parts of the
:: API.

Then they should have allocated more resources (it's not like they couldn't afford it), or recognized their limits and stuck to doing one thing well instead of ten things badly.

:: the ARB will too pretty soon because
:: they are going to be creating the OpenML

OpenML isn't being created by the ARB.

:: If you had a corporation,wouldn't you
:: be doing ALL that you can to see to it
:: that you remain on top?

Maybe, though I like to think I'd stay within the law. But this argument is silly. If I was a shark, I'd do ALL I could to eat swimmers, but as a swimmer that doesn't mean I have to tie a raw steak around my neck and jump in the sharkpool. Just because the shareholders are happy doesn't mean the users have to line up meekly and take whatever they're given.

BTW this isn't a Linux vs Windows thread. I program using MSVC on Windows, and on the whole I quite like it. (Dismal STL support being the exception.)

TheGecko
04-14-2000, 11:03 AM
Oh,the ARB isn't moderating this? Hmm..must've been misinformed. My bad http://www.opengl.org/discussion_boards/ubb/smile.gif

Anyway,thank you all for your replies. It was nice that no flame wars happened here. One thing that I did diduce was that the whole Miscrosoft/Linux DirectX/OpenGL thing is mostly opinions and nothing more.Like what John Carmak wrote in his plan file (thanx for that link to that article MikeC) that there is less than a 10% performance between the 2 api's.But I do agree with him that a "cleaner" API is better than a messy one.

And to skdir,there are many articles on the net that state the Microsoft (and Mac) are not going away anytime soon.Check out this CNN article http://www.cnn.com/2000/TECH/computing/01/13/linux.reasons.idg/index.html
Besides.If you think of it logically,a half-trillion dollar company (or whatever they're worth right now http://www.opengl.org/discussion_boards/ubb/tongue.gif ) isn't going to disappear.Not for a VERY long time.

Before I leave you all,I wanted to ask this one more thing.If Microsoft played by the rules (which I think they do in a buisness sense) and they were less "ruthless" and had a cleaner DirectX API,would you like them then?

Humus
04-15-2000, 12:18 PM
If microsoft prioritized the customers over thier profit (or at least as much) i would certainly have no problem seeing them being a market leader.

04-15-2000, 09:10 PM
Too much control of Microsoft resulted in the legal risk. Except that, I am open. I will use API if I am comfortable to use it.

MikeC
04-16-2000, 10:23 AM
Agree with Humus. I want to see them competing on quality, rather than on inertia (FUD), marketing and bully tactics. And more than anything else I want them to comply with good, solid, mature industry standards.

If somebody can get Bill out of the driver's seat, and tone down the pathologically macho culture that pervades MS, I can certainly see them becoming a "good" company in a few years' time. Just look at IBM, who were in a similar position not so long ago.

Shayde
04-16-2000, 06:17 PM
Just thought I'd add my experiences to this discussion although most of what I have to say has already been covered.

I worked on a commercial 3D application last year. Because we wanted good performance in software as well as hardware we decided to go with Direct3D as the 3D-API. I had no experience with either D3D or OpenGL prior to this. I used Microsoft's DX6 SDK and found the documentation good. Soon I was away. Even though I found the API a lot of work to use and long-winded I finally managed to get a full lightmapping 3D engine working from it.

I always intended to learn OpenGL just to know what all the hoopla was about but it was only last month when I decided to port the 3D-editor portion of the project over to OpenGL just to see what it was like.

I have no idea how fast OpenGL is compared to D3D but one thing I can say, it is a DAMN site easier to use and faster to produce results with than D3D. I spent a lot more time coding the meat of the program than dealing with the API. Even a simple task of setting the video-mode and getting a Z-Buffer takes several pages of code in D3D - in OpenGL it is only a few lines. Texture-allocation was also several pages of code, all of which was replaced with OpenGL's BindTexture, glTexImage2D, gluBuildmipmaps calls.

Even ALT-TAB support was painless in OpenGL, something I never managed to get working properly in my D3D app. Already I have implemented things in my OpenGL version I never had the chance to with the D3D version because I spend a lot less time wrestling with the API and more time concentrating on producing cool routines.

Cross-platform compatibility is just the icing on the cake. I have no interest in going back to Direct3D. Faster or not, I am MILES more productive with OpenGL and the importance of that can not be overstated.

Ciao...
SHAYDE

Roderic (Ingenu)
04-16-2000, 11:38 PM
That's nice to see someone working for the industry here.
Most of us (I think) are students or 3D lovers, and we tend to forget that in the industry, money rule.
So if OpenGL takes less time to master and write apps, then it cost less money and is a good choice.
Portability is nice if you've already plan to support another OS than windows.

I've to say that MS windows is not as bad as we are all saying, the proof : we're almost all using it !

If you really dislike a product or if the products really (excuse me) sucks, you'll probably not use it.

I've to say that I use BeOS @ home and windows @ work.
This is why I prefer OpenGL (and OpenML), because my apps run on my favorite system & the most sold one.

Windows is 'the' PC OS so you're building Apps for it, it's a market matter.
You're making apps to get money, not to spend money.

That's all http://www.opengl.org/discussion_boards/ubb/smile.gif

XBCT
04-18-2000, 04:13 AM
To Ingenu:I think nobody of us uses MS-Windows īcause he thinks it is a good OS.
The fact is:Even with Linux(which is far superior if one can use it)and many other
OS,you HAVE to use Windows īcause due to Gates Domination of the market all good apps and especially Games run under Windows only.

The really bad thing about MS is,that they donīt accept any technologies or apps from other companies,only īcause they arenīt from MS,even if they are far superior.If some Company has a new technologie which is good,MS trys to buy it and if this isnīt possible they try to bully and destroy these companys.
You can see easily what happens to all the firms which donīt act like Gates wants them to act and which Gates cannot buy for money.(Netscape!!,Symantec,....);

lgrosshennig
04-18-2000, 12:56 PM
Hi there!

First of all, I have not read the hole thread, and therefore I am sorry.

I have done an actually selling product that uses DirectX as well as OpenGL.

Due to my research on both API's I figured out the following:

1. You can actually archive the same quality with D3D as OpenGL as with OpenGL (at almost the same speed, but that is driver dependend).
2. You can get the same speed with OpenGL as in D3D with the equaly quality settings (driver dependend).

In general, I agree that OpenGL is the "cleaner" API, but it is the older API as well. That means OpenGL is a "structed API" that dosen't really take new hardware inovations into account (there is NO support for phong shading at all).

Once you got familiar with DirectX its a piece of cake to write hardware accelarated 3d applications with it.

To make things clear, I love OpenGL. But if you do your homework Direct3D isn't THAT bad eighter (almost I am thinking).

There are a lot of "blinded" MS hatred's out there (no offens intended). But sometimes DX is great and sometimes it's stupid (like OpenGL).

This is at least I am thinking!

Blame me if you want (I don't care, because I have a couple of years 3D programming background, so have you?)

With kind reagrds,

LG http://www.opengl.org/discussion_boards/ubb/biggrin.gif

and may the vector be with you!

lgrosshennig
04-18-2000, 01:05 PM
Hi there!

First of all, I have not read the hole thread, and therefore I am sorry.

I have done an actually selling product that uses DirectX as well as OpenGL.

Due to my research on both API's I figured out the following:

1. You can actually archive the same quality with D3D as OpenGL as with OpenGL (at almost the same speed, but that is driver dependend).
2. You can get the same speed with OpenGL as in D3D with the equaly quality settings (driver dependend).

In general, I agree that OpenGL is the "cleaner" API, but it is the older API as well. That means OpenGL is a "structed API" that dosen't really take new hardware inovations into account (there is NO support for phong shading at all).

Once you got familiar with DirectX its a piece of cake to write hardware accelarated 3d applications with it.

To make things clear, I love OpenGL. But if you do your homework Direct3D isn't THAT bad eighter (almost I am thinking).

There are a lot of "blinded" MS hatred's out there (no offens intended). But sometimes DX is great and sometimes it's stupid (like OpenGL).

This is at least I am thinking!

Blame me if you want (I don't care, because I have a couple of years 3D programming background, so have you?)

With kind reagrds,

LG http://www.opengl.org/discussion_boards/ubb/biggrin.gif

and may the vector be with you!

Alan W
04-20-2000, 06:41 AM
There have been a lot of great points brought up about why OpenGL is better than DX and vice-versa. I am an OpenGL lover, so let me add to why I think OpenGL is better...yes this is an opinion, but most are true.

1. Yes, DX may be faster than OpenGL, and vice-versa, but the fact is, which ever one is faster only has a little bit of an edge. If you have a half-way decent system, your not going to feel the difference in a game written in DX and in OpenGL. Theres a lot in your system which can affect the speeds of wheather OpenGL runs faster, or DX does; and, with DirectX, even if you do get a little bit of an edge on performance, are you really willing to sacrifice clean code, easy learning curve, and less time to make the 3D app just so the app runs a little faster? I can almost promise you the end-user won't feel the difference, so you have to think with yourself in mind: the programmer, what do you want? If you want the development of whatever your making be a painful experience with a lot of reference books handy...go with DirectX. If you want the experience to be smooth sailing...go with OpenGL.

2. Microsoft's death = DirectX's death. Now I know Microsoft is going to be around forever, even if they aren't a monopoly far in the future, they will still be there. However, you never know: what if some freak accident happens and Microsoft loses a lot of money, well, if you were working on a DX app at the time and Microsoft goes out of business...your pretty much screwed. Now I know this will never happen, especially since Gates himself can fund his company if it ever even comes close to dying; but, its just the thought in the back of your mind, the fate of your DX 3D app depends on the fate of one company....not cool. Someone said earlier that Microsoft's hold on the PC's desktop is starting to crack. This is definetly true. Microsoft can still compete with the compition, just not on the level they would like to. There are a lot of other great operating systems coming out. I know theres a lot of anti-Mac people out there, but I think with the release of MacOS X, it will bring in big sales, and will just be another problem for Microsoft (especially with its great developer support now). I have always stayed away from Macs, but when OS X comes out, I am actually thinking about picking up a copy (and by the way: in case you didn't know, OS X's graphics is going to be completely built on OpenGL, and its core is based on UNIX...very stable). Also, look at Linux. And I know, Linux isn't going to be on the average PC user's computer within the next 10 or 20 years, but Linux is very powerful, and is popping up in the corporate workplace, schools, etc. Linux combined with OS X are going to attract some people. Microsoft will still be in the game, but they might not have their OS on 92% of all computers or whatever it is, I promise you that number will drop serverely within our lives.

3. Everyone is giving reasons as to why Microsoft keeps having to come out with newer versions of DirectX every so often. Well, many people blame this on their structure, and because they have to deal with DirectInput, DirectMusic, DirectSound, etc. One person said they should concentrate on making one good thing instead of 10 bad things. I think this is true; DirectX is a product, and if they have to constantly come out with newer versions with the same messy code, then they have made a bad product, and should consider redisigning it, but knowing Microsoft, they never will. Just because you like Microsoft or you like DirectX, you can't make up crap in the defense of Microsoft because you don't want to admit they make a bad product in comparision to OpenGL. On a side note, I'm not too big a fan of COM in the first place. OpenGL is all one API. In OpenGL, you can use glu and glut, but thats nothing like COM, those are just libraries which add to OpenGL. However, in DirectX, COM gets confusing, and is part of the problem with it that makes it harder to learn and harder to read.

4. All these DirectX people keep throwing performance and UT in the face of OpenGL programmers. However, even if DX is slightly faster...think about what your giving up in DX that you could have in OpenGL:
-OpenGL has portability to any operating system, DX doesn't
-OpenGL is much easier to learn, DX can be very complex and confusing
-OpenGL can be...and often is....a LOT less lines of code than directx

Now I'd like to share with you my personal experience with both of the APIs. Yes, this is just an experience and I know a lot of people have given their experience of why they like one API vs. the other...but Microsoft's DX is still in compition with OpenGL, and if I have a better experience with OpenGL than I do with DX, it means Microsoft has produced a bad product. Experience and opinions are really what matter here because Microsoft has to produce a good product to change my opinion and my experience.

I have been programming with 3D graphics for about a year now, and I have been programming for almost 7 years (No, I'm not in college, I started when I was 9, I'm a few months away from being 16). When I decided I wanted to go into the world of 3D graphics development, I looked at three APIs: Glide, OpenGL and DirectX. Glide I threw out immediately because 3dfx isn't the biggest grahpics card company, and is far from it...so I knew Glide wouldn't be popular in the future. I looked into DirectX first. I thought OpenGL would be messy and hard to understand since it doesn't have one official company its produced by. I tried learning DX and I picked up a few books. After months of reading, I was still lost. I thought it was just me and kept on going. I finally blamed the API. It was hard to understand, had messy code, and other examples of basic things that I found online were hard to comprehend and just didn't make any sense to me. I went into this for the fun of it, but I soon found DX to be no fun at all. Then, I looked into OpenGL. I was a little uneasy going into it since I've been programming in Windows all my life; but, I fell in love with it right away. OpenGL was easy to understand, and produced complex things from very simple code. I picked up two books: OpenGL Superbible and OpenGL Programming Guide, and they were both able to explain code much better. I was amazed that in OpenGL, all you have to do is call a few functions with different values and arugments and boom---you have a very nice, very cool 3D app! After a few weeks of reading into OpenGL, not only did I know how to draw very cool and interactive scenes, but I also knew about general computer graphics and how they work on any system...not just a windows system. I am very satisfied with OpenGL, and you may say, "Well DX is faster", and sure...maybe it is faster, but OpenGL offers things I wouldn't sacrifice for speed...and for the DX programmers out there: I suggest you pick up a book on OpenGL, you won't be dissapointed.

One last point I'd like to make: You can say, "DX is the future" and "OpenGL is the future", but what it really boils down to is this: OpenGL isn't necessarily the future, but its guaranteed to be there; in addition, DirectX isn't necessarily the future either, and is not guaranteed to be there.

You can battle all you want about how Microsoft is always going to be with us, but what I just said above is true and there is no denying that. If your still not convinced, read my points above about Microsoft's future, and other points that were made on this message board...bottom line is their monopoly is starting to crack, and we're seeing other operating systems emerge.


[This message has been edited by Alan W (edited 04-20-2000).]

artur
04-26-2000, 08:45 AM
Originally posted by TheGecko:
This has been the starting point of countless flame wars on many message boards. But I have still found no answer to this very questiong.No one has given me one good reason why OpenGL is better than Direct3D.

To start off,I can honestly say that DirectX FAR surpasses OpenGL in terms of 2D graphics.That has already been established. But why is OpenGL better than Direct3D? From what I can tell,they both do the same thing on the same grphics cards and both of them have great API's (totally based on my opinion)The only thing going for OpenGL that I see is that it is platform independant. However,to those programming their 3D applications for Windows,I can't see why they won't use DirectX.What better API to use for windows?

I am not trying to start a flame war mind you.I'm just seeking answers http://www.opengl.org/discussion_boards/ubb/smile.gif

=============================================

Hello !
Forgive my English !

I Have a little problem to solve :

I'm developing a program to perform
several 2D distortions (warping) on
medical Images.
Speed is very critical
for me , because I want to make this at
a 20 frames per second rate.

Thank you very much !
DirectX can help me in this case ?

Is Possible to make this with OpenGL?

harkal
04-27-2000, 01:21 PM
U can use both OpenGL and DX
but I think for your case DX is better
for you...

harkal
04-27-2000, 01:45 PM
about openGL vs Direct3D

OpenGL FOR EVER...

only the fact that it is procedural and
D3D is Object Oriented... gives openGL
an advantage...

OOP is a revolution in programming but
not the best thing for every application...
to draw a triangle I dont need to create 10 objects... and write 400 lines of code...

rgpc
04-30-2000, 03:35 AM
*Phew* what a discussion... 8P

OpenGL is easy to write, portable, fast, has Nurbs - which I can't say I remember seeing in DX7 and Runs under NT.

DX is NOT easy to write, NOT portable, IS fast (lets face it they probably both use something like Glide anyway...), will change COMPLETELY from one version to another (what the h**l happened with V7?). BUT, it does give you a really nice set of API's for accessing sound, networking, Force feedback etc.

I would think (a bit of speculation) that that is why Q3A uses BOTH.

As for Microsoft, they SUCK. (Bring it on...) I recently read a quote where "Poor" ol' bill was stating that splitting the company would mean a decrease in the productivity of the company. Boo hoo. He stated that "we couldn't have made Windows if the Windows team and the Office team didn't work together..." which is just a statement of how "back-door-ish" office is. Remember those pretty blended title bars in Office 95 that you couldn't do as standard in Win95?

Perhaps splitting the company would make Windows a truly "open" system. And who cares if it takes them longer to rebadge Win2000 as Win2001 so we can have a transparent cursor? Windows is 10years behind the rest of the OSes anyway...

Personally I liked the "release the code" idea - maybe then we can all work on fixing some BUGS.

BTW - Anyone know how to get rid of the 3dfx logo when OpenGL starts up?

04-30-2000, 09:24 AM
OpenGL is having/going to have a HUGE impact on graphics programming as a whole. Here R my reasons why:
1. OpenGL is literally 10 times easier that DirectDraw/Direct3D
2. OpenGL offers the same functionality as DirectDraw/Direct3D.

Now these are two simple FACTS that mean a hell of a lot. Why? Think about this... As programmers both new and old start the enevitable search for a graphics API, they will be faced with the following choice.
DirectX
or
OpenGL

Now just to make things clear, In professional games development(for example) many companies will have to deal with some way of accessing the hardware directly for things other that graphics, ie. Sound ,Networking, input etc.
This means that many of them at this stage are using both API's. Why would any company(or person at that) choose to follow a path of graphics programming which takes TEN TIMES longer and is more complicated, when they have deadlines to meet? It is for this reason that OpenGL WILL end up being the dominant graphics API. But Direct X will still be used for audio input etc...
UNTIL a new API dealing with these things emerges. And by the sounds of it's already in the pipeline in the form of OpenML. When this is released I feel, it will be BYE BYE for DirectX........
Davior

MikeC
04-30-2000, 02:09 PM
A lot of people, including the last poster, seem to have the idea that OpenML is going to render DX obsolete. As far as I can make out, this just isn't true. OpenML is aimed at merging video and audio streams together with realtime graphics; the main emphasis appears to be on synchronization problems and managing concurrent access to things like the framebuffer. It's not aimed at game-style dynamic 3D audio, and AFAIK it doesn't even touch on input.

If you want a clean crossplatform audio API, OpenAL is the obvious choice for OpenGL afficionados. Input is trickier, because everyone seems to feel the need to integrate their XP input code into all-singing all-dancing gfx/audio/whatever APIs, rather than creating a focussed, standalone, reusable input library. SDL is looking promising though.

05-02-2000, 08:19 PM
OpenGL is literally 10 times easier that DirectDraw/Direct3D

I'm glad you were able to quantify the ease of use factor, as no one else is. I've never considered DirectX "hard". It's just another library. And it's not necessarily messy, it's just pseudo-conforming to the COM interface. That in itself is a bit different, but allows some neat binary upgradability stuff.

Besides, "real" programmers don't think DX is hard. =)

OpenGL offers the same functionality as DirectDraw/Direct3D

Not exactly. If you plan on doing any 2D stuff in OpenGL, you're digging your own grave. You're practically asking for sub-1 FPS, as damn near zero drivers have any acceleration on this...this bastard child aspect of OpenGL.

There are issues with OGL when determining what all features will be accelerated and which wont... since OpenGL "guarantees" results, you risk having low FPS due to some quirk in the driver. This guarantee has it's merits -- but not in realtime applications, where if it's done slowly, it might as well not be done at all.

TheGecko
05-02-2000, 08:58 PM
Well said Revolver.

I do not know where you got your info from davior but OpenGL does NOT (I repeat,does NOT) come even close to the same functionality as DirectDraw.No way! That's the thing that pisses me off about OpenGL is that it can't handle the 2D aspect of games (or applications).That's why I switched to DirectX.

And what you said about DirectX being harder,well,Revolver took the words right out of my mouth so to speak.I don't find DirectX (including Direct3D) hard at all.Yes it's messy but I understand what I'm doing,just as I understand what I'm doing with OpenGL.This is just an opinion thing once again.

As for the OpenML,well I'm curious to see how that turns out. I personally like programming in DirectX for my input/audio/music/2D so this is going to be interesting.

(As for the whole Bye bye DirectX,that isn't going to happen anytime soon with the release of the X-Box.Because of that,DirectX will be around for a LONG time to come.My only with is that they clean up the API a little so people new to the DirectX API can get into it a lot faster)

john
05-02-2000, 09:45 PM
why is 2d hard in opengl? i've written gui's with buttons and menus and all that kind of stuff purely in opengl. 2d is jsut 3d without the depth... i want a bitmap "here". i put this raster position where i want it, and coyh across the pixels... no sweat. (for example). I really don't understand why people think opengl 2d is hard. I'm sure you THINK there is a reason; I just want to know what it is. I am genuinely perplexed!

cheers
John

Eric
05-02-2000, 09:57 PM
To Revolver :

You said that there are issues in OpenGL with determining which feature will be accelerated or not... I agree.

But does it mean that Direct3D does not have this problem ? That would probably mean that we can go back to use a Matrox Millenium instead of a GeForce (why spending a fortune if D3D accelerated everything !). I believe this issue is ALSO a D3D issue...

Eric

Eric
05-02-2000, 09:58 PM
Now, to Revolver and TheGecko : what exactly do you call "real" programmers ?
If the topic itself did not start a war in the forum, your answer to this question might ! http://www.opengl.org/discussion_boards/ubb/smile.gif http://www.opengl.org/discussion_boards/ubb/smile.gif

Eric

Humus
05-03-2000, 05:41 AM
I agree with John that 2d in OpenGL is not anything harder to do than 3d, it's actually easier. And where the hell did Revolver get that you get SUB-1 fps if you do 2d in OpenGL? That's a pure lie! It may not use 2d capabilities of the graphic card but rather render flatly in 3d (but that shouldn't be any slower), so it can't be slower than rendering in 3d.

john
05-03-2000, 03:50 PM
I don't know what your problem is with determining which features of opengl are accelerated or not. the OpenGL spec says that a conformiing library **MUST** be able to do features X, Y and Z. If the underlying h/w has no idea what some or any of these features are, the OpenGL library MUST do them in software. It's one of the reasons why OpenGL is portable: you can be assured that any opengl client can draw, for example, a textured triangle. Why? Because it's in the SPEC.

I don't know much (nay, *anything*) about D3D, but what I've gathered is that if the underlying hardware doesn't support a feature, then the programmer MUST supply their own software renderer for it, because D3D doesn't want to know. Yes, I realise that this is mapping to the capabilities of the hardware, but... really. Who wants to waste time writing a render library? It's a solved problem! There are tonnes of other interesting problems to worry about then whether your software will work on a taiwanese 0% compatable dodgy video card. Really.

Oh, and about the h/w accel thing... so, OpenGL will do something even if the h/w doesn't want to know about it. If *YOU* want to know about it, try profiling your engine? (Even the SGI documentation suggests this as a good idea. Check out the PDB library as a profiling database)

cheers
John

TheGecko
05-03-2000, 05:35 PM
What I said about real programmers...I meant programmers in the game industry who REALLY know these API's.This was bad choice of words on my part and I apologize. http://www.opengl.org/discussion_boards/ubb/smile.gif

Now as for this whole 2D issue,what revolver said was true.I try to draw an 800x600 bitmap on the screen (running at an 800x600 resolution) and I don't think I even got 2fps! I have no idea how the other guys here in this forum managed their 2D GUI stuff (while doing 3D at the same time) and this has sparked my interest.I used the glDrawPixels function to draw my bitmap. If someone else here has another suggestion (and it works) by all means post it up or send me the info!

05-03-2000, 07:20 PM
The problem is expressed here:

"I was just making an observation that there is this Anti-Microsoft atmosphere going on here"

Why can someone behave as a policeman for Microsoft? Can we allow Microsoft to be treated as God? Yes for either question leads to an anti-democratic attitude, and eventually to be illegal.

To behave like a policeman or God is characteristics of all criminal actions: stalling, wife beater.

Eric
05-03-2000, 10:22 PM
To John :

There CAN BE a problem with knowing which feature is hardware-accelerated. Of course, whatever hardware you are using, OpenGL will draw the scene (as long as you don't use extensions but we can check this when starting the program !), which is GOOD.

The thing is, I designed some cool effects (without using ANY extension) on my GeForce that looked CRAP on a TNT Ultra because of speed issues : the T&L Hardware Acceleration made the difference !

Of course, this is not a real issue as you can render one frame, and check if it was fast enough ! Moreover, even with the same graphics card, PCs never behave the same (different main processors, different mobo, different whatever !).

The point was : it is good to be able to render the same scene on any machine but the fall back to software rendering can kill ! I think on D3D some features are not available if you card isn't good enough (ok, don't flame me if it is not correct, I am not a D3D expert...) instead of emulating them by software...

Well, that's enough for me : why not starting a "Why D3D is better than OpenGL ?" on a D3D forum ?!? http://www.opengl.org/discussion_boards/ubb/smile.gif http://www.opengl.org/discussion_boards/ubb/smile.gif http://www.opengl.org/discussion_boards/ubb/smile.gif

Eric

Humus
05-04-2000, 05:29 AM
TheGecko:
The reason you app runs slow is that you use the glDrawPixels function. This function is slow because all the data is in the system memory and has to be transferred to video memory every frame. You should use lines, triangles and such just as in 3d, and for pictures you should use textures. I would recommend that you scale you 800x600 bitmap to 512x512 or 1024x1024 and load it as a texture.

[This message has been edited by Humus (edited 05-04-2000).]

Alan W
05-04-2000, 10:00 AM
"Real programmers"? Real programmers would not use DX because in DX you worry too much about the code, and producing it. A simple app in DX can be up to 1500 lines of code, while in OpenGL...10 or 20 lines can produce something simple. Real programmers would actually want their apps to see the light of day eventually, and not dig through 1500 lines of messy code. Real programmers would care about the final output of their scene, and instead of being stressed out over working 24-7 at the computer trying to make something in DX, they would think about the final output while writing the program, and this is easier in opengl since it makes more sense; opengl makes more sense because it doesn't use COM...

TheGecko
05-04-2000, 02:23 PM
Humus: I understand that I can do all my 2D functions by pasting them on a 3D polygon as a texture map.But you are all still missing my point.I DON'T WANT to use a 3D polygon. My whole point is the 2D aspect of OpenGL and not what methods I can use to work around it. Say I wanted to program a game based entirely on bitmap (think Command & Conquer or PacMan) I would not use OpenGL to do all this but rather DirectX. (I'm not flaming you.You're right about using a textured polygon but what I'm getting at is doing 2D in OpenGL is not a good idea.)

Alan W: Your argument makes no sense because most of the gaming industry uses DX and to say that they are not "real" programmers (according to my defenition) would be an entirely false statement. http://www.opengl.org/discussion_boards/ubb/smile.gif

I don't even know why this post is still going on http://www.opengl.org/discussion_boards/ubb/tongue.gif I've already gotten my answer from all of you and concluded it's all opinion based.Nothing else.

Humus
05-04-2000, 03:35 PM
TheGecko:
Well, if you can tell me what is the difference between a bitmap and a texture i could understand you problem. If i would do a bitmapbased program i would use textures, and not some bitmap function since it is much slower ... even if i would have done it in DX. The only difference is that a bitmap is resident in system memory, but a texture is (usually) in video memory. The limitation here is that textures has to be 2^n x 2^m, but not so many graphic boards today supports non power of 2 textures anyway.
I can't see why there should be any problem of doing 2d in OpenGL, i have never gotten into any problems.
And the reason that most game developers are using DX is that they (as the rest of the industry) is following microsoft blindly. Stick with microsoft and you get your money ... it's just like that ...

Shayde
05-04-2000, 08:28 PM
TheGecko:

Most game developers don't have a choice as to what API they use; it's usually chosen for them by a manager, who is often someone who isn't aware of the differences between the APIs and chooses more for political reasons.

To say most developers choose DX is not necessarily correct, especially in the FPS arena (which is one of the biggest), where OpenGL is almost exclusively used.

Also any products that use one of the Quake-engined games (of which there are a lot) use OpenGL only because that is all the Quake-engines support.

But in the end, as you say, it's all opinion, and makes very little difference. Choose the API you feel most comfortable with. I have; I have used both and all future projects will be using OpenGL.

Ciao...
SHAYDE

05-05-2000, 02:47 PM
OPEN Graphics Library!!
Yes!

Use opengl because it's not microsoft... please use it because MS is being not cool. You do not want microsoft to have a monopoly do yo?????

50 yrs down the road: This is Microsoft House version 4.5...

TheGecko
05-06-2000, 09:47 AM
Thanx for your replies Humus ans Shayde.

Humus:
What I'm getting at is you can't do REAL 2D in OpenGL without a drastic drop in framerate.(When I say true 2D I mean no 3D whatsoever such as pasting a texturemap onto a polygon.)I would think it would be more complex to make a 2D strategy game like C&C in OpenGL using the methods you have described.I would be much more comfortable making games like that using DirectDraw. http://www.opengl.org/discussion_boards/ubb/smile.gif

Shayde:
You are a little misinformed about the games industry.It's not the management that decides which API to use.It's the Lead programmer and he chooses based on what OS he's going to program for and functionality etc. etc(I got this from Game Developer Magazine http://www.opengl.org/discussion_boards/ubb/smile.gif ).And what you said about the FPS is partially true.Quake3 and other games that use it's engine use OpenGL but there are also other FPS games that use DirectX (Unreal Tournament) And besides,the FPS market is just a protion of the games industry.Like I was stating,using true 2D in OpenGL isn't a good idea and this is (prolly) just one of the reasons why most of the industry uses DirectX (DirectDraw specifically) Besides,DirectX is made for specifically for games while OpenGL is made for generally any 3D application (medicine , CAD,games etc) It just makes more sense to use DirectX,no?

I'm not saying I'm pro Microsoft.I'm more open minded and I support both Linux and Windows and both API's OpenGL and DirectX. BOTH have their advantages and disadvantages that make me decide which to use.

My $0.02 (once again http://www.opengl.org/discussion_boards/ubb/smile.gif )

skw|d
05-06-2000, 12:05 PM
Ease of Use
The same time it took me to figure out Direct3D and write a minimal application, I was able to write my own 3D engine in OpenGL.

API Design
I must say that whenever I look at any DirectX code I just say yuck. I was able to teach myself OpenGL, just by looking and some examples and just messing around. As with Direct3D, it was painful going through all the variations I could think of just to get my hardware card to initialize.


Well, on a personal note... it's good to be back on the discussion board. I've missed you guys.

/skw|d
www.QuakeRally.com (http://www.QuakeRally.com)

Shayde
05-06-2000, 06:49 PM
TheGecko: I'd be more than a little surprised if most companies allow their lead programmer to make decisions like that. No development firm would allow a project if the lead programmer decided he wanted to code everything in Assembly under Linux. Those GameDev articles; were they referring to specific (and possibly atypical) companies or in general?

It is true that First Person Shooters are only a subset of the industry, but they are a big subset and the majority of interest seems to be in this area at the moment.

BTB. Unreal Tournament also supports OpenGL.

Regarding using OpenGL for 2D (time to stick my nose in this side of the argument http://www.opengl.org/discussion_boards/ubb/smile.gif ) - you can do pretty much do all your 2D stuff using textured polygons drawn using the Orthogonal mapping. Apart from supporting a few more raster ops, I can't see there's any extra benefit using DirectX's 2D functionality as opposed to using generic polygons. Unless, of course, you want frame-buffer access which is an area where OpenGL falls down.

Ciao...
SHAYDE

Shayde
05-06-2000, 06:58 PM
BTB. It has become pretty obvious to me that the debate of Direct3D vs OpenGL is much like past arguments, such as Amiga vs AtariST, or Windows vs MacOS (or Linux), etc. Each side firmly believe their side is the correct one and they have loads of reasons why they think their side is the better one. But no matter how much they try they cannot convince the other side and these arguments just go nowhere.

So basically no-one here is going to convince anyone else here that Direct3D or OpenGL is the better option - it's something you have to decide on your own, either by trying them both out, or for strategic reasons.

Ciao...
SHAYDE

Gynx
05-06-2000, 07:52 PM
I can't resist making a comment or two. I am just now getting into 3d programming and I was having a hell of a time deciding which to use: OpenGL or DX7. I program using Satan's latest OS, W2k.

Based on the two books I have read, (Inside D3d and OpenGL Programming Guide) OpenGL looks a lot better. I must admit an initial bias towards Satan's 3d API, but OpenGL just seems cleaner based on what I've read. Having not yet coded a single line in either, my oppinion is probably of little value on this topic.

However, with respect to the great Satan, Microsoft, I would like to voice a more informed opinion. Microsoft got where they are now by having products that were "good enough" and having even better marketing and distribution strategies. To become a monopoly in the PC OS market, you have to start with a salable product. You can't corner the market on OS's like you can gold or oil.

Another interesting fact. Office has higher market share on Apples than it does on PCs. Come on now, tell me about all the back-door advantages Microsoft had coding for the Mac OS.

Another intersting fact, Linux has become successful in spite of the awesome forces of Satan deployed against. The fact that Linux is so popular (I personally like Linux and used it in a production system in 1995, before it was "cool" to do so) is clear and convincing evidence that MS does *not* have a monopoly on OSs.

I am not saying MS is lily-white virginal, but they way some people talk, you would think MS had personally stolen their first-born child.

IE 3 was far more stable than Nav 3 and was more compliant with Netscapes own specs on cookies. I know this from personal experience. Netscape was never making money on their browser and never planned to. Anyone that has bothered to look into the facts know this.

And that leads me to my final comment on MS/anti-trust. This suit was originally started primarly by Netscape and Sun. Netscape has since been purchased and doesn't really care anymore. Sun has been in this from the beginning to advance it's own corporate agenda. In fact, I have to admire Sun for doing such a good job of beating MS at it's own game.

Where's the hue and cry about Sun owning Java and selling hardware at the same time? Do you guys like Scott McNealy so much that you trust him never to get greedy? Shouldn't the government jump in and force a break up of Sun and split off Java before Sun develops into a Satanic force in the universe like MS?

TheGecko
05-06-2000, 08:16 PM
Hello once again http://www.opengl.org/discussion_boards/ubb/smile.gif

Have any of you guys tried to put,say,a background image in your 3D applications using OpenGL? Picture this,you have a nice 800x600 bitmap of the beach which you want to throw into your upcoming game and you want it to take up the whole screen (naturally).Now,using the methods you all have described of scaling the bitmap and then texturing it onto a polygon,don't you guys see that the image is,well,ugly? I mean the bitmap is now stretched and produces an awful featherd effect.You see what I'm getting at? The image quality doesn't look so good compared to what I can do in DirectDraw by just drawing the bitmap and then creating 3D objects infront of it (naked chicks in bikinis http://www.opengl.org/discussion_boards/ubb/smile.gif )

This is my problem with OpenGL.I mean,if directX can do it then why not OpenGL? This point has me stumped.Unless of coarse that's what they're working on for the next release version,then ignore my ramblings.

Shayde:
Like I said,there are alot of influences that make a team (or the lead programmer) decide what to program with.If I was making a game for Windows,then why not use DirectX? I mean DirectX was built for games and for Windows! It's just a purely logical choice to use it.If however,I wanted my game to be ported to other OS's then I would have thrown DirectX out the window (no pun intended http://www.opengl.org/discussion_boards/ubb/smile.gif ) It's not totally about politics and money,there are other determening factors involved.As for those of us here who program for a hobby,then the only thing that matters to us (according to all these posts) id the ease of use of the OpenGL API and it's portability.Not much else.
As for what you said also,I have NO intention of convincing other people which API is better.The reason why I started this topic is to get some solid concrete evidence why OpenGL is better than Direct3D.All I got were opinions and no benchmarking.Of coarse in this case you guys raised some very important issues that got me thinking.

Now,if you goto a DirectX board and start a topic "Why is DirectX better than openGL" then you guys are going to get people who will give their opinions and say that DirectX is better because... I expected most of (or all) the people on this board to back up OpenGL,this came as no surprise to me.So what better place for me to start this post and see why you guys like it so much.

My only grudge against OpenGL is the whole 2D issue. (NO POLYGONS! I REPEAT...NO POLYGONS! JUST PURE 2D.I have my reasons) Once they fix that (if they do intend to fix it) then I'll be pure OpenGL all the way http://www.opengl.org/discussion_boards/ubb/smile.gif

skw|d
05-06-2000, 10:19 PM
Gecko:
I think you are missing something here... any scaling of a graphic will produce an error to some degree, be it DirectX or OpenGL. All you need is an image the size of your desired resolution and there will be no distortion.

OpenGL is an API, a standard for graphics programming. It has been around longer than DirectX has and is very solid in design. Developed by SGI, a company dedicated to 3D hardware and software, it's sole purpose to allow developers to write programs that could be run on a varity of different mainframes and workstations. It was only when J.Carmack ported Quake to GLQuake, that the gaming industry really took notice of OpenGL. (Because of the easy-to-use API, he was able to port Quake over the weekend). If a company wanted to add a feature to the API they can through extensions, but with DirectX Microsoft has the final word. And we all know how they have controled the market.

It is entirely up to you as the programmer to decide which API to choose. But I strongly suggest that you try both APIs before you make that decision. A little bit of research will save you hours of development.

/skw|d

TheGecko
05-07-2000, 07:12 AM
Hey skw|d,you obviously haven't read the entire post http://www.opengl.org/discussion_boards/ubb/smile.gif I've programmed with both API's and I love both of them but when my projects start involving 2D bitmaps then I have no choice but to switch to DirectX.Don't get me wrong,I love OpenGL to death but it still has some missing functionality http://www.opengl.org/discussion_boards/ubb/smile.gif

[This message has been edited by TheGecko (edited 05-07-2000).]

Humus
05-07-2000, 11:46 AM
Well ... this topic is getting rather absurd ...
TheGecko:
About your 2d again. The only advantage of a bitmap is that it can have sizes of non power of 2. But if you take the 800x600 bitmap and map it onto the upperleft 800x600 texels of a 1024x1024 texture and draw without any filtering (GL_NEAREST_MIPMAP_NEAREST), then you will have no distortion. It'll perhaps be a waste of space ... so, the missing functionality is my opinion non power of 2 textures.
I think more argueing here is meaningless ... continue using DDraw if you like it, you may perhaps think it's more intuitive and more straight on the problem in 2d. Well ... it's just like you can use the cosine teorem to find the distance between two points, but many find it more intuitive to use pythagoras (which is a special case of the more general cosine theorem). Like i said earlier in this topic, OpenGL is a general solution to graphic problems, and 2d is a special case of 3d ... so all 2d problems can be solved with 3d solutions ... but it may not be as intuitive ...
And just one word about fps drop mentioned here ... well, 2d using textures is the fastest. And "false" 2d is in no way slower than "true" 2d. If you guys have read any hardware design courses you'll understand this. If the card can pump out say 2 pixel per pipeline and clockcycle and have 2 pipelines, it can't pump out pixels faster if it does 2d. It's not higher clocked, does not have more pipeline and doesn't have wider pipelines in 2d. To implement separate 2d pipelines would be too complex and much more costly. I'd guess that most 3d games do "fake" 2d for their 2d parts of the screen because this is much faster that bitmapping. But if bitmapping is fast enough ... well, use it if you like ... but i wouldn't (it's against my principals too not use the fastest and nicest ... http://www.opengl.org/discussion_boards/ubb/smile.gif )

[This message has been edited by Humus (edited 05-07-2000).]

skw|d
05-08-2000, 05:54 PM
Gecko:
If you have seriously used both APIs, why are you asking why OpenGL is better than Direct3D? Shouldn't you already know the answer? Also, why are you constantly bringing up 2D bitmaps? Direct3D doesn't even support 2D. I guess you want to compare DirectDraw with OpenGL.

First of all, you must define what you are wanting to compare. When I judge an API, I look for ease of use, portability, functionality and support. That is why I choose OpenGL.

I still don't understand what problems you are having with 2D graphics in OpenGL, I have never found myself limited by the API. Maybe if you explain more I can help you.

/skw|d

Gynx
05-09-2000, 04:06 PM
Gecko:

FYI, this comes straight out of the Direct3d FAQ on MS's website:

Context changes. Switching from 3-D to 2-D operations, for example, by blitting to or locking the frame buffer can cause a large stall as the device flushes its rendering pipeline. For this reason, it is important to avoid these operations as much as possible. Most 2-D components of scenes, head-up displays, and panels for example, can be rendered using 3-D primitives, generally resulting in better performance.

It sounds to me like what others have suggested regarding use of 3d operations to achieve 2d effects is the way to go in both OpenGL and DX.

harkal
05-12-2000, 02:34 PM
to TheGecko:

This **** about OpenGL and 2D graphics is gone to far... I personaly think that useing OpenGL at the 2D part of a game is a piece of cake and more than that. IT IS BETTER than any directdraw. Forgive me but I find it
very cool to setup an Ortho matrix and work on the screen useing a "virtual resolution"
of 800x600 for example and to see everything to look the same on 1024x768 and 640x480...
and ofcourse there is no fps drop...
u just push in the ortho matrix and then simply use
glVertex2f(x,y); like commands...

HarKal

p.s : if don't know how to do it right it does not mean that there is no right way...

TheGecko
05-12-2000, 07:13 PM
Whoa! Take it easy Harkal http://www.opengl.org/discussion_boards/ubb/smile.gif We're all friends here (aren't we http://www.opengl.org/discussion_boards/ubb/tongue.gif ?) What I am prolly trying to do is compare OpenGL with DirectDraw and not Direct3D. I was talking about the whole 2D only aspect of OpenGL and not necessarily mixind 2D and 3D togather. (Well that was my initial argument but then I wanted to compare the purely 2D aspects of OpenGL) That's all http://www.opengl.org/discussion_boards/ubb/smile.gif I totally understand using ortho polygons and stuff to create HUD's for my games and stuff.I really do. Maybe I wasn't clear in my previous posts as to what I was getting at (and that's comparing OpenGL and DirectDraw).

However,I was reading my OpenGL superbible and I came across the chapters on Buffers (Stencil buffers and such) and that got me thinking about (once again) mixing 2D and 3D together (just for the sake of experimentation http://www.opengl.org/discussion_boards/ubb/smile.gif ) Anyone have any thoughts on this?

Humus
05-13-2000, 08:17 AM
Well, ... depends on what yo want to do ...
I suggest that you start a new topic about this kinda problems, and we all forget about this GL vs DX stuff.

05-13-2000, 10:29 AM
Originally posted by Revolver:
OpenGL is literally 10 times easier that DirectDraw/Direct3D

I'm glad you were able to quantify the ease of use factor, as no one else is. I've never considered DirectX "hard". It's just another library. And it's not necessarily messy, it's just pseudo-conforming to the COM interface. That in itself is a bit different, but allows some neat binary upgradability stuff.

Besides, "real" programmers don't think DX is hard. =)

So Carmack isn't a "real" programmer???

harkal
05-13-2000, 02:18 PM
to TheGecko:

Sorry for the attidute http://www.opengl.org/discussion_boards/ubb/frown.gif . We are all friends here http://www.opengl.org/discussion_boards/ubb/smile.gif...

HarKal