refactor: split material, shader and model in new components#136
refactor: split material, shader and model in new components#136
Conversation
There was a problem hiding this comment.
In term of "technical refactor" it looks nicer than before but there is a new type of data imerged from this PR: the Ref or the Handle (I don't now currently which one is the best namming for it). So basically we have multiple kind of data struct that store a unique ID linked to a resource (Material, Model, Shader) so we could create a templated struct that would store those kind of identifiers.
So it would change the name for structs (Material -> MaterialRef or MaterialHandle, etc. And MaterialData -> Material)
I like the idea but "refs" are usually associated with memory managment (for instance, JoltPhysics have their own implemtation of smart pointers that are named "[object]Ref" (see here) so Handle is probably the right choice ? |
As we will use a generic data struct, we could use something like |
For this PR I didn't do a generic handle but rather three different components. |
|



(Not related to any issue)
I have created three new components "Material", "Shader", and "Model" to store the name of the material and shader used in an object, as well as the object name itself.
I did this because of many things:
Notes:
You can test on branch esq-pr-136 OpenGL-Example/esq-pr-136