Difference between OpenGL and DirectX12

By Gizbot Bureau

Application Programming Interfaces (APIs) are what processes the command you make and interfaces with the software to get you the result that you need.

Difference between OpenGL and DirectX12


An API call involves making a request to the server to get a particular task/action done. A quick comparison of Open GL and Direct 3D will be done here. We will take a closer look at the performances of the two APIs with GeeXLab which is now available with an Open GL and a Direct 3D 12 renderers.

Open Graphics Library (OpenGL) is a cross-language, cross-platform API for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardware-accelerated rendering. Direct3D is a graphics application programming interface (API) for Microsoft Windows which is a part of DirectX, Direct3D is used to render three-dimensional graphics in applications where performance is important, such as games. Direct3D uses hardware acceleration if it is available on the graphics card.

A textured mesh is rendered with various polygon density. The test makes use of one command list, one PSO, one HLSL program, one mesh and one texture. GeeXLab and the test are both available for download in the host_api/Direct3D12_vs_OpenGL/ folder of the code sample pack. The number of polygons can be changed by editing the source code of both files. The test was conducted for the following specs:

CPU: Intel Core i5 6600K @3.5GHz

Motherboard: ASUS Z170 Pro Gaming

RAM: 8GB DDR4 Corsair Vengeance

OS: Windows 10 64-bit


Radeon R9 290X: Catalyst 15.10 beta

GeForce GTX 970: R358.50

HD Graphics 530: v4279

Framerate per second

The framerate per seconds of both the APIs with different drivers were studied.

Direct3D 12 results

Triangles AMD Radeon R9 290X NVIDIA GeForce GTX 970 Intel HD Graphics 530

800 9100/40% 5500/25% 1360


5000 8200/45% 5300/35% 1220

20000 5800/60% 5100/45% 1100

80000 2400/80% 2600/70% 850

320000 720/90% 700/85% 500

500000 480/98% 480/90% 400

2000000 130/100% 130/97% 160

OpenGL 3.2 results

Triangles AMD Radeon R9 290X NVIDIA GeForce GTX 970 Intel HD Graphics 530

800 4600/25% 3700/35% 1220

5000 4300/25% 3600/35% 1160

20000 4200/25% 3600/36% 1060

80000 4100/30% 3600/58% 840

320000 4100/46% 2800/87% 500

500000 3200/70% 2200/90% 420

2000000 1000/100% 930/95% 180

The results of Direct 3D 12 was found to be faster than OpenGL when the number of polygons was low. When the number of polygons was around 80k, it was found that the Direct3D offers the same kind of performance as OpenGL. When this number went above 80k, OpenGL was found to be much faster.

Quads rendered

The results of a draw stress test are listed as well, a quad has been rendered 100, 400 and 4000 times. Each quad is rendered with its own draw call. For this test, each quad is made up of 4 vertices and 2 triangles.

Direct 3D 12

Num quads GeForce GTX 960 (R361.43)

100 2900/20%

400 1070/26%

4000 180/20%

OpenGL 3.2

Num quads GeForce GTX 960 (R361.43)

100 1840/58%

400 730/30%

4000 97/20%

It can be observed that more objects can be drawn with Direct 3D 12 than with OpenGL.

Most Read Articles
Best Mobiles in India

Read More About: technology news computers

Best Phones

Get Instant News Updates
Notification Settings X
Time Settings
Clear Notification X
Do you want to clear all the notifications from your inbox?
Yes No
Settings X
We use cookies to ensure that we give you the best experience on our website. This includes cookies from third party social media websites and ad networks. Such third party cookies may track your use on Gizbot sites for better rendering. Our partners use cookies to ensure we show you advertising that is relevant to you. If you continue without changing your settings, we'll assume that you are happy to receive all cookies on Gizbot website. However, you can change your cookie settings at any time. Learn more