OpenGL define its own datatype. Such as GLint or GLsizei. And they are different across platforms. Where can I find limits for the types?
Edit
Added language tag to clarify domain. And I know that GL* types will be resolved into basic C types, but it can be different by platform. (actually that’s why they are defined.) And even basic C types are not guaranteed to be fixed size on any platform. That’s why the limit.h is exist, and I expect there’s also similar thing in GL itself for GL* types because they’re semantically different with C types, and it means they need their own limit definitions.
Assuming you are using C++ you can use
std::numeric_limits<GLint>::max()to get the correct maximum value for a type or any other property of the type.The spec doesn’t guarantee that
GLintis actually aninton any platform but only that it is an at least 32bit wide signed integral type, so MAX_INT is the lower size bound on a platform whereintis actually 32 bits wide (e.g.x86_64).