r/GraphicsProgramming • • Jan 23 '24

Question Does people use OpenGL seriously?

After a bunch of years, I decided to take a look at it again.

It is now a horrible pile of conflicting conventions, half-assed libraries and shoehorn features that I’m doubtful it is worth the effort.

Are devs nowadays going for high-level engines ? What’s the dev choice for doing 3D programming?

0 Upvotes

38 comments sorted by

64

u/lithium Jan 23 '24

It also runs everywhere and you can spin up a useful toolkit backed by it in an afternoon. I ship between 5 to 15 pieces of software for public consumption every year on top of my GL engine and have only very rarely hit any kind of insurmountable wall, in which case I've used bgfx or diligent and had a much more difficult time.

Depends on what you mean by "seriously", but it pays my bills and then some and has done for 15+ years.

12

u/XenonOfArcticus Jan 23 '24

Yeah. Openscenegraph pays my bills.

However, even the maintainer of Openscenegraph is recommending Vulkan (and his Vulkanscenegraph) for new code. 

Vulkan/VSG is definitely a better choice for the future, but Vulkan isn't fun to write to at API level. Hence the scene graph or game engine or other middleware. 

2

u/bonbonbaron Jan 23 '24

Are you a freelancer or something?

2

u/lithium Jan 23 '24

No, I own a small software dev shop.

1

u/bonbonbaron Jan 23 '24

Would love to learn what it takes to set something like that up. Would be nice to work for myself.

5

u/lithium Jan 23 '24

Well I can only speak for my path, which unfortunately involved working for dickheads for 20 years until I decided I'd had enough. Lucky for me I met a brilliant partner/cofounder while working for one of those dickheads and we decided to go it alone a few years ago.

Freelance opportunities abound though, I was just always more comfortable taking a salary when I was younger. Depending on which subcategory of graphics programming you're interested in, you can find the forums / discords / etc associated with commonly used libraries or software in that field and there'll often be job postings there. For example cinder, openFrameworks, threeJS, notch, touchdesigner, just to name a few.

Good luck :)

1

u/bonbonbaron Jan 26 '24

I appreciate your kind reply. I've been working on and off on a 3D game engine for Raspberry Pi the past couple of years, which isn't really for money. Maybe it'll come in handy at some point though. Cheers.

2

u/vwibrasivat Jan 23 '24

This answer was so complete that I didn't even read the rest of the comments.

1

u/Moss_ungatherer_27 Jan 23 '24

What sort of products do you even make? Games?

7

u/lithium Jan 23 '24

Large scale multi-user interactive installations.

2

u/vade Jan 23 '24

Ah nice. What toolkit ?

4

u/lithium Jan 23 '24

There's been a few over the years but its been my handrolled one for many years now. The main open source one i used early on was cinder, but if I remember correctly from the forums you evaluated it and were...less than impressed ;)

