'OpenGL & Multiview

I am trying to implement multiview using OpenGL ES. I have created a vertex shader in that I specified

#extension GL_OVR_multiview : enable
layout(num_views=2) in;

And I am sending 2 MVPs (model view projection matrices). I have created an FBO with array texture as an attachment. I am binding this FBO and rendering it and everything is working fine and as expected.

Now my question is: is it possible to render to only one view in one draw call even though I specified 2 views? I want to render it to a single view per draw call and change the view index in the vertex shader. Is it possible to change gl_ViewID_OVRin the vertex shader??

Please help me with this.

Thank you.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source