I'm trying to use this as a sort of more verbose way to use flags, and also to remove littering of namespaces by not using them. Unfortunately, C++11 doesn't allow a lot of operations you could perform with non-enum flag types, so I have to try to find a (hopefully not very hacky) way around this. Maybe I could use a template-based solution to get around this? (I'd prefer not to use a macro for this, as they just pollute global namespace, which is exactly the type of thing I'm trying to avoid)
I guess the simplest way to do this all would be to do something like:
and: vb = rbe->CreateVertexBuffer(RBE::UsageFlags::DYNAMIC, sizeof(VertexPC) * 3);
Unfortunately it's being defined as a type that's local to a class, so I can't create a namespace in there. I assume my only option is the struct + enum workaround?
Yeah, that's what I ended up doing, but I just cleaned it up with some macros (but is using macros really "cleaning it?" Lol). Now it's something like: