Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

On Windows, how does OpenGL differ from DirectX?

I don't have any hands on experience with graphics programming. I got this doubt when I was reading about graphics programming.

From what I understand, because Windows didn't offer DOS like direct hardware access, DirectX was created. That means DirectX is the only sure way to achieve direct(ish) hardware access. Am I wrong?

If I am not wrong, then OpenGL must be implemented either using DirectX itself or on top of DirectX.

So doesn't it mean that on Windows OpenGL is really DirectX?

Please note that my doubt is restricted to what the title says, exactly, and I am not interested why is one better than the other etc.

like image 481
Ken Avatar asked Sep 10 '11 14:09

Ken


People also ask

Is it better to use DirectX or OpenGL?

One major difference is that OpenGL is cross-platform, and DirectX is available only on Windows and XBox. If you need to develop for more than Windows, OpenGL is the way to go. When it comes to graphics capabilities, both APIs rely on the use of the traditional graphics pipeline.

When should I use OpenGL?

It is commonly used to make UI animations more responsive or to handle embedded video or to draw vector graphics – really any visual element you put on the screen is fair game for OpenGL.

Do games use OpenGL or DirectX?

Professional graphics. OpenGL has always seen more use in the professional graphics market than DirectX, while DirectX is used mostly for computer games.


1 Answers

DirectX is a layer to use the graphic card hardware functions. Since Windows Vista, the default OpenGL implementation (the one provided from Microsoft) uses DirectX, so OpenGL is really slow.

However, graphic card manufacturers provides drivers with OpenGL that directly use the graphic card without passing through DirectX; the performance should be the same. If you have an integrated graphic card with a poor driver, OpenGL may use DirectX.

like image 192
neodelphi Avatar answered Oct 04 '22 12:10

neodelphi