Vulkan vs. OpenGL

preview_player
Показать описание
I remade the same minecraft like game in OpenGL and Vulkan. Both versions rendering 64x64 chunks. (vulkan renders slightly more verticies than opengl because outer walls are also meshed). As you can see vulkan is pushing more frames than GL because of little cpu overhead. Instead of submitting each vertex one after another you can pass all draw commands with one submit command to the gpu. Both projects are completely coded in C. Vulkan utelizes my own allocator.
Рекомендации по теме
Комментарии
Автор

Reminder: OpenGL Example uses multiple gldraw commands while vulkans submits one command buffer for one frame

forceofphoenix
Автор

The length of the OpenGL code vs Vulkan 😵

brockdaniel
Автор

For me.
OpenGL: Compatibility
Vulkan: Performance

ALEKSCRAFTPLAYY
Автор

This is an apples-to-oranges comparison:
The Vulkan application draws the entire scene with a single API call,
but you didn't do this for the OpenGL application, instead drawing each chunk one-by-one, and therefore it is slower.
Using glMultiDrawElementsIndirect the performance should be practically the same.
That might actually be a meaningful API comparison for a more complex scene.

thetastefultoastie
Автор

0:08 OpenGL
— GPU Temp: ~44° c
— GPU Use: ~2%
— GPU Power: ~105 w
— Memory: ~366 mb
— CPU Use: ~11%
— Framerate: ~500 fps
— Frametime: ~1.8 ms

0:47 Vulkan
— GPU Temp: ~51 c
— GPU Use: ~3%
— GPU Power: ~285 w
— Memory: ~390 mb
— CPU Use: ~8%
— Framerate: ~1770 fps
— Frametime: ~0.5 ms

mr.hashundredsofprivatepla
Автор

Note that power consumption is 100 W vs 280 W. A big giveaway on the actual hardware utilization

volchonokilliR
Автор

the drawback of vulkan is that it needs more boilerplate and is more explicit than opengl so most people that are doing a real game just alone by them selves would choose opengl or webgpu which has abstractions over graphics apis and is easier than vulkan and is comparable

Qohist
Автор

Vulkan is a graphics card framework whereas OpenGL is a graphics programming framework.

PeterKilian
Автор

When I saw 500+ fps I though it couldnt get much better than this.

I was wrong.

diguififficial
Автор

Minecraft's Vulkanmod is simply amazing. It can still hitch quite a bit when generating new chunks at higher render distances, but once they're loaded it's butter smooth.

fenn_fren
Автор

Vulkan is bug difference not only in single GPU utilization, but also in multiple GPU utilization!

Maybe some of you remember nvidia attempts to make dual GPU work, but in the end you always end up with something like maybe 150% of 1 GPU power, instead of 200%.
Vulkan allows you to get that 200%, without any crosslinks, because of the software differences. Essentially, Vulkan treats each GPU separately, you can issue vastly different parts of workflow to any number of GPUs connected. You can do this for example, by creating 1 Graphics queue and separate compute queue. PCI is your crosslink to transfer data between CPUs, but even then, if you get GPU's which by design can pool their memory, then you can truly achieve ridiculous compute power, all synced by single CPU.

avarise
Автор

didn't know the difference was that stark, thanks for posting this

kolosso
Автор

I wish you'd used the same allocator on both scenes, and tried to do both APIs as similarly as possible otherwise. But this was helpful, thanks.

Автор

I dont remember the last time i see a raw direct and simple comparison of ogl vs vulkan, does vulkan win this big too under max workload at capped fps? Like how many workload it can take before dipping below capped fps?

middyjohn
Автор

The thing that I hate about Vulkan is the fact that it only supports GPUs from 2016 and newer, because I suffer from INTEL HD GRAPHICS FROM 2009

thecakelover
Автор

It bogles my mind that Notch didn't use C, it would have been soo much faster and efficient than Java. Also the loading time would be magnitude faster. I just heard that he is trying to make a dungeon crawler in Java, like dude WTF why use the slow tech? For me performance is alpha omega.

KimGameDev
Автор

awesome.

ps: 1608 line code Vulkan - 145 line code OGL lol

maxiluaces
Автор

Can't you just create a single vertex buffer in OpenGL instead of submitting each vertex one after the other?

jd_bruce
Автор

Keep in mind that the difference here is displayed in FPS instead of ms. Yes, Vulkan is faster, no doubt, but by ~1ms. Still significant considering the time scale we're talking about, but it can very much be compromised by thi gs like... the way you program you game afterwards

tonin
Автор

I don't care if the vulkan code is 2-3 times longer or not as compatible. Hot DAMN it runs fast!

catdotjs