News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Direct3D

Started by shaldan, November 18, 2005, 09:09:55 AM

Previous topic - Next topic

shaldan

hello to hitchhikr,
i would like to know your opinion on using Direct3D vs openGL.
Can you shortly tell advanteges and disadvantages and why do you prefer openGL ?

thanks

zooba

Direct3D is COM based (and in the case of DX9, managed code based), whereas OpenGL is based on simple API calls and a state machine.

I learned D3D first (in VB, where the COM stuff doesn't hurt much) and the learning curve was huge compared to OGL. Plus, OGL appears to be much more efficient (though that may just have been my usage of it  :cheekygreen:)

hitchhikr

Nowadays the ways of operating the 2 apis are similar.

Ogl uses the extensions jungle mechanism while d3d allows the use of byte code shaders (ogl only have glsl & asm as ascii) + there's only one function to import & the rest is used via a com interface which is a definitive advantage in term of size, d3d also have a convenient helper library which turned recently into an external dll (ogl also offers the glu32 dll so i guess ms wanted to have a glu32 for directx aswell).

Also the differences are less noticeable nowadays but historically d3d had a better render to texture mechanism & ogl had a better window management support.

Ogl have been implemented on numerous platforms so independently of the used language, the ways to operate it remain the same across them.

The efficiency of an ogl implementation depends on the manufacturer's drivers, the speed with directx is usually equivalent if you know what you're doing.

If you're thinking about doing games on a large scale, you have to know both but
ogl is easier to learn if you've never used a 3d api before.