Beckett and model loading
Model loading in Beckett Engine is a bit wonky, especially when trying to unload a model. I'm thinking of rewriting it a bit.
Say you have a file monkeyhead.fbx. Call the Model constructor, passing that file name, to get a Model. You can now mess with the textures and armature, disable specific meshes, and Draw it in a given position.
Calling the Model constructor again with the same file name attempts to save on VBOs and such, it's kind of a mess.
Forgo the cache entirely. Loading two Suzannes means loading two Suzannes, and each of them will have their own data on the OpenGL side of things instead of sharing a VBO and all that. Simple but inefficient. If the two models have to be animated, textured, and/or positioned differently, you can still do that.
Move the cache out of the Model class' responsibility. Have a specific LoadModel function that either constructs the first copy from scratch, or returns the first Model (smart pointer?). I feel like destroying the OpenGL data when both monkeys are deleted would be the hardest part.
I think you know what the question is.
A: Simple but wasteful
B: Smarter but harder
C: Better suggestion in the comments/replies (NOT see results)
Voting ended onJun 10