directx

DirectX 10 Draw Text to texture

亡梦爱人 提交于 2019-12-24 10:27:11
问题 I am atempting to draw text to a textured mesh object. The mesh is basically a cube which has been pasted up to the front of the screen. (overall I'm aiming for a menu system). After a bit of googling I've found surprisingly little information on how to draw a text to a texture. I've read that it should be as simple as making a texture, setting it as a render source and then drawing to it, yet I cannot figure this one out. Any ideas, suggestions or skeleton code with the necessary function

Creating full screen DirectX device causes D3DERR_INVALIDCALL

纵然是瞬间 提交于 2019-12-24 09:39:34
问题 I'm trying to create a DirectX device in full screen (up until this point in time I've been doign windowed), but the device won't get created and I get an invalid call HR fail. This is my code: md3dPP.BackBufferWidth = 1280; md3dPP.BackBufferHeight = 720; md3dPP.BackBufferFormat = D3DFMT_UNKNOWN; md3dPP.BackBufferCount = 1; md3dPP.MultiSampleType = D3DMULTISAMPLE_NONE; md3dPP.MultiSampleQuality = 0; md3dPP.SwapEffect = D3DSWAPEFFECT_DISCARD; md3dPP.hDeviceWindow = mhMainWnd; md3dPP.Windowed =

vertexshader / vertexprogram write vertex attributes to vbo?

前提是你 提交于 2019-12-24 09:01:56
问题 Is there a way to alter vertex attributes in a vertexshader/vertexprogram and save the changes back into the VBO? 回答1: Yes, that is called Transform Feedback in OpenGL (or Stream-Out in DirectX): http://www.opengl.org/registry/specs/EXT/transform_feedback.txt http://www.opengl.org/registry/doc/glspec42.core.20120119.pdf (page 158) http://msdn.microsoft.com/en-us/library/windows/desktop/bb205121.aspx 来源: https://stackoverflow.com/questions/9530387/vertexshader-vertexprogram-write-vertex

How to make a Single Executable VS 2010

为君一笑 提交于 2019-12-24 08:59:45
问题 I'm making a game using C++ and DirectX and it'd be nice to share my groups progress with other people by providing a single executable file instead of having to run a setup wizard. I've checked my Release and Debug folders but those executable don't work. The release .exe is something like 21KB which doesn't seem right. So I guess what I'm asking is how to make a single executable with all of the libraries and resource files included. 回答1: You need to specify that all your libraries have to

Overlay WinForms controls on DirectX content

六月ゝ 毕业季﹏ 提交于 2019-12-24 08:58:28
问题 I'm trying to create a graphics library with graphics control. The control enables adding overlay controls. The graphics on the control uses DirectX and is part of the library, while the overlay controls are provided by end users of the library which are not graphics experts. Thus stability and convenient API are the most important issues. For technical reasons I need to show the graphics by DirectX directly on the control and cannot host the DirectX scene using another framework as WPF (For

Performance Issues with SharpDX and D3DImage

◇◆丶佛笑我妖孽 提交于 2019-12-24 08:58:05
问题 I have a control that uses D3DImage to host a SharpDX DirectX9 surface and allows use to pan, zoom, and interact with world objects and the result is really awesome. Performance is actually an amazing consistent 60fps EXCEPT when the window is minimized and brought back up or the user locks and then unlocks the screen. When the window regains focus the fps drop to about 25-30fps. I can "fix" the issue by unloading and loading the control back into its container and then BOOM, 60fps. I call

Direct3d/C# - Blur area under a rectangle drawn on a sprite

女生的网名这么多〃 提交于 2019-12-24 08:09:43
问题 Any idea how to do it? I am drawing a rectangle that is supposed to be a half-transparent window. I managed to do the transparency by drawing a half-transparent texture, but I also want to blur whatever is under the window. Normally (eg. using GDI) I would create a bitmap of the area, blur it and paint it as the background of my window. With Direct3D I don't even know how to get the area with whatever is already rendered on it. Or even there can be a different approach, can't it. Please help.

DirectX capabilities on different graphics cards

大城市里の小女人 提交于 2019-12-24 07:59:05
问题 I'm writing a Direct3D application, using DirectX 9. Although it works on my PC, I need to make it work on a wide range of systems. I need to know what capabilities I can expect to see on other systems. Is there a list of the DirectX capabilities that graphics cards support? I've found one site, which I'll post as an answer, but it's a bit out of date. Edit #1: Of course I will test for all the capabilities before I use them. But there are two different approaches to a missing capability:

Vertex Winding Order in DX11

断了今生、忘了曾经 提交于 2019-12-24 05:49:10
问题 I'm trying to draw a simple square with dx11, but the order of the indices of each triangle determines whether or not it shows up. I set the cull mode to none in the rasterizer state, but it doesn't seem to change anything. If I specify the vertices of the first triangle to be 0, 1, 2 instead of 2, 1, 0 then the triangle doesn't show up. So my question is, do I need to order the vertices of a triangle in a specific way regardless of the cull mode? P.S. I'm drawing a triangle list and not a

Creating a Direct2D BitmapSource from a Win32 icon pointer

隐身守侯 提交于 2019-12-24 02:42:55
问题 I created an application in C# that gets icon images from window handles using user32.dll like this: [DllImport("user32.dll", EntryPoint = "GetClassLong")] private static extern int GetClassLongPtr32(IntPtr hWnd, int nIndex); public static IntPtr GetAppIcon(IntPtr hwnd) { return WI.GetClassLongPtr32(hwnd, WI.ICON_SMALL); } And I want to create a BitmapSource from this icon pointer. Usually for WPF I would use Imaging.CreateBitmapSourceFromHIcon(handle, Int32Rect.Empty, BitmapSizeOptions