Resolve an error with gcc not quite understanding the kernel constants (these do need to be cleaned up).
Also resolved two warnings about int casts to void * in GL related code. Used size_t instead of unsigned int.