Brendan Iribe, center, co-founder of Oculus VR, dropped out of U-Md. as a freshman and is now donating $31 million to the school for scholarships and a new computer science center. (Photo by John Consoli/University of Maryland)

Brendan Iribe dropped out of college during his freshman year at the University of Maryland to join a throng of young entrepreneurs hoping to shake up the world with high-tech start-ups.

Iribe’s brief tenure in College Park was followed by extraordinary successes in video-game technology, as he held key positions in companies that sold for millions or hundreds of millions of dollars. His latest venture, Oculus VR, which developed the Oculus Rift virtual-reality headset, sold to Facebook for $2 billion this year.

On a recent visit to U-Md. — where Iribe first met his business partner, Michael Antonov, in a freshman dorm in 1998 — the 35-year-old Californian attended a school-sponsored “hackathon,” in which students use technology to solve a problem in a short amount of time. He met with professors and spoke to hundreds of students, impressed with their energy. But walking into the computer science center on campus, he said he found the facility “depressing” and “a lot worse than I remembered it.”

So Iribe, originally from Montgomery County and a graduate of Atholton High School in Howard County, has pledged $31 million to the University of Maryland to fund scholarships and a new computer science building on the College Park campus, a record donation for the school. The gift is scheduled to be announced Friday.

Most of the donation — $30 million — will support plans for a $140 million computer science center, to be named after Iribe, near the university entrance at Route 1 and Campus Drive. The school’s previous donation record — $30 million — was reached three times in separate gifts announced in 2005 for various projects in engineering, bioengineering, biomedical devices, business education and performing-arts programs.

“The University of Maryland was an inspiration for me, and the relationships I made there have lasted a lifetime,” Iribe said. “I’ve always wanted to give back to the school and public education system, and I hope this building will shape the future of computer science students at the university. The space is designed for hackers, makers and engineers, which will help give rise to future breakthroughs, products and start-ups that will transform the way we live and interact with the world around us.”

U-Md. also plans to announce that Oculus VR co-founder Antonov, a 2003 U-Md. graduate, is giving $4 million to the university for the building and scholarships. Iribe’s mother, Elizabeth Trexler, is giving $3 million to endow two professorships in computer science.

The gifts, totaling $38 million, will boost a popular department at College Park that has outgrown its space. There were about 1,300 undergraduates majoring in computer science at U-Md. in fall 2013, up from about 760 in fall 2009. That makes computer science the second most-popular undergraduate field of study at the university, behind biological sciences, which has about 1,700 students who have declared it as their major.

Samir Khuller, a computer science professor who chairs the department, said that since 1988, computer science has been based in what was meant to be temporary quarters in the A.V. Williams building. Khuller said the department shares the building with specialists in electrical and computer engineering and an institute for systems research.

When the new center is built, he said, it will become a hub for innovators, with computer labs, an auditorium and meeting places. Maryland plans to open the facility in late 2017.

University President Wallace D. Loh called it “a unique space where students from all disciplines can imagine, build, collaborate, and succeed together.”

The idea for the gift began to develop after the death of Andrew Reisse in 2013. Reisse, a colleague at Oculus VR, had roomed with Antonov in College Park. To honor him, Iribe, Antonov and Reisse’s parents teamed up to create a scholarship in Reisse’s name.

That got Iribe to thinking about his own legacy at Maryland.

When he returned to College Park this year for the “Bitcamp” hackathon, he spoke about the importance of investing in students and wanted them to have something better than the facilities at A.V. Williams.

“We walked in, and it felt kind of depressing,” Iribe said. He quickly embraced plans for a new center. “Just something that felt like the right thing to do: to give back to the University of Maryland, where Mike and I met.”

After leaving Maryland, Iribe worked as a software programmer, developing the user interface for the Civilization IV video game. He and Antonov then co-founded Scaleform, a technology firm that let developers more easily convert video games to mobile platforms. That company sold for $36 million in 2011. Iribe then went to Gaikai — a company that let people stream video games — which was purchased by Sony for $380 million in 2012.

Iribe and Antonov co-founded Oculus with Palmer Luckey in 2012, working to develop “immersive virtual reality” such as the Oculus Rift, technology that lets users interact with a virtual world through a wearable headset. Antonov is the company’s chief software architect, and Iribe is the company’s chief executive.

Hoping to inspire Maryland’s current and future students, Iribe said he believes that computer science itself is on the cusp of big changes.

“I like to think of it as this new field,” Iribe said. “Instead of computer science, it’s going to be virtual science.”

Although it clearly worked out for him, Iribe counseled students not to follow his educational path.

“They should definitely finish school,” he said. “They shouldn’t drop out. That’s an insane, crazy risk.”

Hayley Tsukayama contributed to this report.