GL_OVR_multiview_multisampled_render_to_texture#

Valid APIs#

OpenGL ES 3.0+

Description#

This extension brings multisampling to multiview rendering.

Example#

GLsizei width  = ...;
GLsizei height = ...;
GLint samples = ...;
GLsizei views = 2;
glGenTextures(views, tex);
/* Create a colour texture */
glBindTexture(GL_TEXTURE_2D_ARRAY, tex[0]);
glTexStorage3D(GL_TEXTURE_2D_ARRAY, 1, GL_RGBA8, width, height, views );
/* Create a depth texture */
glBindTexture(GL_TEXTURE_2D_ARRAY, tex[1]);
glTexStorage3D(GL_TEXTURE_2D_ARRAY, 1, GL_DEPTH_COMPONENT24, width, height, views )
/* attach the render targets */
glFramebufferTextureMultisampleMultiviewOVR(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, tex[0], 0, samples, 0, views);
glFramebufferTextureMultisampleMultiviewOVR(GL_DRAW_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, tex[1], 0, samples, 0, views);
/* .. draw to multisampled multiview .. */