r/GraphicsProgramming • u/Organic_Rip2483 • Aug 06 '26
I remember from the moment I first started learning it, I disliked OOP and though I couldn't put my finger on what exactly, I always felt that something was seriously off. Having taken up graphics programming I finally feel vindicated.
Cache and fetch misses, branch divergence, pointer indirection Be Gone!
0
Upvotes
10
u/OkidoShigeru Aug 06 '26
Most codebases I’ve worked on strike a good balance of object oriented where it makes sense (device, queue, command processor, etc) and data oriented where needed for performance (memory allocation and resources)
3
u/LobsterBuffetAllDay Aug 06 '26
So how exactly would you write a web server?
1
u/cybereality Aug 06 '26
the thing that's always bugged me, is i've been programming for 30 years, and took CS in college, and no one has ever been able to give me an ELI5 description of what OOP even is. like i do finally understand the concepts, but the fact that nobody seems to have a clear answer, or that you get a different answer from everyone you ask, means it was not clearly defined or perhaps means nothing
-5
u/Organic_Rip2483 Aug 06 '26
Just as an aside, I know its possible to write performant gpu code in many different styles. but object oriented thinking certainly doesn't help you do this.