googlevr / cardboard

Open source Cardboard SDK and samples
Other
1.49k stars 257 forks source link

Change stereoscopic view to monoscopic view in Android #427

Open stoiantashkov opened 1 year ago

stoiantashkov commented 1 year ago

Hello,

Can someone tell me how can I change stereoscopic view to monoscopic view in Android?

arilow commented 1 year ago

Thanks @stoiantashkov for reaching out to us!

Do you want to use monoscopic view on android native (Cardboard SDK) or Android with Unity (Cardboard XR Plugin?

Thanks!

stoiantashkov commented 1 year ago

Hello, I want to use on Android native (Cardboard SDK).

Thanks!

arilow commented 1 year ago

Cardboard is modular. Each module is designed to be used independently from the others (distortion renderer, QR code scanner, Lens Distortion, HeadTracker).

When rendering a monoscopic view, the easiest way to do it is directly using the OpenGL ES rendering API and Cardboard SDK’s Head Tracker module (i.e. not using the Lens Distortion and Distortion Renderer modules).

For instance, if you would like to make the Hello Cardboard sample app monoscope, you would need to, in HelloCardboardApp::OnDrawFrame(), instead of calling CardboardDistortionRenderer_renderEyeToDisplay call the method that renders your monoscopic plain OpenGL texture.

I hope this helps.