Direct3D- why is it better at...

What makes OpenGL better than Direct3D, or is D3D better? I’ve heard its buggy and unnecessarily confusing. Has anyone here used D3D? What is it like?

To initializa D3D you have to write 2 pages of code. For Ogl you need 10 lines of code. I think that Ogl is faster at rendering (I think). The drawbacks are that you can’t have something equivalent with Direct Sound and Direct Input.


Yeah thats right, you have to do all kinds of nonsense to even setup D3D.

BTW, isnt this true with other part of dirextx(all the initializing nonsens?)

i used D3D and it isnt bad but very confusing
initialising is long but not 2 sides code i have seen tutorial from OpenGL were the initialising is as long as by D3D
In D3D you have the problem that you need
a DC then a DirectDrawContext and then only you can initialise D3D. The Code is everytime the same so zou can Copy it
(There is really no problem to initialise :-))
but with texturing and lights and cam coordinating i had many problems :smiley:
i didnt use OpenGL yet but i going to do this next time

Oh excuse mz english im 16 and german :-D:-D

Originally posted by grady:
What makes OpenGL better than Direct3D, or is D3D better? I’ve heard its buggy and unnecessarily confusing. Has anyone here used D3D? What is it like?

I’ve used Direct3D extensively - I’ve written several fairly large applications with it.

First - DX programming is definitely not for the beginner. If you want to start into it, order the SDK CD from Microsoft. My opinion is, without the samples in the DirectX SDK, you can forget DX programming. If you’re using a Borland product (BC++ or Builder) for compiling, you will have a fairly difficult time starting out as most resources on the internet (99+%) are geared to Microsoft products.

I wouldn’t say that DX is “unnecessarily” confusing - it’s just plain confusing. IMHO it is confusing because it is so complex. It’s complex because it’s intended to be flexible and run on any Windows-based system at any resolution with any video card and any sound system (for which you have DX compatible drivers).

That’s why initialization of D3D can be quite involved. It’s relatively easy to initialize if you’re writing it for a known platform. I.e., if you know the mode (windowed or fullscreen), screen resolution, etc., that it is to run on. If you’re writing an app that may run on machines with unknown video cards, running at various screen resolutions, initialization can be very confusing and will take pages of code just to get the necessary information to begin setup.

Debugging can be very difficult as, once D3D is initialized, you must exit gracefully or you’ll have to reboot Windows to be able to run any DX app again. It is very likely that you’ll lock up your machine if you get an error after DX is running.

I’ve only found 1 bug in all my DirectX programming and that was in DX retained mode. I would say that DX is relatively bug free. The above instance was the only time that something didn’t work that it wasn’t my own (stupid) programming error.

I’m afraid I’m not experienced enough yet at OpenGL to offer a valid comparison between the two.

Hope that helps.

What I would like to know about D3D is what can it do that OpenGl can’t easily do without extensions?

What I’ve been wodering is what is an extension and what is it supposed to do? Can anyone help me with this, i am new

An extension is… err… an extension to the OpenGL core functionality. If a certain vendor thinks it’s hardware can do more things than the core, it’s added as an extension. The core is something ALL implementations must support, and therefore an extension can’t be a part of the core, since it’s not supported by all implementations.

So, it’s nothing more than extra fuctionality for certain implementation.