Ejemplo n.º 1
0
            public EyeTexture(GraphicsDevice graphicDevice, OculusTextureSwapChain swapTexture)
            {
                SwapTexture = swapTexture;

                Textures      = new SharpDX.Direct3D11.Texture2D[SwapTexture.TextureCount];
                RenderTargets = new RenderTarget2D[Textures.Length];

                for (int i = 0; i < SwapTexture.TextureCount; i++)
                {
                    Textures[i]      = new SharpDX.Direct3D11.Texture2D(SwapTexture.Texture2DResources[i]);
                    RenderTargets[i] = new RenderTarget2D(graphicDevice, Textures[i], new RenderTargetViewDescription {
                        Format    = Format.R8G8B8A8_UNorm,
                        Dimension = RenderTargetViewDimension.Texture2D
                    });
                }
            }
Ejemplo n.º 2
0
			public EyeTexture(GraphicsDevice graphicDevice, OculusTextureSwapChain swapTexture)
			{
				SwapTexture		= swapTexture;

				Textures		= new SharpDX.Direct3D11.Texture2D[SwapTexture.TextureCount];
				RenderTargets	= new RenderTarget2D[Textures.Length];

				for (int i = 0; i < SwapTexture.TextureCount; i++) {
					Textures[i]			= new SharpDX.Direct3D11.Texture2D(SwapTexture.Texture2DResources[i]);
					RenderTargets[i]	= new RenderTarget2D(graphicDevice, Textures[i], new RenderTargetViewDescription {
						Format		= Format.R8G8B8A8_UNorm,
						Dimension	= RenderTargetViewDimension.Texture2D
					});
				}

			}