directx

DXGI scans pixels at 10 fps and uses more memory

笑着哭i 提交于 2020-12-15 00:45:03
问题 Good afternoon. I apologize in advance for my bad code, because I have not yet brought it into a good form. The bottom line is to take pixels from the desktop at 60 fps, but mine runs at 10 fps and also uses too much memory. Please help me understand where I was wrong, thanks. I had an assumption that I was not resetting something, but I think have taken this into account by calling SAFE_RELEASE. To get the pixels, I used this code: How to access pixels data from ID3D11Texture2D? #include

DXGI scans pixels at 10 fps and uses more memory

给你一囗甜甜゛ 提交于 2020-12-15 00:44:17
问题 Good afternoon. I apologize in advance for my bad code, because I have not yet brought it into a good form. The bottom line is to take pixels from the desktop at 60 fps, but mine runs at 10 fps and also uses too much memory. Please help me understand where I was wrong, thanks. I had an assumption that I was not resetting something, but I think have taken this into account by calling SAFE_RELEASE. To get the pixels, I used this code: How to access pixels data from ID3D11Texture2D? #include

Shader - Calculate depth relative to Object

◇◆丶佛笑我妖孽 提交于 2020-12-08 04:47:46
问题 I am trying to calculate depth relative to the object . Here is a good solution to retrieve depth relative to camera : Depth as distance to camera plane in GLSL varying float distToCamera; void main() { vec4 cs_position = glModelViewMatrix * gl_Vertex; distToCamera = -cs_position.z; gl_Position = gl_ProjectionMatrix * cs_position; } With this example the depth is relative to the camera . But I would like get the depth relative to the object. I would like the same depth and value if I am near

Using winrt::com_ptr<ID3D11Device1> with D3D11CreateDevice()?

对着背影说爱祢 提交于 2020-12-07 05:17:46
问题 I've been studying the code from the DirectXTK example project and trying to implement it in a new project. It seems like Microsoft recommends using WinRT in new projects, though, so I decided I would try to switch instances of WRL::ComPtr to winrt::com_ptr . I'm stuck, though, trying to move between ID3D11Device1 in the project's Game class and ID3DDevice in D3D11CreateDevice() . Here's the example code, slightly abstracted for simplicity's sake: ComPtr<ID3D11Device1> global_device; void

Using winrt::com_ptr<ID3D11Device1> with D3D11CreateDevice()?

荒凉一梦 提交于 2020-12-07 05:15:48
问题 I've been studying the code from the DirectXTK example project and trying to implement it in a new project. It seems like Microsoft recommends using WinRT in new projects, though, so I decided I would try to switch instances of WRL::ComPtr to winrt::com_ptr . I'm stuck, though, trying to move between ID3D11Device1 in the project's Game class and ID3DDevice in D3D11CreateDevice() . Here's the example code, slightly abstracted for simplicity's sake: ComPtr<ID3D11Device1> global_device; void

Using winrt::com_ptr<ID3D11Device1> with D3D11CreateDevice()?

只谈情不闲聊 提交于 2020-12-07 05:14:59
问题 I've been studying the code from the DirectXTK example project and trying to implement it in a new project. It seems like Microsoft recommends using WinRT in new projects, though, so I decided I would try to switch instances of WRL::ComPtr to winrt::com_ptr . I'm stuck, though, trying to move between ID3D11Device1 in the project's Game class and ID3DDevice in D3D11CreateDevice() . Here's the example code, slightly abstracted for simplicity's sake: ComPtr<ID3D11Device1> global_device; void

DirectShow, Media Foundation, DXVA, what?

久未见 提交于 2020-12-01 10:08:49
问题 I'm tasked with revising an application which uses DirectShow for video rendering. The old application works fine, but it's starting to show age. As I have a gaming background, I figured I should just approach this as such. After having made a bunch of prototypes using different techniques, I was pretty sure I could pull of video-to-texture rendering and use DirectX to fulfill all the clients his requests. However, I'm now at the point I have to pick a technique to go with and I couldn't be

DirectShow, Media Foundation, DXVA, what?

雨燕双飞 提交于 2020-12-01 10:05:45
问题 I'm tasked with revising an application which uses DirectShow for video rendering. The old application works fine, but it's starting to show age. As I have a gaming background, I figured I should just approach this as such. After having made a bunch of prototypes using different techniques, I was pretty sure I could pull of video-to-texture rendering and use DirectX to fulfill all the clients his requests. However, I'm now at the point I have to pick a technique to go with and I couldn't be

DirectShow, Media Foundation, DXVA, what?

假如想象 提交于 2020-12-01 10:05:30
问题 I'm tasked with revising an application which uses DirectShow for video rendering. The old application works fine, but it's starting to show age. As I have a gaming background, I figured I should just approach this as such. After having made a bunch of prototypes using different techniques, I was pretty sure I could pull of video-to-texture rendering and use DirectX to fulfill all the clients his requests. However, I'm now at the point I have to pick a technique to go with and I couldn't be