pub unsafe fn submit(
        &self,
        eye: Eye,
        texture: &Texture,
        bounds: Option<&texture::Bounds>,
        pose: Option<[[f32; 4]; 3]>,
    ) -> Result<(), CompositorError> {
        use self::texture::Handle::*;
        let flags = match texture.handle {
            Vulkan(_) => sys::EVRSubmitFlags_Submit_Default,
            OpenGLTexture(_) => sys::EVRSubmitFlags_Submit_Default,
            OpenGLRenderBuffer(_) => sys::EVRSubmitFlags_Submit_GlRenderBuffer,
        } | if pose.is_some() {
            sys::EVRSubmitFlags_Submit_TextureWithPose
        } else {
            0
        };
        let texture = sys::VRTextureWithPose_t_real {
            handle: match texture.handle {
                Vulkan(ref x) => x as *const _ as *mut _,
                OpenGLTexture(x) => x as *mut _,
                OpenGLRenderBuffer(x) => x as *mut _,
            },
            eType: match texture.handle {
                Vulkan(_) => sys::ETextureType_TextureType_Vulkan,
                OpenGLTexture(_) => sys::ETextureType_TextureType_OpenGL,
                OpenGLRenderBuffer(_) => sys::ETextureType_TextureType_OpenGL,
            },
            eColorSpace: texture.color_space as sys::EColorSpace,
            mDeviceToAbsoluteTracking: sys::HmdMatrix34_t {
                m: pose.unwrap_or([[0.0; 4]; 3]),
            },
        };
        let e = self.0.Submit.unwrap()(
            eye as sys::EVREye,
            &texture as *const _ as *mut _,
            bounds
                .map(|x| x as *const _ as *mut texture::Bounds as *mut _)
                .unwrap_or(ptr::null_mut()),
            flags,
        );
        if e == sys::EVRCompositorError_VRCompositorError_None {
            Ok(())
        } else {
            Err(CompositorError(e))
        }
    }
/// Display the supplied texture for the next frame.
///
/// If `bounds` is None, the entire texture will be used. Lens distortion is handled by the OpenVR implementation.
///
/// # Safety
///
/// The handles you supply must be valid and comply with the graphics API's synchronization requirements.
Display the supplied texture for the next frame.
If `bounds` is None, the entire texture will be used. Lens distortion is handled by the OpenVR implementation.
Display the supplied texture for the next frame . If ` bounds ` is None the entire texture will be used . Lens distortion is handled by the OpenVR implementation .
pub unsafe fn submit(
        &self,
        eye: Eye,
        texture: &Texture,
        bounds: Option<&texture::Bounds>,
        pose: Option<[[f32; 4]; 3]>,
    ) -> Result<(), CompositorError> {
        use self::texture::Handle::*;
        let flags = match texture.handle {
            Vulkan(_) => sys::EVRSubmitFlags_Submit_Default,
            OpenGLTexture(_) => sys::EVRSubmitFlags_Submit_Default,
            OpenGLRenderBuffer(_) => sys::EVRSubmitFlags_Submit_GlRenderBuffer,
        } | if pose.is_some() {
            sys::EVRSubmitFlags_Submit_TextureWithPose
        } else {
            0
        };
        let texture = sys::VRTextureWithPose_t_real {
            handle: match texture.handle {
                Vulkan(ref x) => x as *const _ as *mut _,
                OpenGLTexture(x) => x as *mut _,
                OpenGLRenderBuffer(x) => x as *mut _,
            },
            eType: match texture.handle {
                Vulkan(_) => sys::ETextureType_TextureType_Vulkan,
                OpenGLTexture(_) => sys::ETextureType_TextureType_OpenGL,
                OpenGLRenderBuffer(_) => sys::ETextureType_TextureType_OpenGL,
            },
            eColorSpace: texture.color_space as sys::EColorSpace,
            mDeviceToAbsoluteTracking: sys::HmdMatrix34_t {
                m: pose.unwrap_or([[0.0; 4]; 3]),
            },
        };
        let e = self.0.Submit.unwrap()(
            eye as sys::EVREye,
            &texture as *const _ as *mut _,
            bounds
                .map(|x| x as *const _ as *mut texture::Bounds as *mut _)
                .unwrap_or(ptr::null_mut()),
            flags,
        );
        if e == sys::EVRCompositorError_VRCompositorError_None {
            Ok(())
        } else {
            Err(CompositorError(e))
        }
    }
pub unsafe fn submit ( & self , eye : Eye , texture : & Texture , bounds : Option < & texture :: Bounds > , pose : Option < [ [ f32 ; 4 ] ; 3 ] > , ) -> Result < ( ) , CompositorError > { use self :: texture :: Handle :: * ; let flags = match texture . handle { Vulkan ( _ ) => sys :: EVRSubmitFlags_Submit_Default , OpenGLTexture ( _ ) => sys :: EVRSubmitFlags_Submit_Default , OpenGLRenderBuffer ( _ ) => sys :: EVRSubmitFlags_Submit_GlRenderBuffer , } | if pose . is_some ( ) { sys :: EVRSubmitFlags_Submit_TextureWithPose } else { 0 } ; let texture = sys :: VRTextureWithPose_t_real { handle : match texture . handle { Vulkan ( ref x ) => x as * const _ as * mut _ , OpenGLTexture ( x ) => x as * mut _ , OpenGLRenderBuffer ( x ) => x as * mut _ , } , eType : match texture . handle { Vulkan ( _ ) => sys :: ETextureType_TextureType_Vulkan , OpenGLTexture ( _ ) => sys :: ETextureType_TextureType_OpenGL , OpenGLRenderBuffer ( _ ) => sys :: ETextureType_TextureType_OpenGL , } , eColorSpace : texture . color_space as sys :: EColorSpace , mDeviceToAbsoluteTracking : sys :: HmdMatrix34_t { m : pose . unwrap_or ( [ [ 0.0 ; 4 ] ; 3 ] ) , } , } ; let e = self . 0 . Submit . unwrap ( ) ( eye as sys :: EVREye , & texture as * const _ as * mut _ , bounds . map ( | x | x as * const _ as * mut texture :: Bounds as * mut _ ) . unwrap_or ( ptr :: null_mut ( ) ) , flags , ) ; if e == sys :: EVRCompositorError_VRCompositorError_None { Ok ( ( ) ) } else { Err ( CompositorError ( e ) ) } }
Display the supplied texture for the next frame.
Display the supplied texture for the next frame .
&self
eye
Eye
texture
&Texture
bounds
Option<&texture::Bounds>
pose
Option<[[f32; 4]; 3]>
safety
The handles you supply must be valid and comply with the graphics API's synchronization requirements.
The handles you supply must be valid and comply with the graphics API ' s synchronization requirements .