{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/WPFDXInterop/issues/10","labels_url":"https://api.github.com/repos/Microsoft/WPFDXInterop/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/WPFDXInterop/issues/10/comments","events_url":"https://api.github.com/repos/Microsoft/WPFDXInterop/issues/10/events","html_url":"https://github.com/Microsoft/WPFDXInterop/issues/10","id":114601777,"number":10,"title":"Combining D3D11Image with SharpDX","user":{"login":"PetrMahdalicek","id":12525154,"avatar_url":"https://avatars.githubusercontent.com/u/12525154?v=3","gravatar_id":"","url":"https://api.github.com/users/PetrMahdalicek","html_url":"https://github.com/PetrMahdalicek","followers_url":"https://api.github.com/users/PetrMahdalicek/followers","following_url":"https://api.github.com/users/PetrMahdalicek/following{/other_user}","gists_url":"https://api.github.com/users/PetrMahdalicek/gists{/gist_id}","starred_url":"https://api.github.com/users/PetrMahdalicek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PetrMahdalicek/subscriptions","organizations_url":"https://api.github.com/users/PetrMahdalicek/orgs","repos_url":"https://api.github.com/users/PetrMahdalicek/repos","events_url":"https://api.github.com/users/PetrMahdalicek/events{/privacy}","received_events_url":"https://api.github.com/users/PetrMahdalicek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-02T14:13:23Z","updated_at":"2015-11-03T06:30:19Z","closed_at":null,"body":"Hi, I want to combine D3D11Image with SharpDX. I think it should be possible but I can not figure out how to properly implement OnRender handler.\r\nIn Render event handler I receive IntPtr. Can you please describe what this argument represents and how should I use it to create render target view?\r\n\r\nthis is my implementation of Render event handler.\r\n\r\nvoid DoRender(IntPtr pointer)\r\n        {\r\n            var dxgiResource = SharpDX.DXGI.Resource.FromPointer<SharpDX.DXGI.Resource>(pointer);\r\n            var dx10Resource = Device.OpenSharedResource<SharpDX.Direct3D10.Resource>(dxgiResource.SharedHandle);\r\n            var dx10Texture = dx10Resource.QueryInterface<SharpDX.Direct3D10.Texture2D>();\r\n            var renderTarget = new SharpDX.Direct3D10.RenderTargetView(Device, dx10Texture);\r\n\r\n        }\r\n\r\nIs there anything obviously wrong? I tried to mimic implementation from D3DVisualization.cpp\r\n\r\n\r\nThank you \r\nPetr"},"comment":{"url":"https://api.github.com/repos/Microsoft/WPFDXInterop/issues/comments/153258061","html_url":"https://github.com/Microsoft/WPFDXInterop/issues/10#issuecomment-153258061","issue_url":"https://api.github.com/repos/Microsoft/WPFDXInterop/issues/10","id":153258061,"user":{"login":"QuantumDeveloper","id":6085009,"avatar_url":"https://avatars.githubusercontent.com/u/6085009?v=3","gravatar_id":"","url":"https://api.github.com/users/QuantumDeveloper","html_url":"https://github.com/QuantumDeveloper","followers_url":"https://api.github.com/users/QuantumDeveloper/followers","following_url":"https://api.github.com/users/QuantumDeveloper/following{/other_user}","gists_url":"https://api.github.com/users/QuantumDeveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/QuantumDeveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuantumDeveloper/subscriptions","organizations_url":"https://api.github.com/users/QuantumDeveloper/orgs","repos_url":"https://api.github.com/users/QuantumDeveloper/repos","events_url":"https://api.github.com/users/QuantumDeveloper/events{/privacy}","received_events_url":"https://api.github.com/users/QuantumDeveloper/received_events","type":"User","site_admin":false},"created_at":"2015-11-03T06:30:19Z","updated_at":"2015-11-03T06:30:19Z","body":"The issue here is that on each OnRender() call it send and IntPtr, which is incorrect by itself. It shoud send it only once during creation and IntPtr should not change during the whole lifecycle. But here we receive it each call and must recreate all resources each frame or at least check is IntPtr has changed. It is not efficient way of working. Resources must not be recreated each frame and this is the major issue with DirectX extensions. Until this be fixed, there is no sense to do any samples based on it."}}