Facebook Inc Chief Executive Officer Mark Zuckerberg took the witness stand in Dallas federal court on Tuesday and denied an allegation by a rival company that the virtual-reality technology of Facebook's Oculus unit was stolen.

Zuckerberg, wearing a dark suit and striped tie rather than his typical T-shirt and jeans, began testifying at 9 a.m. local time (1500 GMT) and 2 1/2 hours later was still answering questions posed by a lawyer for videogame publisher ZeniMax Media Inc.

ZeniMax sued Oculus in 2014 as Facebook was in the process of buying the startup for $2 billion. The publisher said that Oculus unlawfully gained access to ZeniMax's intellectual property while developing the virtual-reality system that includes the Rift headset.

Zuckerberg told a jury in the crowded courtroom that those claims are false. ‘Oculus products are based on Oculus technology,’ he said.

Under questioning from ZeniMax lawyer Tony Sammi, the 32-year-old billionaire addressed how Facebook's investment in virtual reality came together. Zuckerberg said the purchase of Oculus included not only the $2 billion price but also $700 million to retain employees and $300 million in payouts for reaching milestones.

Zuckerberg said the Oculus deal was done over a weekend in 2014, which Sammi said in court does not show due diligence.

At the time, Zuckerberg testified, he was not aware of the claims against Oculus.

‘It's pretty common when you announce a big deal that people just come out of the woodwork and claim they own some part of the deal,’ Zuckerberg said.

The lawsuit, in the sixth day of a jury trial, relates in part to programmer John Carmack.

Well-known for helping to conceive games such as ‘Quake’ and ‘Doom,’ Carmack worked for id Software LLC before that company was acquired by ZeniMax. He is now the chief technology officer at Oculus.

Zuckerberg denied that Carmack has used computer code from his previous position to unfairly help Oculus. ‘There is no shared code in what we do,’ he said.

Zuckerberg said he has been interested in virtual reality since he was a student, but thought it was decades away from happening before he encountered Oculus.

‘We want to get closer to this kind of perfect representation, so you can capture a moment you had,’ he said.

The case is ZeniMax Media Inc et al v. Oculus VR Inc et al, US District Court for the Northern District of Texas, No. 3:14-cv-1849.