I often find that I need to include the header file for my OpenGL loading library in many of the header files within my own C++ project. In a lot of cases, this is just so I can access a particular GL type such as GLuint in order to declare a class member that can store the ID of an OpenGL object.
To avoid continually including this in every header file, would it be appropriate to store an OpenGL ID within an std::uint32_t instead? To my knowledge, it is guranteed to have the same range and the same number of bytes as a GLuint.
I was also wondering whether or not I could use C++ fixed-width integers to talk with OpenGL directly, or whether they should be cast to the appropriate OpenGL type before they are passed into any of the gl functions.
If nothing here that I’ve mentioned is a viable option, then is there another alternative to this problem that I haven’t considered?