#After going through a lot of analysis paralysis, I decided to settle with Odin.

1 messages · Page 1 of 1 (latest)

zenith dragon
#

I have been programming in graphics for past 3 years. As a result, I am interested in starting my own small visualization engine. To prevent myself from more analysis, I would like to start something in Vulkan. I have gone through Vulkan tutorials so I have basic idea on it. I would like to request the community to guide me with good recommendation on organizing the codebase . What are the proper way to manage the engine source files? How to organize the projects so that it is scalable ( I do not mind refactoring)? Most importantly, if I need a C++ library like Eigen, or something with Cuda like Pytorch, how to integrate them?

Thank you so much! I will keep on posting here 😄

severe wadi
#

You can only integrate libraries that have a C ABI, so C++ template libraries (as Eigen seem to be) wouldn’t work. They require C++.

But you always have the option to wrap things in a regular C library and then that one can be integrated to Odin easily. This is a good article on writing C bindings for Odin: https://odin-lang.org/news/binding-to-c/

#

As for project structure my recommendation is to start with everything in one package and don’t worry about it too much. You can factor out things to packages later as needed. The other way around (to prematurely over-package things) is worse.

zenith dragon
#

Thank you!

cerulean falcon
#

I second this advice. It's generally a good idea to minimize the number of packages you have.

I find that making a package for a 'subsystem' tends to work reasonably, if you do put things into packages.

e.g: In a language compiler, you might have main (contains the entry point), parser, checker, irgen, and codegen, or maybe just the latter depending. Maybe a common utility-type package as well, for common stuff, or random stuff. Like getting the current exe path, for example.
Or in a game, one for the game logic, and one for the game engine, etc.

Putting datastructures in a package by itself, like a red/black tree, or whatever, can be nice for ergonomics as well.

You can't do cyclic imports, and there are no subpackages (all packages are standalone), too - which you can run into if you're not keeping it in mind as you go, too.

zenith dragon
#

The core idea is to start simple! Did I get it correctly?

cerulean falcon
#

Something like that 😄

zenith dragon
#

Okay!

remote nexus
#

god what even is eigen

balmy tapir
zenith dragon
#

Most of the neural graphics community use it to load some kind of implicit model for visualization. 😄

ocean egret
#

It seems to me neural graphics is probably a pipe dream. At least for Real time stuff for a very long time.

#

Since chatgpt the level of optimism for AI stuff has gotten a bit absurd if you ask me.

zenith dragon
#

They are pushing the idea of NeRF a lot!