direct3d

How to get a SourceReader to decompress frames and send them to a Direct3D9 texture?

时光总嘲笑我的痴心妄想 提交于 2021-02-18 18:56:39
问题 I am trying to get a MediaFoundation SourceReader to read an H.264 video file, and render the frames to some Direct3D textures so I can them render them as I wish with Direct3D. I'm using SharpDX, but the principles are of course the same as native code. As I understand it, the general data flow should be like this: A SourceReader reads and decodes the video using SourceReader.ReadSample() A VideoProcessor (from IDirect3DDeviceManager9 ) transfers the frame to a Direct3D9 surface using

Failing to properly initialize a 2D texture from memory in Direct3D 11

白昼怎懂夜的黑 提交于 2021-02-10 15:28:13
问题 I am trying to produce a simple array in system memory that represent a R8G8B8A8 texture and than transfer that texture to the GPU memory. First, I allocate an array and fill it with the desired green color data: frame.width = 3; frame.height = 1; auto components = 4; auto length = components * frame.width * frame.height; frame.data = new uint8_t[length]; frame.data[0 + 0 * frame.width] = 0; frame.data[1 + 0 * frame.width] = 255; frame.data[2 + 0 * frame.width] = 0; frame.data[3 + 0 * frame

d3dx11.lib not found?

穿精又带淫゛_ 提交于 2021-02-07 06:18:05
问题 I'm using Windows 8 / Visual Studio 2012, C++11 and Direct3D 11 for development. I include the Direct3D libraries like this #pragma comment(lib, "dxgi.lib") #pragma comment(lib, "d3d11.lib") #pragma comment(lib, "d3dx11.lib") // <-- error LNK1104: cannot open file 'd3dx11.lib' #pragma comment(lib, "d3dx10.lib") However, the linker can't seem to find the d3dx11.lib . After adding the path where the library is located to the 'Library directories' of the project, the linker still can't find

How to disable Direct3D Acceleration on Windows 7?

拈花ヽ惹草 提交于 2021-01-29 05:49:13
问题 I have tried to disable 3D acceleration on my machine that operation system is Windows 7. I opened the DirectX Diagnostic Tool but DirectX Features can not be changed: In addition I also tried to change Troubleshoot settings. However, it also can't be changed: How can i disable directX featrues? Note: My directX version is 11. 回答1: If you mean for your own application, you can disable GPU hardware acceleration by opting for the WARP driver type ( D3D_DRIVER_TYPE_WARP ) when creating the

Opengl and Webgl: sampling from a texture attached to current framebuffer

巧了我就是萌 提交于 2020-06-23 12:37:05
问题 I have a framebuffer with two textures t0 and t1 attached. On the first pass I render to both of them with multiple fragment shader output. Before the second pass I do thew following: Turn on a shader with one output only Bind t1 to a texture unit call glDrawBuffers to disable writing to t1 's attachment Note that t1 is used for sampling, but it's still bound to current framebuffer. As I understand, there are no loopbacks in such configuration. Is it legal in both OpenGL and WebGL? I made an

ID3D11Texture2D to ID2D1Bitmap, is it possible?

你离开我真会死。 提交于 2020-05-11 03:04:10
问题 I am working on a extension to a game which only opens a HDC for addon developers to draw on. However, I have exhausted GDI+/Direct2D drawing possibilities that is fast enough for what I want to accomplish - image effects(Additive, Blend, Multiply Blend etc). I am well aware that Direct2D offers a effects toolkit however, that requires a platform update (for Windows 7) and that is not ideal at all. Hence I am left with only Direct3D. MSDN/Google Search offers lots of ways to do D2D -> D3D,

ID3D11Texture2D to ID2D1Bitmap, is it possible?

我怕爱的太早我们不能终老 提交于 2020-05-11 02:59:51
问题 I am working on a extension to a game which only opens a HDC for addon developers to draw on. However, I have exhausted GDI+/Direct2D drawing possibilities that is fast enough for what I want to accomplish - image effects(Additive, Blend, Multiply Blend etc). I am well aware that Direct2D offers a effects toolkit however, that requires a platform update (for Windows 7) and that is not ideal at all. Hence I am left with only Direct3D. MSDN/Google Search offers lots of ways to do D2D -> D3D,

ID3D11Texture2D to ID2D1Bitmap, is it possible?

跟風遠走 提交于 2020-05-11 02:59:14
问题 I am working on a extension to a game which only opens a HDC for addon developers to draw on. However, I have exhausted GDI+/Direct2D drawing possibilities that is fast enough for what I want to accomplish - image effects(Additive, Blend, Multiply Blend etc). I am well aware that Direct2D offers a effects toolkit however, that requires a platform update (for Windows 7) and that is not ideal at all. Hence I am left with only Direct3D. MSDN/Google Search offers lots of ways to do D2D -> D3D,

Encoding a D3D Surface obtained through Desktop Duplication using Media Foundation

喜夏-厌秋 提交于 2020-01-28 06:20:58
问题 I want to encode Desktop Duplication API frames to send over the network after encoding them with Media Foundation. I'm stuck with a E_NOTIMPL error when I call IMFTransform::ProcessInput, leaving me a little in the dark. These are the steps I've done up until now, I'm detailing them because it took me days to gather everything from the scarce scattered info across the web, so if it's resolved it will hopefully help others. Everything below is met with an S_OK: I'm obtaining the surface