make glTexSubImage2D accept any pointer