I've been trying to make a barebones engine/game in VS C++ with OpenGL.
So far it's worked well, I've managed to render two green triangles on the screen and can accelerate one using WASD input.
Both triangles have an "object" class from which I control their transform, could control mesh/shader, etc.
Today I tried to add an object reference to the transform component (so that I could get the Object from the Transform class, IE reference the parent from the child) and everything broke.
How are components of a "gameobject" class typically handled? Or what is a good suggestion to handle them? Is my current tactic of create object classes of the various components of my Object (gameobject) class wise? I also considered using derived class for the components, such as an abstract Component from which Transform/Mesh/Shader could inherit.