Does it make sense to create an OpenGL engine in 2019?

Started by
12 comments, last by _Silence_ 5 years ago

I am creating a 3D engine using OpenGL, but recently I came across OpenGL and Vulkan benchmarks. They showed that Vulkan is ~10-20% faster than OpenGL. And I thought about the compatibility of the engine with the Vulkan API. And if I support these two APIs at the same time, “in the OpenGL style”, would Vulkan not have a performance loss? And does it even make sense to add support for Vulkan in 2019?

Advertisement

Do you specifically need Vulkan? OpenGL is a lot simpler to write from scratch, and has wider support on older hardware. Unless you think you're going to need the extra performance, OpenGL is almost certainly capable of meeting your requirements.

 

It's quite possible to split a renderer into front and backends, start off with just OpenGL support and add Vulkan support later on.

If you really are at the level of managing all the data as an expert in video driver, you could get to earn that '10% 'extra performance, otherwise, it is best to continue with OpenGL; but if what you care about is learning, why not ?, you probably achieve the same or it could even happen that you achieve lower performance in Vulkan than with OpenGL, the fact is that with Vulkan you will only have GPUs +2013 support. (More than 90% probably, but hey, of that 10% you could still have people interested.).

Computer Graphics programmer.

If you come to interview and tell "I know everything from memory and SIMD layer up to ECS and PBR/IBL shaders, but OGL only" it's better, than you just tell "i tried to learn vulkan"

3 hours ago, OandO said:

Do you specifically need Vulkan? OpenGL is a lot simpler to write from scratch, and has wider support on older hardware. Unless you think you're going to need the extra performance, OpenGL is almost certainly capable of meeting your requirements.

 

It's quite possible to split a renderer into front and backends, start off with just OpenGL support and add Vulkan support later on.

Almost 70% of steam users have Vulkan supported hardware. Gamers are not poor anymore. 

Well, in that case I’ll ask: how hard will it be to add support for Vulkan, if the engine is currently running completely on OpenGL? How different is the logic of these APIs? And is it possible to add lossless support for the performance of these two APIs? Perhaps there are already any projects that combine both OpenGL and Vulkan, and which can be easily implemented into the engine?

15 hours ago, congard said:

Well, in that case I’ll ask: how hard will it be to add support for Vulkan, if the engine is currently running completely on OpenGL?

2

That is totally dependent on how well you separated the rendering/GPU related stuff from the rest of your engine. If you put all the OpenGL functionality into your own set of functions, that do nothing more than transferring data to the GPU and issuing render calls than it should be rather easy.

On the other hand, if pure OpenGL API calls are spread around all over your code then it could be a lot of work.

 

EDIT: Regarding your original question:

If you are not an experienced programmer, especially concerning graphics programming, you should not make your decision because of some benchmark that tells you, that Vulkan can be 20% faster than OpenGL. The question is, can you utilize Vulkan in a way to be 20% faster than your fastest OpenGL implementation and do you really need this extra speed?

Maybe you should also google "OpenGL AZDO" (approaching zero driver overhead). This is a collection of techniques that try to find the fastest possible way to use OpenGL. If you can say that you fully understand what they are talking about, then you could give Vulkan a try.

If it's a learning project and you already know OpenGL, learning Vulkan will be useful in the long run.

Aether3D Game Engine: https://github.com/bioglaze/aether3d

Blog: http://twiren.kapsi.fi/blog.html

Control

I think you should be open to write engines in general and not a "OpenGL only engine". Most engines support different rendering engines (Direct3D, Vulkan, OpenGL, SDL, ...) by using interfaces and backwards compatibility - so if there is a new and cool API, they can adapt it. 

It would be a waste if you invested all your effort and time into an OpenGL engine and later you write a new engine for another API / device.

This topic is closed to new replies.

Advertisement