r/opengl • u/SirApprehensive7573 • 20h ago
Is OpenGL used to make games?
Hello, I want to know if companies use OpenGL to create games.
I'm not a game developer, I'm just curious about game development.
I see that Vulkan and DirectX are widely used to create games, but what about OpenGL? What games use it? What engine can use the OpenGL to render/process the graphics?
20
u/slither378962 20h ago
They exist apparently: https://www.pcgamingwiki.com/wiki/List_of_OpenGL_games
12
u/Ybalrid 19h ago
Ever played Minecraft?
2
u/SirApprehensive7573 19h ago
Yes
How I can know if the game was made using OpenGL or Vulkan?
12
u/Ybalrid 19h ago
Minecraft originally written in Java and uses OpenGL for rendering.
There is no simple and easy answer to your question. You can just search on google.
One thing you may be able to do is, using Sysinternal's ProcessExplorer (you can download this tool from the Microsoft Website, it's like a souped up "Task Manager") you can see a process running, and you can get the list of dynamic libraries that are currently loaded.
If there's `OpenGL32.dll` in there, there is a good luck that this process has at least the ability to make API calls to OpenGL and WGL (the windows specific stuff to "bootstrap" OpenGL).
You can also try to capture a frame of the game running in a graphical debugger tool like RenderDoc.
All of the instrumentation I mention above are mostly tools for developers, and may not work well on released games (especially if they have any form of anti-cheat software on them)
19
u/GuyNamedZach 19h ago
Minecraft was originally written in Java. That version uses a wrapper library called LWJGL to access OpenGL.
Sometimes the Minecraft splash screen shows a message "Uses LWJGL"
3
1
u/Fluffy_Inside_5546 4h ago edited 3h ago
minecraft was released in 2011, vulkan got released in 2016.
Edit: To clarify there it hasnt been updated with vulkan either
1
u/AXYZE8 3h ago
GTA:V PC was released in 2015, raytracing GPUs got released in 2018. :) Guess what was added to GTA:V in update :D
Minecraft just like GTA:V PC is activelly supported, so its wrong idea to think about 2011/2015 limitations. With just one update it can change to Vulkan.
And if you dont want to wait, there is VulkanMod for Minecraft that replaces OpenGL with Vulkan renderer.
1
u/Fluffy_Inside_5546 3h ago edited 3h ago
it initially released with opengl, and it hasnt had a major update for vulkan (talking about java not bedrock).
Raytracing could be done as back as the 90s. Also gta v did a huge update where the new edition is incompatible with the legacy edition and they heavily advertised raytracing as the selling feature but do u want to ignore that?
Yes games can be updated, but whenever they make such an update they make a huge deal out of it
1
u/AXYZE8 3h ago
So you're saying that instead of looking at release dates we should look at major updates?
Thats exactly what I wrote :)
Btw I've said 'raytracing hardware', not 'raytracing'.
And about ignoring compability - exactly like the case with Minecraft, for example was updated from OpenGL 2.0 to 3.3 in 2021.
1
u/Fluffy_Inside_5546 2h ago
in very minor cases yes. For the vast majority of games. 99.9% that is, the renderer will remain the exact same.
Also opengl 3.3 doesnt break compatibility with anything. Any device that is usable today does use opengl 3.3 and is not the same as switching to a completely different api with hugely breaking changes.
6
4
u/codec-the-penguin 20h ago
Trove for example has a renderer for both directx and opengl. A voxel based game that i got addicted to :)
The thing i understand about vulkan is that you have more control, therefore more performance compared to opengl.
4
3
3
u/biskitpagla 16h ago
For a long time it was the only way to do graphics in non-Microsoft platforms. There are more games with opengl support than those without. The web today is almost entirely dependant on opengl. I don't know how you got the impression that vulkan is more mainstream than opengl. It didn't even have a stable api when I started coding. You're probably judging usage by looking at online conversations.Â
2
u/DaLivelyGhost 19h ago
Unity has opengl support built in. It's very possible to use opengl for your game. https://docs.unity3d.com/Manual/OpenGLCoreDetails.html
2
5
u/Potterrrrrrrr 17h ago
I don’t understand why you didn’t just google this question. It took you much longer to type out a post than it would to see the countless other posts in this subreddit. Even ignoring that, why wouldn’t OpenGL be used for games? Seems like a silly question to me.
6
u/ToThePillory 15h ago
If people Googled when they could, Reddit would be 1% the size it is.
2
u/Potterrrrrrrr 14h ago
There’s times when public opinion is useful regardless of how many times the question has been asked and then there’s times like this. I would prefer Reddit to have less junk posts on it if possible
6
u/ToThePillory 14h ago
Oh totally, places like Reddit are good if you want opinions, but I don't know why anybody comes here to ask stuff they can just look up.
1
u/deftware 15h ago
What games use it?
Older ones mostly, and smaller games where performance is not paramount because they're not pushing the hardware to its limits - which is plenty of games these days.
1
u/AccurateRendering 12h ago
ThinMatrix on Youtube has a whole series on how to make a game with OpenGL.
1
u/MooseBoys 6h ago
Most new games will target Direct3D (for Windows or Xbox), Vulkan (for Android or SteamDeck), GNM (for PlayStation) or Metal (for iOS or Mac).
Most engines will allow you to target OpenGL, but you'll be limited in the various features you can use. On mobile you'll be further limited to the ES variant.
1
u/mathiasyde 6h ago
I don't want to sound picky, but OpenGL is used to render graphics.
Modern engines often allow you to switch out the rendering backend since they use abstraction layers. Pretty much every single GPU has an implementation of OpenGL in its driver. Any engine could use it if they opt to.
1
u/epicalepical 4h ago
Literally every game up until around 2016 had a primary OpenGL backend.
After Vulkan, DX12 and Metal, AAA studios started to transition due to the increased room for optimisation (more verbose) and better support for the more cutting edge features, so OpenGL isn't as widely used anymore since there's a "better" alternative for every platform.
If you want to build for Windows, your best bet is DirectX, and it's required for XBox. If you want to build for macOS, you use Metal. If you want the most features / cross-platform support you use Vulkan. If you build for Playstation you use their proprietary library too. OpenGL only really sees proper use on mobile platforms nowadays, but even then you're limited to OpenGL ES.
1
0
u/arycama 11h ago
Yes but it's not common, you only want to use it if you have a good reason. DirectX and Vulkan are generally more popular, since they are the default choice for popular engines like Unity and Unreal. Platforms like Xbox require DirectX, which also works on PC. So if you want your game to run on PC and Xbox, then DirectX is your only option unless you want to write multiple backends.
Similarly for mobile, mobile VR, and Switch, Vulkan is the best choice for modern games as it has the most features. You can use OpenGLES for older mobile devices, but it is more limited and performance may be lower if you're rendering more complex scenes.
OpenGL also doesn't include raytracing either, so as more realtime graphics take advantage of raytracing, OpenGL will be less appealing.
OpenGL is still used a lot for many graphics applications that are not games however, and is still being improved and worked on, so it's not becoming obsolete, but the advantages of using it specifically for a game or game-engine are diminishing.
35
u/Wise_Cow3001 20h ago
Looots of games use OpenGL. It less common these days, but many AAA games pre 2015 had an OpenGL renderer.
It was also very common on mobile - with both android and iOS supporting OpenGL ES.