1

The way OpenGL Datatypes are used there confuses me a bit. There is for example the unsigned integer "GLuint" and is is used for shader-objects as well as various different buffers-objects. What is this GLuint and what are these datatypes about?

genpfault
  • 51,148
  • 11
  • 85
  • 139
Pinguin
  • 11
  • 2

1 Answers1

0

They are, in general, just aliases for different types. For example GLuint is normally a regular uint. The reason they exist is because the graphics driver expects a specific integer size, e.g. a uint64_t, but data types like int are not necessarily consistent across compilers and architectures.

Thus OpenGL provides it's own type aliases to ensure that handles are always exactly the size it needs to function properly.

Makogan
  • 8,208
  • 7
  • 44
  • 112