I’ve been learning more about OpenGL recently, and there’s one aspect about retrieving function pointers to the OpenGL function implementations in your local drivers that I can’t quite understand (https://learnopengl.com/Getting-started/Creating-a-window):
It is then the task of the developer to retrieve the location of the functions he/she needs and store them in function pointers for later use.
What does it mean to get a function pointer to some memory location in a device driver? Are there any restrictions with doing so? It seems that allowing a user space process to call a kernel space function directly by memory location would not be very safe. Plus, where in the process’s virtual address space would the memory location even be?
My understanding is that interfacing with drivers is usually done through system calls. So perhaps instead OpenGL functions are pointers to the system call function + the parameter is made?
If I’m misunderstanding the process, I’d love to learn more about how user space processes can interact with code from drivers.