There’s a datatype in Open GL called GLenum which can hold from 0 up to 4,294,967,295. Anywhere I’ve seen it used I’ve never found any difference between it and GLInt. And another datatype that I cannot understand is GLsizei because it’s completely the same as Glint(at least it seems so.) What are the uses of GLenum and GLsizei and how are they different from Glint?
Share
The names kinda give away the purpose.
GLenumis for enums.GLsizeiis for sizes. These aren’t complicated concepts here. OpenGL is simply providing some semantic association between values and types.If a function takes a
GLenum, then you should pass one of theGL_...enumerators to it. If it takes aGLsizei, you should pass a size. They are different fromGLintin that they mean something different, not that they’re bigger or smaller.Size doesn’t matter; it’s what you do with it that counts.