MartijnHagenaars / LAGGED

Learning About Graphics and Game Engine Development
0 stars 0 forks source link

Research methods of sharing OpenGL objects between multiple windows #26

Open MartijnHagenaars opened 1 year ago

MartijnHagenaars commented 1 year ago

It turns out that performance for shared contexts sucks and that VAOs are not shared between contexts. This sucks, and I should try to find a solution for this.

MartijnHagenaars commented 1 year ago

A possible design is that every window keeps track of what objects are used in a scene. When a new object is created, the object is created from a list of pre-created object types (model, texture, etc.) and automatically creates the VBO and VAO based on that. All the other data (like vertices, texture data, etc.) could be loaded beforehand, and stored in a resource manager. Might be a bit too limited, but could be a solution.