/// <summary> /// Ends a frame, submitting the rendered textures to the frame buffer. /// - RenderViewport within each eyeTexture can change per frame if necessary. /// - 'renderPose' will typically be the value returned from ovrHmd_GetEyePoses, /// ovrHmd_GetHmdPosePerEye but can be different if a different head pose was /// used for rendering. /// - This may perform distortion and scaling internally, assuming is it not /// delegated to another thread. /// - Must be called on the same thread as BeginFrame. /// - *** This Function will call Present/SwapBuffers and potentially wait for GPU Sync ***. /// </summary> public void EndFrame(Posef[] renderPose, Texture[] eyeTexture) { Texture_Raw[] raw = new Texture_Raw[eyeTexture.Length]; for (int i = 0; i < eyeTexture.Length; i++) { raw[i] = eyeTexture[i].ToRaw(); } ovrHmd_EndFrame(HmdPtr, renderPose, raw); }
internal override Texture_Raw ToRaw() { Texture_Raw config = new Texture_Raw(); config.Header = this.Header; config.PlatformData_0 = this._IDirect3DTexture9_pTexture; return config; }
internal override Texture_Raw ToRaw() { Texture_Raw config = new Texture_Raw(); config.Header = this.Header; config.PlatformData_0 = this._ID3D11Texture2D_pTexture; config.PlatformData_1 = this._ID3D11ShaderResourceView_pSRView; return config; }
internal override Texture_Raw ToRaw() { Texture_Raw config = new Texture_Raw(); config.Header = this.Header; config.PlatformData_0 = this._texId; return config; }