directx

How to disable full screen exclusive mode?

馋奶兔 提交于 2019-12-24 14:49:33
问题 I have a computer with Windows 7. I have got 3D simulator installed. This simulator provides window. I want to place transparent window on top of simulator's window (with my extra drawing). Problem is that simulator's window switches to "full screen exclusive mode" on mouse click. That makes hardware work faster. But that hides the rest of windows (even topmost) including mine transparent window. Is the a way to disable full screen mode? 回答1: This is very interesting post (and it is related

How to draw vertices in a vertex buffer in another color

谁都会走 提交于 2019-12-24 14:00:24
问题 I'm using Direct3D 9 to draw lines. The vertices I am using now have the format D3DFVF_XYZ|D3DFVF_DIFFUSE and are stored in a vertex buffer. They are drawn with DrawPrimitive as D3DPT_LINELIST . How do I change the drawn color of a the whole drawn vertex buffer or even a specific vertex without locking the vertex buffer to modify it's content? This has to be done every frame. Is this possible with a vertex buffer? I would prefer a solution without a custom shader (using the default direct3d 9

DirectX11 Non-Solid wireframe

孤街醉人 提交于 2019-12-24 12:51:36
问题 I'm attempting to draw a 100x100 grid in DirectX11 using C++, but the following issue happens: The image above shows a grid I am drawing in wireframe, using a rasterizer with its fillmode set to 'D3D11_FILL_WIREFRAME' and a 'D3D11_PRIMITIVE_TOPOLOGY_LINELIST' topology. The lines of the wireframe appear staggered rather than straight, with some parts of the wireframe missing. As I'm not sure what this issue is referred to as, I'm not entirely sure what I should be looking for and as such, any

SharpDX 3.0.2 D3D11 - How to load texture from file and make it to work in shader?

孤人 提交于 2019-12-24 12:44:21
问题 I have 0 experience with D3D. I am currently reading Frank Luna's book about D3D11 and trying to make examples working in C# using SharpDX though w/o effect framework. I stuck with texturing now. I don't understand how to load texture from file and how to send it to shader. Official wiki is dead. Or at least it doesn't load for me. I searched here but found only some way to do it with SharpDX.WIC which is with D2D so it looks a bit weird for me to use some D2D components in D3D app. 回答1: Look

Reading Buffer Data using C++ AMP

扶醉桌前 提交于 2019-12-24 12:34:36
问题 I can't seem to find a way to let myself read the data from my AMP array. What I want to be able to do, is take my buffer, copy it into a vector and then use the vector. I'm aware that I should set the CPU access flags, but I'm having trouble doing so. Firstly, this is how I'm trying to access the buffer. I'm putting this here first just in case I have done something how it shouldn't be done. Perhaps there is a function built in that I've missed that does this for me? std::vector<Pticle>

Problems sending keystroke to DirectX application using SendInput wrapper

末鹿安然 提交于 2019-12-24 11:53:56
问题 I've been trying to send key presses to a DirectX application for a little while now, and keep striking out. I'm new to C#, so some of the more complicated functions go right over my head, but I've been trying to piece it together best I can. SendInput is one of those things that I just can't seem to grasp. I've tried using a few different SendInput wrappers to simplify things for me, including: http://inputsimulator.codeplex.com/ http://www.codeproject.com/Articles/117657/InputManager

C# Grab frame from wmv file

谁都会走 提交于 2019-12-24 11:12:12
问题 Does anyone know if it is possible to grab a frame/image from a video (.wmv) on position X using C# without installing DirectX and working on Windows 2008 (a webserver I would like to install as less as possible). Or even a simple solution with directx could be nice. Henk 回答1: What you'll actually need to look into is DirectShow, the general-purpose media (both audio and video) library for Windows. It used to be part of DirectX but several years ago it branched off and became part of the

1>main.obj : error LNK2001: unresolved external symbol _D3D10CreateDeviceAndSwapChain@32

不打扰是莪最后的温柔 提交于 2019-12-24 11:05:50
问题 having trouble getting my directx going I get the following error 1>Linking... 1>main.obj : error LNK2001: unresolved external symbol _D3D10CreateDeviceAndSwapChain@32 1>C:\Users\numerical25\Desktop\Intro ToDirectX\msdnTutorials\tutorial0\tutorial\Debug\tutorial.exe : fatal error LNK1120: 1 unresolved externals below is my code // include the basic windows header file #include <windows.h> #include <windowsx.h> #include <d3d10.h> ID3D10Device* g_pd3dDevice; IDXGISwapChain* g_pSwapChain; // the

why does not having ValidateRect cause a directx application to slow down tremendously??(c++)

一个人想着一个人 提交于 2019-12-24 10:52:18
问题 I just asked a question Spot the flaw c++ code earlier and realised that not having ValidateRect in my application at the message handler causes tremendous slow downs why is this?, how could this affect a directx application in such a manner? //----------------------------------------------------------------------------- // Name: MsgProc() // Desc: The window's message handler //----------------------------------------------------------------------------- LRESULT WINAPI MsgProc( HWND hWnd,

Directx9 Index Buffers & Multiple Streams

 ̄綄美尐妖づ 提交于 2019-12-24 10:48:11
问题 Im trying to write up a 3DS Loader, which has an OpenGL rendering implementation for use in my generic rendering system. The problem here is I have vertices indexed to one array, and texture coordinates indexed to another. I dont want to generate a new set of indexes and original vertices by checking each vertexes combination of coordinates and texture coordinates, so how do I specify the two arrays in buffers in directx optimally? What I'd like is to have 3 vertex buffers, one for vertices,