Fixed some opengl to cuda mapping bugs