Skip to main content
GameDev.net gamedev.net

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Model Manager changes

Model Manager changes

Nit
Abwood's Coding Notes · · 1 min read
1,950 0
Classic move on my part. Before I jump into Animation Channels as I said I would in my last post, I decided to fix a few things bugging me with my ModelMGR.

The way things currently work is that each model has a corresponding texture with the same name (obviously different extension, but you get the point). Well, this is obviously a crappy design, because if I wanted to change the skin for a model, I would need to duplicate that model and rename it to match that skin. Furthermore, I couldn't share textures across models (e.g., the goatee and hair textures are the exact same texture, but are duplicated at the moment). I've know that this is a problem, and its a good time to address it.

So once I have models specifying their texture, rather than using a predefined texture, I want to optimize the model rendering. To minimize the number of texture binds I will have, I need to sort the models by texture. My texture manager will ignore bind calls that try to bind a texture that is already bound, so this should save some overhead. This is my task for the weekend.

Discussion

Loading comments...