Definitely got some use out of Syphon over the years too, so thanks for that (assuming you're the same vade)

4

u/vade Jan 23 '24

Definitely got some use out of Syphon over the years too, so thanks for that (assuming you're the same vade)

Funny, I actually worked a bit with Andrew Bell using Cinder and grew to see some real promise with it - I think my initial early perusal was more feature wise and not well structured / opinionated and well curated, which I appreciate far more now. OpenFrameworks was the messier, but more popular for fast and dirty, but I wouldn't leave stuff running for months using it. Anyway - I was an annoying fuck when I was younger, apologies haha.

And yes, same vade! Glad you enjoyed got some use of it!

Ive been curious about newer x-platform solutions now that gpu programming is so fragmented with Vulkan, Metal and DX12 is all!

All the best.

2

u/lithium Jan 23 '24

Hah, no apologies needed, the only reason i even remember is because i was semi familiar with your work in, (testing the memory now) Quartz Composer? and I was stoked you were potentially bringing some of that expertise to cinder that I could subsequently mooch off, but alas ;)

Haven't had much to do with Andrew outside of the forums and github since i'm on the other side of the planet but he's had a large effect on my work from a distance, i've still got installations out there that have been running on cinder for over a decade, and as you say, oF was kind of a non-starter in that regard.

Ive been curious about newer x-platform solutions now that gpu programming is so fragmented with Vulkan, Metal and DX12 is all!

If you're not interested in writing your own backends directly, i'd recommend you look at bgfx or diligent engine for cross platform gpu dev, and potentially nvrhi too, depending on the nature of your work / hardware.

Cheers

0

u/papa_robot Jan 23 '24

Well . An engine on top I can understand. I started looking at some libraries like GLWF and glut replacements.

Vulkan does not look fun either, I think both are meant to be renderer backends instead of developing apis

5

u/epyoncf Jan 23 '24

GLFW and GLUT are auxiliary libraries and have nothing to do with wrapping or replacing GL, just adding horizontal functionality.

And yeah, both, like DirectX are meant to be the last layer between you and the hardware. If you want something higher level try a wraping API like bgfx, or rendering frameworks, or even higher full engines.

1

u/pjmlp Jan 23 '24

Not quite everywhere, it was never a thing in most game consoles.

2

u/papa_robot Jan 24 '24

This is not flame bait. it is my honest frustration. I used to like the way it was streamlined with the programming language. glBegin() glEnd() a state machine design.

Several years after I find out things like GLSL being the basis of all render logic, without make them first class citizens .. writing shaders. Not even an include macro? no, just strings.

static const char* vertex_shader_text ="#version 150\n""uniform mat4 camera;\n""uniform mat4 model;\n"

Also I can understand for performance sake to prefer models as arrays of triangles, but just removing GL_QUADS because? . and of course you can use the older way... that for some reason is a performance hit.

Good thing, the never-open glut has replacements. That lib was a hindrance, more like a test unmaintained utility, that you could not live without.

things like https://glad.dav1d.de/ got me appalled, having a module system is way more efficient than creating those loaders. (I don't see these are widely used, so maybe got a wrong use case)

Of course OpenGL is the interface to the graphics hardware. My question was other than learning, if there were popular wrappers or higher-level libraries. There are engines like Unity or OGRE, but there should be something in the middle.

2

u/versaceblues04 Sep 25 '26

I've seen some cool projects with it. I used to be a c++ expert and absolutely loved Vulkan. I'm relearning it. I dont know. Its just Vulkan is so good. I've never worked in DX11 or DX12. But i appreciate opengl and recommend it for new programmers to help them learn about physics and renderers in computer science.

1

u/papa_robot Sep 28 '26

wait, Vilkan directly ? or within an engine/framework.

I did some openGL basic samples, but I find it difficult to scale to more complex programming

2

u/versaceblues04 Sep 29 '26

i cant remember it was a long time ago. I just started relearning c++ about 4 months ago. it was a vulkan tutorial. vulkan is bananas though, bananas! im mostly using Unity right now. I know im lame lol its good though. Opengl is good for concepts. I used it to learn how to set lighting.

29

u/Curious_Associate904 Jan 23 '24

Edgy opinions with an opening gambit there.

Let's just lay this down, a huge team of contributors, who have considerable experience in the industry, have defined a standard which while not perfect, allows you to draw shit to a screen really fast.

Shouting how it's a "horrible pile of conflicting conventions" is what you'd call a Dunning Kruger statement.

10

u/epicalepical Jan 23 '24

yeah, looking at the absolute mess of parameters and setup order and conflicting conventions that modern day libraries are, it is nothing short of a miracle that OpenGL is so incredibly simple compared to them - just set up textures and triangles through a small amount of function calls and you're good to go. It's perfect for any 2D game and/or non-AAA 3D game.

8

u/easedownripley Jan 23 '24

"horrible pile of conflicting conventions"

Yeah I mean welcome to literally all mature software right? Not a lot of engineering idealism survives contact with the real world.

12

u/R4TTY Jan 23 '24

AAA engines will use Vulkan and/or DirectX12

6

u/HTTP404URLNotFound Jan 23 '24

I use it at work for 3D visualization applications. We typically want to target Windows, Linux and Mac OS and its quick to just write once in OpenGL. We don't use any of the more modern graphics techniques since its just basic visualization so we haven't hit a wall in terms of feature support.

1

u/Tartare2Clebard Jan 23 '24

Started a custom render engine 5 years ago in OpenGL, now we are planning to migrate to Vullkan this year.

1

u/jtsiomb Jan 23 '24

What does conventions and half-assed libraries have to do with OpenGL?

-7

u/thebadslime Jan 23 '24

vulkan is the new opengl

0

u/[deleted] Jan 23 '24

This was my impression as well. Are people downvoting because Vulkan is lower level and thus incomparable?

0

u/thebadslime Jan 23 '24

I didn't notice it was downvoted, IDK.

2

u/[deleted] Jan 23 '24

[removed] — view removed comment

-2

u/nelusbelus Jan 23 '24

It literally is. It was called gl next first, but they decided they wanted to redesign the entirety because OGL is garbage

4

u/SuperSathanas Jan 23 '24 edited Jan 23 '24

Going by what I can find, nothing was stated that explicitly said "OpenGL NG/Vulkan are a replacement for OpenGL". There was the (eventual) admission by Khronos that OpenGL wasn't cutting it anymore when it came to getting the most out of modern hardware, and that the size of OpenGL and it's requirement for legacy support were hurdles when it came to implementing drivers. They saw Mantel, Metal and Direct3D 12 approaching things in a different way, from a lower abstraction, and realized they were late to the party (even though they have tried previously to overhaul OpenGL and escape all the legacy stuff). Granted, OpenGL and Vulkan are both "design by committee", so they aren't going to be moving as fast as Microsoft, Apple or AMD, who are developing against their own OS or hardware.

Judging by everything I've ever read about OpenGL and Vulkan, it looks like the intent with Vulkan changed a few times during the period between Khronos acquiring Mantel from AMD and beginning serious development on Vulkan with vendor support. They flip flopped back and forth between "this is the new OpenGL" and "this is a new, separate API altogether", but I never have seen anything that said "we intend for people to stop using OpenGL".

And this leads me into address "OGL is garbage".

OpenGL has problems: legacy shit, no support for multi-GPU setups, no support for multi-core/multi-threading on the CPU side, size and scope, inconsistency in implementations... the fucking naming conventions with the way new words are just jammed into old names to indicate new/different functionality (glDrawElementsInstancedBaseVertexBaseInstance)...

But it's still very useful and still relevant. Also, I usually really hate using this argument, but modern hardware allows for OpenGL to be performant enough to serve most cases. Typically, I hate seeing when developers go very sub-optimal routes, wasting resources and the potential of modern hardware, simply because it's possible and performs well enough (I'm looking at you, every fucking web-app ever), but in OpenGL's case, it's not it's limited more than it is wasteful so long as you're using OpenGL 4.3+.

I'll stop soon before I write too much more of a book here, but you can still use OpenGL for pretty sophisticated things. There's no reason that anything that doesn't need Vulkan/D3D12/Metal performance can't use OpenGL and spin up a working product much more quickly. Most applications do not need to control that Vulkan and the other APIs provide. Unless you're absolutely pushing the limits of your hardware in creative and highly optimized ways, you're wasting your own time and resources using those APIs instead of OpenGL. Similar concept to using C++ versus ASM, Java versus C++, Javascript versus anything else at all.

OpenGL will eventually go away, simply because it won't be able to keep up with hardware and vendors will stop supporting it. Sophisticated OpenGL-esque abstractions over Vulkan will most likely take it's position, offering a higher level interface for the GPU that allows for taking advantage of modern hardware without worrying about all the fine details. Those will be used where the control and performance of Vulkan isn't required. But for the moment, OpenGL will still take you pretty far, and much more quickly using Vulkan.

1

u/nelusbelus Jan 23 '24

True. But the moment you need HW RT or bindless it's suddenly impossible to use OGL so the other stuff is all irrelevant. However we see some of the opengl problems seeping their way back into vulkan. So many extensions and useless crap and complete overhauls of earlier designed systems. Where if you start learning now you might learn the wrong way of doing things.

Also OGL 4.6 has fixed a lot of problems by introducing SPIR-V too but these modern OGL versions have barely any support from mobile side, which makes them pretty useless. And modern OGL isn't properly supported on mac too.

They used to call vulkan glNext back in 2015 or 2016 iirc.

-20

u/pixel4 Jan 23 '24

What a loser

0

u/[deleted] Jan 23 '24

[deleted]

2

u/Thadboy3D Jan 23 '24

Hello, Dassault Systèmes ? :)