Jump to content
  • Advertisement
congard

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

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.).

Share this post


Link to post
Share on other sites

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"

Share this post


Link to post
Share on other sites
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. 

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites
Posted (edited)
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.

Edited by DerTroll

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!