fesoliveira014 / yanve

0 stars 0 forks source link

Resource Management #18

Open fesoliveira014 opened 3 years ago

fesoliveira014 commented 3 years ago

The engine needs a way to handle resources or assets. Any "object" that is not a system (Scene Manager, Input Manager, Renderer, etc) is a resource, and should be managed by something in order to keep track of their allocation and lifetime.

A Resource Manager should hold instances of Resource objects, each of them being a specialized Resource subclass. Examples of resources are:

Renderable or interactible resources should lend a handle or pointer to it's counterpart in the scene graph.

Related issues:

fesoliveira014 commented 2 years ago

Currently GeometryData holds the GL buffers for a given geometry. This is not ideal, as it should only hold data. Every GL object (buffers, VAO, shaders, etc) should be a "resource" so there are no duplicates of it in the code. That means that for a given GeometryData gd we should have a GeometryAsset or GeometryRes that will hold the buffers for that data, i.e. vertex buffer, index buffer, etc.