Ejemplo n.º 1
0
		public D3D11Config(Sizei rtSize, int multisample, IntPtr ID3D11Device_pDevice, IntPtr ID3D11DeviceContext_pDeviceContext, IntPtr ID3D11RenderTargetView_pBackBufferRT, IntPtr IDXGISwapChain_pSwapChain)
		{
			Header.API = RenderAPIType.D3D11;
			Header.RTSize = rtSize;
			Header.Multisample = multisample;
			_ID3D11Device_pDevice = ID3D11Device_pDevice;
			_ID3D11DeviceContext_pDeviceContext = ID3D11DeviceContext_pDeviceContext;
			_ID3D11RenderTargetView_pBackBufferRT = ID3D11RenderTargetView_pBackBufferRT;
			_IDXGISwapChain_pSwapChain = IDXGISwapChain_pSwapChain;
		}
Ejemplo n.º 2
0
 public GLTextureData(Sizei textureSize, Recti renderViewport, IntPtr texId)
 {
     Header.API = RenderAPIType.OpenGL;
     Header.TextureSize = textureSize;
     Header.RenderViewport = renderViewport;
     _texId = texId;
 }
Ejemplo n.º 3
0
		public D3D9Config(Sizei rtSize, int multisample, IntPtr IDirect3DDevice9_pDevice, IntPtr IDirect3DSwapChain9_pSwapChain)
		{
			Header.API = RenderAPIType.D3D9;
			Header.RTSize = rtSize;
			Header.Multisample = multisample;
			_IDirect3DDevice9_pDevice = IDirect3DDevice9_pDevice;
			_IDirect3DSwapChain9_pSwapChain = IDirect3DSwapChain9_pSwapChain;
		}
Ejemplo n.º 4
0
		public D3D10Config(Sizei rtSize, int multisample, IntPtr ID3D10RenderTargetView_pBackBufferRT, IntPtr IDXGISwapChain_pSwapChain)
		{
			Header.API = RenderAPIType.D3D10;
			Header.RTSize = rtSize;
			Header.Multisample = multisample;
			_ID3D10RenderTargetView_pBackBufferRT = ID3D10RenderTargetView_pBackBufferRT;
			_IDXGISwapChain_pSwapChain = IDXGISwapChain_pSwapChain;
		}
Ejemplo n.º 5
0
		public OpenGLLinuxConfig(Sizei rtSize, int multisample, IntPtr optionalXDisplay, IntPtr optionalWindow)
		{
			Header.API = RenderAPIType.OpenGL;
			Header.RTSize = rtSize;
			Header.Multisample = multisample;
			_OptionalXDisplay = optionalXDisplay;
			_OptionalWindow = optionalWindow;
		}
Ejemplo n.º 6
0
		public AndroidGLESConfig(Sizei rtSize, int multisample)
		{
			Header.API = RenderAPIType.Android_GLES;
			Header.RTSize = rtSize;
			Header.Multisample = multisample;
		}
Ejemplo n.º 7
0
		internal HmdDesc(HmdDesc_Raw raw)
		{
			this.Handle                     = raw.Handle;
			this.Type                       = (HmdType)raw.Type;
			this.ProductName                = Marshal.PtrToStringAnsi(raw.ProductName);
			this.Manufacturer               = Marshal.PtrToStringAnsi(raw.Manufacturer);
			this.VendorId                   = raw.VendorId;
			this.ProductId                  = raw.ProductId;
			this.SerialNumber               = raw.SerialNumber;
			this.FirmwareMajor              = raw.FirmwareMajor;
			this.FirmwareMinor              = raw.FirmwareMinor;
			this.CameraFrustumHFovInRadians = raw.CameraFrustumHFovInRadians;
			this.CameraFrustumVFovInRadians = raw.CameraFrustumVFovInRadians;
			this.CameraFrustumNearZInMeters = raw.CameraFrustumNearZInMeters;
			this.CameraFrustumFarZInMeters  = raw.CameraFrustumFarZInMeters;
			this.HmdCaps                    = raw.HmdCaps;
			this.TrackingCaps               = raw.TrackingCaps;
			this.DistortionCaps             = raw.DistortionCaps;
			this.Resolution                 = raw.Resolution;
			this.WindowsPos                 = raw.WindowsPos;
			this.DefaultEyeFov              = new FovPort[2] { raw.DefaultEyeFov_0, raw.DefaultEyeFov_1 };
			this.MaxEyeFov                  = new FovPort[2] { raw.MaxEyeFov_0, raw.MaxEyeFov_1 };
			this.EyeRenderOrder             = new Eye[2] { Eye.Left, Eye.Right };
			this.DisplayDeviceName          = Marshal.PtrToStringAnsi(raw.DisplayDeviceName);
			this.DisplayId                  = raw.DisplayId;
		}
Ejemplo n.º 8
0
		public OpenGLWindowsConfig(Sizei rtSize, int multisample, IntPtr hwnd, IntPtr HDCDeviceContext)
		{
			Header.API = RenderAPIType.OpenGL;
			Header.RTSize = rtSize;
			Header.Multisample = multisample;
			_hwnd = hwnd;
			_HDCDeviceContext = HDCDeviceContext;
		}
Ejemplo n.º 9
0
		private static extern void ovrHmd_GetRenderScaleAndOffset(
				FovPort fov,
				Sizei textureSize,
				Recti renderViewport,
				[MarshalAs(UnmanagedType.LPArray, SizeConst = 2)]
				[Out] Vector2f[] uvScaleOffsetOut);
Ejemplo n.º 10
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;
		}
Ejemplo n.º 11
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;
 }
Ejemplo n.º 12
0
 public D3D9TextureData(Sizei textureSize, Recti renderViewport, IntPtr IDirect3DTexture9_pTexture)
 {
     Header.API = RenderAPIType.D3D9;
     Header.TextureSize = textureSize;
     Header.RenderViewport = renderViewport;
     _IDirect3DTexture9_pTexture = IDirect3DTexture9_pTexture;
 }
Ejemplo n.º 13
0
Archivo: OvrCapi.cs Proyecto: uxl/rdgvr
 public AndroidGLESConfig(Sizei backBufferSize, int multisample)
 {
     Header.API = RenderAPIType.Android_GLES;
     Header.BackBufferSize = backBufferSize;
     Header.Multisample = multisample;
 }