title: How to display a 2D image in a GvrView on Android?
body: <p>I'm currently working on an <strong>Android</strong> app to <strong>display 3D pictures using VR</strong>. Every 3D picture consists of <strong>two images</strong> taken from slightly different perspectives: one for the right eye, and one for the left eye. Now I need to display them side-by-side with <strong>distortion correction</strong> applied. While the side-by-side part should be pretty easy to implement, the distortion correction is a different matter.</p>
  
  <p>The obvious library to look into for VR distortion correction was the <a href="https://developers.google.com/vr/android/reference_overview" rel="nofollow">Google VR SDK</a>. However, I can't really find the functionality I need. Apparently there are two ways to display 3D content in the Google VR SDK:</p>
  
  <ul>
  <li>Either you use the <strong>VR Panorama View</strong>, which may seem like the obvious solution because it was created to display 3D images. However, it unfortunately expects a 360 degrees panorama. It therefore applies the given texture to a 360 degree photosphere so that you can only see a tiny part of the image. Also, the merging points above, below and behind look very weird.</li>
  <li>The other option which I am now looking at is to use a <strong>GvrView</strong> in a GvrActivity. The GvrView uses a GvrView.StereoRenderer to display its content. This seems very similar to the normal GLSurfaceView which enables you to display OpenGL content using a GLSurfaceView.Renderer. But while I managed to set a <strong>background image</strong> in a GLSurfaceView using setBackgroundResource(), the background in a GvrView remains black if I call the same method.</li>
  </ul>
  
  <p>Now my question is: Is there any way to <strong>display a 2D picture in a GvrView</strong> (with or without GvrView.StereoRenderer)? </p>
  
  <p>Or if that is not the case: Would the best way be to draw the image onto a square and make it take up the whole field of view? Or should I do the distortion by myself in the first place? If so, do you know a good way to do this?</p>
  
  <p>If you have any ideas, please answer. Thank you very much in advance!</p>
  
  <p>Skoebuga</p>