(CNN) -- Former Rutgers University student Dharun Ravi apparently tried to make amends with his estranged roommate Tyler Clementi after allegedly using a webcam to spy on Clementi's sexual encounter with another man, according to text messages revealed in court Wednesday. Clementi committed suicide soon after the texts were sent.
It is not clear if Clementi ever received the messages.
"I've known you were gay and I have no problem with it," read messages sent by Ravi, according to authorities.
Ravi apparently sent the messages after he learned that Clementi had requested a room change.
They were sent September 22, 2010, the same night Clementi took his own life by leaping from the George Washington Bridge, which spans the Hudson River between New York and New Jersey.
Prosecutors have said Ravi and another student placed the camera in the dormitory room without Clementi's knowledge to spy and humiliate him because he was gay.
Ravi's lawyer, Steve Altman, has said his client had switched on the webcam to monitor his personal items because he did not trust his roommate's visitor.
The man who Clementi was intimate with, identified only as M.B., testified last week that after one encounter he "could hear people talking in the courtyard. People joking, people laughing."
Ravi, 20, now faces a 15-count indictment in Clementi's death that includes charges of bias intimidation, invasion of privacy, tampering with physical evidence, witness tampering and hindering apprehension or prosecution. His trial began last Friday.
If convicted, he faces up to 10 years in prison.
Last year, he turned down a plea deal that would have allowed him to avoid jail time.
Less than a month after Clementi's suicide, President Obama released a videotaped message condemning bullying.