I've done this in training with my M4. That obviously by no means makes me an expert. However, from the front passenger seat, I wore eye protection and was trained to hold my breath while shooting... So you don't breath in tiny shards of glass. Apparently, glass in lungs = bad.
Also the bullet will pass through the path of least resistance. In the case of slanted glass, it will bend the path until it is perpendicular to the glass. In other words, from inside a car, the bullet will hit the glass and go flying high. So... You can either aim low and try to compensate, but that is an iffy proposition at best... Especially as your target would be probably at least 10 ft in front of you if not much more. Plus, you may do like I did and send a few rounds through the hood when the rounds started going through the hole in the glass caused by previous rounds. So, the lesson was to just aim and shoot at your target and after enough rounds go through the glass to create a larger hole, you'll start seeings hits on your target.
Of course, the spider web cracks in your glass will probably start obstructing your aim. Assumedly, while you're firing, the driver (whose job it is to drive, by the way) is doing his or her best to get you away from or through your threat. In other words, chaotic, and you are probably not going to win any marksmanship awards. Hopefully, you'll survive long enough to get away or bail out and fight from cover.