示例#1
0
 public GLTextureData(Sizei textureSize, Recti renderViewport, IntPtr texId)
 {
     Header.API = RenderAPIType.OpenGL;
     Header.TextureSize = textureSize;
     Header.RenderViewport = renderViewport;
     _texId = texId;
 }
示例#2
0
		private static extern sbyte ovrHmd_AttachToWindow(
				IntPtr hmd,
			   	IntPtr window,
			   	Recti destMirrorRect,
			   	Recti sourceRenderTargetRect);
示例#3
0
		private static extern void ovrHmd_GetRenderScaleAndOffset(
				FovPort fov,
				Sizei textureSize,
				Recti renderViewport,
				[MarshalAs(UnmanagedType.LPArray, SizeConst = 2)]
				[Out] Vector2f[] uvScaleOffsetOut);
示例#4
0
        /// <summary>
		/// Computes updated 'uvScaleOffsetOut' to be used with a distortion if render target size or
		/// viewport changes after the fact. This can be used to adjust render size every frame if desired.
        /// </summary>
		public Vector2f[] GetRenderScaleAndOffset(FovPort fov, Sizei textureSize, Recti renderViewport)
		{
			Vector2f[] uvScaleOffsetOut = new Vector2f[] { new Vector2f(), new Vector2f() };
			ovrHmd_GetRenderScaleAndOffset(fov, textureSize, renderViewport, uvScaleOffsetOut);
			return uvScaleOffsetOut;
		}
示例#5
0
        /// <summary>
		/// Platform specific function to specify the application window whose output will be 
		/// displayed on the HMD. Only used if the ovrHmdCap_ExtendDesktop flag is false.
		///   Windows: SwapChain associated with this window will be displayed on the HMD.
		///            Specify 'destMirrorRect' in window coordinates to indicate an area
		///            of the render target output that will be mirrored from 'sourceRenderTargetRect'.
		///            Null pointers mean "full size".
		/// @note Source and dest mirror rects are not yet implemented.
        /// </summary>
		public bool AttachToWindow(Recti destMirrorRect, Recti sourceRenderTargetRect)
		{
			return ovrHmd_AttachToWindow(HmdPtr, IntPtr.Zero, destMirrorRect, sourceRenderTargetRect);
		}
示例#6
0
 public D3D11TextureData(Sizei textureSize, Recti renderViewport, IntPtr ID3D11Texture2D_pTexture, IntPtr ID3D11ShaderResourceView_pSRView)
 {
     Header.API = RenderAPIType.D3D11;
     Header.TextureSize = textureSize;
     Header.RenderViewport = renderViewport;
     _ID3D11Texture2D_pTexture = ID3D11Texture2D_pTexture;
     _ID3D11ShaderResourceView_pSRView = ID3D11ShaderResourceView_pSRView;
 }
示例#7
0
 public D3D9TextureData(Sizei textureSize, Recti renderViewport, IntPtr IDirect3DTexture9_pTexture)
 {
     Header.API = RenderAPIType.D3D9;
     Header.TextureSize = textureSize;
     Header.RenderViewport = renderViewport;
     _IDirect3DTexture9_pTexture = IDirect3DTexture9_pTexture;
 }
示例#8
0
        /// <summary>
		/// Platform specific function to specify the application window whose output will be 
		/// displayed on the HMD. Only used if the ovrHmdCap_ExtendDesktop flag is false.
		///   Windows: SwapChain associated with this window will be displayed on the HMD.
		///            Specify 'destMirrorRect' in window coordinates to indicate an area
		///            of the render target output that will be mirrored from 'sourceRenderTargetRect'.
		///            Null pointers mean "full size".
		/// @note Source and dest mirror rects are not yet implemented.
        /// </summary>
        public bool AttachToWindow(Recti destMirrorRect, Recti sourceRenderTargetRect, IntPtr WindowPtr = default(IntPtr))
		{
            return ovrHmd_AttachToWindow(HmdPtr, WindowPtr, destMirrorRect, sourceRenderTargetRect) != 0;
		}