Translations in C++ using tables with zero-based enums

January 11, 2015 in C++, Programming, Tips & Tricks by admin

c++From – a nice article about translations in C++ using tables with zero-based enums:

Few months ago, I got annoy that we had some code that translate API independent enumerations to OpenGL enumerations, back and forth, with basically no consideration at what happens when we add a new enumeration value in the API independent enumerations and no consideration of how this translation would perform within the rendering loop, where performance is critical and it’s typically going to be called. Considering the high number of translations per frame, probably it starts to matter.

For the entire article and more information, follow this link.