Black screen when trying to record 3D applications

I’m trying to record a few games but they all cause me problems. I start recording from the normal user space (with simplescreenrecorder or gtk-recordmydesktop), and then when I switch to a game (e.g. Team Fortress 2) the screen goes black/grey -on the video. I tried using several combinations of codecs and containers, with no success.

Is there any codec to make things work?

openSUSE 13.2 x86_64
R9 270X with 14.12 (14.15) drivers
Steam