title: nvapi use of NvAPI_Stereo_SetDriverMode in d3d10
body: <p>I'm currently trying to set nvapi to work in a direct mode with the function NvAPI_Stereo_SetDriverMode. </p>
  
  <p>According to Nvidia nvapi <a href="http://developer.nvidia.com/nvapi" rel="nofollow">site</a> (in the manual), 
  if you would like to make a direct3d implementation you need to initialize nvpai , then set direct mode , then create the device (d3d10device) , and then create stereo handle ... (continue of the program).</p>
  
  <pre><code>NvAPI_Initialize();
  NvAPI_Stereo_SetDriverMode(g_StereoHandle , NVAPI_STEREO_DRIVER_MODE_DIRECT);
  D3D10CreateDeviceAndSwapChain(...,pD3D10Device);
  NvAPI_Stereo_CreateHandleFromIUnknown(pD3D10Device,&amp;g_StereoHandle );
  .....(the rest)
  </code></pre>
  
  <p>I tried it but then the function NvAPI_Stereo_SetActiveEye (which tells to which eye do I want to render my meshes)says the mode isn't in direct mode.</p>
  
  <p>When I looked at the header file I found out that the mode should be called after you create the handle. But when I did that it returned NVAPI_INVALID_ARGUMENT  (and again I can't set the active eye).</p>
  
  <pre><code>NvAPI_Initialize();
  D3D10CreateDeviceAndSwapChain(...,pD3D10Device);
  NvAPI_Stereo_CreateHandleFromIUnknown(pD3D10Device,&amp;g_StereoHandle );
  NvAPI_Stereo_SetDriverMode(g_StereoHandle , NVAPI_STEREO_DRIVER_MODE_DIRECT);
  .....(the rest)
  </code></pre>
  
  <p>Does anyone encountered the same problem?</p>
  
  <p>I've tried to look at examples with nvapi on the web but it seems it's new and the nvidia developer zone is down(due to some technical probs).</p>