I think the exact conversion is:
GLuint a; glGenTextures(1, &a);
There is:
import Foreign.Marshal.Utils( with ) with a $ \dir_a -> glGenTextures 1 dir_a
If you need to pass an array, you can use withArray , which get the list, and reserve and initialize the buffer with this list. In addition, allocaArray can create a buffer for you without initializing it.
source share