r/GraphicsProgramming • • 12d ago

Question What are some initial architectural decisions to be made before start building a professional graphics engine ?

Hello everyone, I have a question for those who have already built, or are currently building, a graphics engine at a level close to being called professional. A little bit of background: for the past 4 months, I’ve been building a path tracer using CUDA, and before that I finished and implemented Peter Shirley’s 3 books about ray tracing. Now I want to start building something more serious, with a larger scope of features and implementations, using C++/Vulkan. I wondered what some of the decisions people make before getting the triangle on screen are. I know this is a process that takes time, so I understand that during development, as the project grows, a lot changes and new decisions are made, but I was still just a little curious.

15 Upvotes

9 comments sorted by

View all comments

Show parent comment

1

u/Maui-The-Magificent 12d ago

Ah! your my one reader? ;P. No, but i hope is helpful, you asking bout architectural decisions by itself is an amazing thing, a lot of people don't. That makes me confident you'll do excellently regardless of my suggestions. although, i posit that they would help. And if you like constraints, the work becomes more fun aswell.

1

u/SnooSquirrels9028 12d ago

OH I LOVE CONSTRAINTS ! you know that path tracer I've been working on for months... that was only a single CUDA file it has now almost reached 5000 lines. Why ? first things first for fun and second reason is that I just didn't wanted to care about all the professional structural file designs and linking stuff and just wanted to focus on math and understand how does a path tracer does stuff :D

1

u/Maui-The-Magificent 12d ago

Haha you do you! I am not one to tell you how to organize and format your code. What is important is that it fits your mental model. Later, if you have to conform to a style for work, you have to, but don't let arbitrary style rules tell you how you should approach solving your problems. Focusing on 'good looking/organized' code early often has a cost that gets payed by the quality of your solution. If things must be styled and organized to fit a standard, it is my belief that should be done at the end, when the solution is finished.

1

u/Maui-The-Magificent 11d ago

Also, yes. focus on the things you enjoy is never wrong. follow your passion, I do the same!

And a little secret is, I also prefer having large files and large functions. Easier for me to have less fragmentation of the logic, and have things solved locally rather than globally. Luckily, that is also pretty convenient when working against hardware ^^

Edit: even wrote this: https://github.com/Mauitron/The-River

So I am very much on your side ^^