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
-
Let's say we have a Mesh class, which in turn has another class, Texture.
It looks like this:
Class
Mesh
{
public:
//Millions of very interesting methods
private:
Texture * usage_texture;
};
I want to add a MeshComponent that looks something like this:
struct
MeshComponent
{
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