[][src]Struct ugli_webgl::WEBGL_multiview

pub struct WEBGL_multiview(_);

Extension

Calling framebufferTextureMultiviewWEBGL with a non-null texture parameter that does not identify a 2D array texture generates an INVALID_OPERATION error. The values of baseViewIndex and numViews can result in an error only if the texture parameter is non-null. If baseViewIndex is not the same for all framebuffer attachment points where the value of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is not NONE the framebuffer is considered incomplete. Calling getFramebufferStatus for a framebuffer in this state returns FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR. Other rules for framebuffer completeness from the OVR_multiview specification also apply. Other web APIs may expose opaque multiview framebuffers. Opaque multiview framebuffers are WebGLFramebuffer objects that act as if they have multi-view attachments, but their attachments are not exposed as textures or renderbuffers and can not be changed. Opaque multiview framebuffers may have any combination of color, depth and stencil attachments. Calling framebufferRenderbuffer, framebufferTexture2D, framebufferTextureLayer, framebufferTextureMultiviewWEBGL, or any other call that could change framebuffer attachments with an opaque multiview framebuffer bound to target generates an INVALID_OPERATION error. If an opaque framebuffer is bound to target when calling getFramebufferAttachmentParameter, then attachment must be BACK, DEPTH, or STENCIL. If an opaque framebuffer is bound to target when calling getFramebufferAttachmentParameter, then pname must not be FRAMEBUFFER_ATTACHMENT_OBJECT_NAME. Querying FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR on an opaque multiview framebuffer attachment point that has attachments must return the number of views in the opaque multiview framebuffer. Querying FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR on an opaque multiview framebuffer must return 0. Querying FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE on an opaque multiview framebuffer must return FRAMEBUFFER_DEFAULT. The number of views in an opaque multiview framebuffer may be greater than the maximum number of texture array views (the value of MAX_VIEWS_OVR). Passing an opaque multiview framebuffer to deleteFramebuffer generates an INVALID_OPERATION error. Although the extension name is prefixed with WEBGL the extension must be enabled with the #extension GL_OVR_multiview directive, as shown in the sample code, to use the extension in a shader. Likewise the shading language preprocessor #define GL_OVR_multiview, will be defined to 1 if the extension is supported. This extension relaxes the restriction in OVR_multiview that only gl_Position can depend on ViewID in the vertex shader. With this change, view-dependent outputs like reflection vectors and similar are allowed. When the number of views specified in the active program is one, gl_ViewID_OVR will always evaluate to zero. When a shader written in OpenGL ES shading language version 1.00 enables or requires GL_OVR_multiview with an extension directive, layout is treated as a keyword rather than an identifier, and using a layout qualifier to specify num_views is allowed. Other uses of layout qualifiers are not allowed in OpenGL ES shading language 1.00. In OpenGL ES shading language version 1.00 gl_ViewID_OVR has the type int as opposed to uint. When a timer query is active and the number of views in the current draw framebuffer is greater than one, attempting to draw or calling clear generates an INVALID_OPERATION error. When the number of views in the current draw framebuffer is greater than one and the active program does not declare a number of views, attempting to draw generates an INVALID_OPERATION error. Adds support for rendering into multiple views simultaneously. This is supported for opaque multiview framebuffers starting from WebGL 1.0, and 2D texture arrays starting from WebGL 2.0. When a shader enables, requires, or warns GL_OVR_multiview with an extension directive:

  • gl_ViewID_OVR is a built-in input of the type uint.

The GLSL macro GL_OVR_multiview is defined as 1.

Methods

impl WEBGL_multiview[src]

pub const FRAMEBUFFER_ATTACHMENT_TEXTURE_BASE_VIEW_INDEX_OVR: GLenum[src]

pub const FRAMEBUFFER_ATTACHMENT_TEXTURE_NUM_VIEWS_OVR: GLenum[src]

pub const FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR: GLenum[src]

pub const MAX_VIEWS_OVR: GLenum[src]

pub fn framebuffer_texture_multiview_webgl(
    &self,
    target: GLenum,
    attachment: GLenum,
    texture: Option<&WebGLTexture>,
    level: GLint,
    base_view_index: GLint,
    num_views: GLsizei
)
[src]

Trait Implementations

impl AsRef<Reference> for WEBGL_multiview[src]

impl Clone for WEBGL_multiview[src]

impl Debug for WEBGL_multiview[src]

impl Extension for WEBGL_multiview[src]

impl From<WEBGL_multiview> for Reference[src]

impl InstanceOf for WEBGL_multiview[src]

impl JsSerialize for WEBGL_multiview[src]

impl JsSerializeOwned for WEBGL_multiview[src]

impl<'_r> JsSerializeOwned for &'_r WEBGL_multiview[src]

impl ReferenceType for WEBGL_multiview[src]

impl<'_r> TryFrom<&'_r Reference> for WEBGL_multiview[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'_r> TryFrom<&'_r Value> for WEBGL_multiview[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Reference> for WEBGL_multiview[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Value> for WEBGL_multiview[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<WEBGL_multiview> for Reference[src]

type Error = Void

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.