Prosecutors recounted the shooting at Italy High School, south of Dallas, during a juvenile court hearing Wednesday for the boy accused in the attack.
He is charged with two counts of aggravated assault with a deadly weapon. Authorities haven't released his name because he's a juvenile.
Prosecutors say he repeatedly shot the 15-year-old girl in the school cafeteria Monday before taking aim at the second student.
The girl is hospitalised and expected to survive. Authorities haven't released a motive. Prosecutors say the boy appeared to be angry with the girl.