Ok, Just wondering i know a ptr can equal another ptr, but in this code
the second parameter of glGenTextures is supposed to be a pointer to a
GLuint, but the address of textureId is passed as the parameter, how come
this works? like textureId is not defined as a pointer to a GLuint, does does this mean that if i want to use a pointer to something of a type i just use &something? Could someone please explain this
Code:
GLuint textureId;
glGenTextures(1, &textureId);
glGenTextures Function
The glGenTextures function generates texture names.
Syntax
Code:
void glGenTextures(
GLsizei n,
GLuint *textures
);
Parameters
n
The number of texture names to be generated.
textures
A pointer to the first element of an array in which the generated texture names are stored.
Thanx