Replies: 1 comment 2 replies
-
|
How does this question relate to EnTT? Isn't this just an application design issue? 🤔 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Let's say we have a Mesh class, which in turn has another class, Texture.
It looks like this:
ClassMesh{public://Millions of very interesting methodsprivate:Texture * usage_texture;};I want to add a MeshComponent that looks something like this:
structMeshComponent{Mesh mesh;//constructor and etc};Where should I declare variables in the class (should usage_texture be created via new/smart pointers or just convert to Texture usage_texture) if I want to create all heavy objects (Mesh, Texture etc) in Heap. MeshComponent will be added via entt::registry::emplace.
Beta Was this translation helpful? Give feedback.
All reactions