I'm writing a stereoscopic player. All parts(decoding, rendering) except Stereoscopic mode are done. But with 3D I have some troubles. Im using NVAPI and D3D9. Render loop looks like that:
render()
{
begin_scene();
set_left_eye();
stretch_left_side_of_surface();
set_right_eye();
stretch_right_side_of_surface();
end_scene();
present();
}
It's just like described in whitepapers. But there is no stereo effect in result. Just right eye's picture. But glasses are working(so, they are controlled by the app). What am I doing wrong? Can someone explain me how to render stereo images using d3d9 and nvapi?
I noticed that each eye should be rendered in a different scene (i.e. wrapped with begin_scene() and end_scene()).
I'm not sure if it is necessary, but I think it is better to set active eye before each begin_scene() (and not during the scene).
As follows: