I like to be more standard as possible, so why should I “constrain” my classes defining it’s members as OpenGL types when I can use primitive types? Is there any advantage?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The type “unsigned int” has a different size depending on the platform you’re building on. I expect this to normally be 32 bits, however it could be 16 or 64 (or something else — depending on the platform).
Library-specific types are often created to be typedef’d according to platform-specific rules. This allows a generic application to use the right type without having to be aware of the platform it will be built for. Instead, the platform-specific knowledge is constrained to a single common header file.