DirectX v OpenGL which one to use under windows

Let us assume we do not care about the portability of the system, its just under Windows.

Of the two options - DirectX 9 and OpenGL, which one has more advantages?
Here are a few I can think of right away -

OpenGL:

  1. You can work with both vertex buffers as well as pixel buffers.
  2. All advantages OpenGL has over DirectX :D (that covers quite a bit eh?)

DirectX:

  1. Only vertex buffers
  2. Lesser load on the CPU. (If you run the fluidsGL ~50% CPU is utilized, while in case of fluidsD3D, CPU utilization is 0% !!! )
  3. What if newer versions of DirectX work differently than the current. (Like deprecating DirectDraw)

What else?

A side-question:
Does anyone know why OpenGL leads to higher CPU utilization?

I don’t think your analisys is exact on this matter: the programming model between OpenGL (both 2.0 or ES) and DX9/10 is quite different.

In GL you should think your process as a main loop instanciated by your app: for this reason the CPU usage is higher than a DX app (as the DX event loop is handled by another software layer, more connected to the underlying OS).

The advantage is you can handle your events with a your own event procedure. The drawback is you have to handle everything by yourself ! (uh… it seems the same than before… sounds strange!!!).

BTW, if you work with CUDA, stay with GL and you’ll preserve the maximum functionalities range and cross OS compatibility.

Bye!

Thanks zzambia! Will certainly find out more about what you have said.