Original Post
I'm currently rethinking my texture object design, and I was wondering how you handle different texture parameters. Basically I was thinking of having something like this: And then whenever a texture is bound, check if the static values are the same as the local values for that texture and if not update them (and call the relevant API calls). However this seems redundant as most textures will have the same values. I could maybe store the texture objects depending on the texture parameters somehow, and handle it from there.
struct CTextureObject
{
unsigned int texID;
unsigned short tileX, tileY, magFilter, minFilter;
static unsigned int currentBoundTexID;
static unsigned short currentTileX, currentTileY, currentMagFilter, currentMinFilter
}