directx

Add Watermark to Capture stream

安稳与你 提交于 2020-01-14 06:12:09
问题 I am using DirectX.Capture and Direct Show. Using existing project http://www.codeproject.com/KB/directx/directxcapture.aspx?msg=2490488 want to add water mark is it possible? if yes how? 回答1: To add a watermark in the recorder video, you would have to insert some watermarking filter into the graph that does capture and recording. In my apps, I am doing it via sample grabber filter which enables me to access every video frame as it is captured from the input source. Beware though: the frame

Loading Textures in Directx

雨燕双飞 提交于 2020-01-14 06:11:01
问题 Im Trying to load textures in directx to draw a textured quad. but the D3DXCreateTextureFromFile never returns D3D_OK .... here is my code to load the texture.... FeralTexture(string Name,FeralVector2 Position,IDirect3DDevice9 *device) { FileName = Name; m_pDevice = device; x= Position.x; y= Position.y; if(D3DXCreateTextureFromFile(m_pDevice,FileName.c_str(),&m_pTextureFile) != D3D_OK) { TextureCreated = false; m_pTextureFile = NULL; D3DXCreateTextureFromFile(m_pDevice,FileName.c_str(),&m

Loading Textures in Directx

给你一囗甜甜゛ 提交于 2020-01-14 06:10:33
问题 Im Trying to load textures in directx to draw a textured quad. but the D3DXCreateTextureFromFile never returns D3D_OK .... here is my code to load the texture.... FeralTexture(string Name,FeralVector2 Position,IDirect3DDevice9 *device) { FileName = Name; m_pDevice = device; x= Position.x; y= Position.y; if(D3DXCreateTextureFromFile(m_pDevice,FileName.c_str(),&m_pTextureFile) != D3D_OK) { TextureCreated = false; m_pTextureFile = NULL; D3DXCreateTextureFromFile(m_pDevice,FileName.c_str(),&m

How can I send keys to inactive DirectX “ePSXe” window?

泄露秘密 提交于 2020-01-14 05:29:24
问题 I need to send a key to an inactive "ePSXe" window using C#. I got the handle of the window using Spy++, but when I used this code to send key "x", I got nothing. What should I do? I tried different values of Msg as 0x0100 , 0x0101 and 0x0102 , but nothing worked. I also tried SendMessage and the results were the same. [DllImport("user32.dll")] public static extern IntPtr PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam); private void Send_X(IntPtr p) { PostMessage(p, 0x0100,

Custom output resolution DuplicateOutput DXGI

被刻印的时光 ゝ 提交于 2020-01-14 04:41:05
问题 I'm using AcquireNextFrame to make a screenshot of my desktop. Is it possible to set a dimension of the output image I want on the setup ? I saw on the documentation this function IDXGIOutput::SetDisplaySurface that could help. Here is my code : //Here I init a output texture with less resolution D3D11_TEXTURE2D_DESC desc; desc.Width = 1280; desc.Height = 720; desc.MipLevels = desc.ArraySize = 1; desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; desc.SampleDesc.Count = 1; desc.Usage = D3D11_USAGE

Access violation and strange behavior of Visual Studio

若如初见. 提交于 2020-01-14 03:41:12
问题 I'm writing a test application on DirectX11, and I have 2 classes "Box" and "camera" . "Box" is a cube which is to be drawn on the screen, and this is "camera": class camera { public : const camera operator=(const camera& fv) const { return fv; } XMVECTOR eye; XMVECTOR at; XMVECTOR up; XMVECTOR right; XMVECTOR left; XMVECTOR down; float pitch; //x float roll; //z float yaw; //y XMMATRIX View; XMMATRIX Projection; camera(); camera(XMVECTOR eye, XMVECTOR at, XMVECTOR up, float movingOffset,

Desktop Window Manager capture the whole screen

冷暖自知 提交于 2020-01-13 17:09:15
问题 I was wondering if anyone could give me a starting point of how to capture the entire screen in Windows Vista/7? I know how to do it in previous versions of Windows, but would really like to keep everything in the D3D stack, without resorting to GDI/BltBit calls. I realize that you can get a live thumbnail of a given window if you have the HWND using the DWM API, but how do you get a "thumbnail" of the entire desktop? Thanks, Alex 回答1: Unfortunately, the functions to do this are in the dwmapi

【资料搜集】DirectX学习

白昼怎懂夜的黑 提交于 2020-01-09 02:32:58
【网站推荐:】 GameRes游资网-游戏开发者门户 http://www.gameres.com/ 【基础知识:】 《游戏编程》第一部 基础篇 - GameRes.com http://dev.gameres.com/Program/Abstract/Thinking/gpBase.htm 【摘要】游戏引擎,负责接受用户输入,交付自己的内部工作机构,处理,并最终以声音、图像等形式表现出来。 【网站推荐:】 提供游戏制作动漫制作视频教程在线观看-云世界 http://edu.gamfe.com/tutorial/ 【网站推荐:】 DirectX游戏编程入门——第一部分(Windows和DirectX游戏编程引言) —— 初识DirectX - net_assassin的专栏 - 博客频道 - CSDN.NET http://blog.csdn.net/net_assassin/article/details/7727815 C++Directx11开发笔记五:3D空间坐标系认识 - 网魂小兵 - 博客园 http://www.cnblogs.com/xdotnet/archive/2011/08/01/direct3d11_3dspaces.html 用DirectX做2D游戏的三种方法_不会游泳的鱼_新浪博客 http://blog.sina.com.cn/s/blog

DirectX render to texture alpha blending

爱⌒轻易说出口 提交于 2020-01-07 07:58:10
问题 Problem is following: I'm rendering sprites to the texture, then I render texture to the screen. Simple, right? However, when I do that, each time sprite gets rendered, it overwrites every pixel it covers, independent of alpha value of its pixels. Example: Here you can see two sprites with text "ABC". First is rendered in the right top corner and second on top of it with Y offset. As you can see, the second one overrides even those pixels of first sprite that shouldn't be overwritten with

Copy depth buffer with non-lockable format (D24S8) to system memory with Direct3D9, Win 8.1

纵饮孤独 提交于 2020-01-07 05:48:06
问题 EDIT: As ozeanix points out in the comments it is not possible to copy a D24S8 surface to system memory. Unfortunately you also cannot bind the surface (or rather its containing texture) to a pixel shader. I ended up going the reimplementation way, intercepting all D3D9 calls. If the graphics card supports it - all cards with DX10+ should do - it is sometimes possible to exchange the D24S8 format with FOURCC INTZ, which has the same memory layout, but can be bound to a pixel shader's texture