directx

D3D11 screen desktop copy to ID3D11Texture2D

随声附和 提交于 2019-12-03 20:28:56
I am writing a DLL plugin that will read the desktop frame buffer (whole screen) and render it directly into a Texture2D pointer that is passed in. The goal is to keep everything in video memory (and avoid the cost of copying back to system memory and back to video memory). I am able to pass the Texture2D (showing up as a ID3D11Texture2D), but I am having issues grabbing the desktop frame buffer with D3D11. D3D9 offered GetFrontBufferData() but it seems D3D11 solution is to use GetBuffer(). My issue is about getting the IDXGISwapChain. Because I want to read the desktop frame buffer and simply

Is DirectSound the best audio abstraction layer for Windows?

寵の児 提交于 2019-12-03 20:25:28
Is DirectSound the best audio abstraction layer for Windows? Switching my app from a very bad sound implementation, built to a specific chipset, to an abstration layer. App is native Winform, .net 3.5. DirectX/DirectSound is the likely choice, but a little concerned about the overhead. Any other options? Or is it silly to even THINK about anything else? DirectSound is not getting the same love from Microsoft today as it got in the past. As far as DirectX is concerned, you may try XAudio2 or XACT instead. Some people love those, others hate them. XAudio2 is more low-level, while XACT is rather

Direct3D Line thickness

情到浓时终转凉″ 提交于 2019-12-03 19:11:23
问题 How do I change the thickness of lines when drawing line lists using Direct3D? This post says that line width is not supported and goes on to provide a workaround. Other options? While we are on this topic, do shaders allow one to draw lines with dash patterns? 回答1: You can use a geometry shader that will take as an input a segment of your line and output a quad (a triangle strip made of two triangles) so that the width of the quad is constant in screen space and matches the desire line

Matrix mult order in Direct3D

久未见 提交于 2019-12-03 16:48:24
I've received two conflicting answers in terms of multiplying matrices in Direct3D to achieve results. Tutorials do state to multiply from left to right and that's fine but it's not how I would visualize it. Here's an example: OpenGL (reading from top to bottom): GLRotatef(90.0f); GLTranslatef(20.0f,0,0); So you visualize the world axis rotating 30 degrees. Then you translate 20.0 on the now rotated x-axis so it looks like you are going up on the world y-axis. In Direct3D, doing: wm = rotatem * translatem; is different. It looks like the object was just rotated at the origin and translated on

Is it possible to run Java3D applications on Nvidia 3D Vision hardware?

旧城冷巷雨未停 提交于 2019-12-03 16:32:13
问题 Is is possible to run a Java3D application on Nvidia 3D Vision hardware? I've got an existing Java3D application that can run in stereoscopic 3D. In the past, I've always run the application on Quadro cards using the OpenGL renderer and quad buffered stereo. I now have access to a laptop with the nVidia 3D Vision system (with a GeForce GTX 460M). From the documentation, it seems like it should be possible to run my application in stereo if I use the DirectX bindings and let the nVidia drivers

directx 11 64位

狂风中的少年 提交于 2019-12-03 15:58:32
directx 11 64位是一款微软出品的一个多媒体编程接口,这款程序专门用于微软各个平台的电子游戏开发。DirectX 11带来了Tessellation(拆嵌式细分曲面技术)、Multi-Threading(多线程)、DirectCompute(通用计算)、Shader Model 5.0(渲染引擎5.0)以及Texture Compression(纹理压缩)五个重要特性,为用户带来更好的视觉享受。 新版特色: Direct3D11渲染管线 DirectX 11加入了对Tessellation(镶嵌)的支持。Tessellation 由外壳着色器(Hull Shader)、镶嵌单元(tessellator)以及域着色器(Domain Shader)组成。同时还加入了计算着色器(Compute Shader) Tessellation镶嵌技术 tessellator可以把一些较大的图元(primitive)分成很多更小的图元,并将这些小图元组合到一起,形成一种有序的几何图形,这种几何图形更复杂,当然也更接近现实。这个过程也被称作细分曲面(Subdivision Surfaces)。举例来说,tessellator可以让一个立方体,通过处理看起来像是个球形,这样的话无疑节省了空间。此外,图形的质量、性能以及可控性也达到了一定的促进。 多线程的支持 DirectX

Multiple Render Targets not saving data

此生再无相见时 提交于 2019-12-03 15:58:08
I'm using SlimDX, targeting DirectX 11 with shader model 4. I have a pixel shader "preProc" which processes my vertices and saves three textures of data. One for per-pixel normals, one for per-pixel position data and one for color and depth (color takes up rgb and depth takes the alpha channel). I then later use these textures in a postprocessing shader in order to implement Screen Space Ambient Occlusion, however it seems none of the data is getting saved in the first shader. Here's my pixel shader: PS_OUT PS( PS_IN input ) { PS_OUT output; output.col = float4(0,0,0,0); output.norm = float4

General purpose compute with Vertex/Pixel shaders (Open GL / DirectX)

混江龙づ霸主 提交于 2019-12-03 15:22:18
I have a question regarding compute shaders. are compute shaders available in DX 9? would it be still possible to use a compute shader with a DX9 driver if there is no compute shader fragment on the GPU? ( SGX 545 does not have it, but SGX 6X generation is going to have it), as far as what IMG says. I would like to know If i can do some simple general purpose programming on SGXs GPUs with DirectX9 or OpenGL drivers. Also, is there anyway I can use OpenGL vertex shaders for GPGPU programming? Here is what I am thinking: I will load my Matrices/ data into the vertex buffer, and bind them to the

How to properly use a hardware accelerated Media Foundation Source Reader to decode a video?

萝らか妹 提交于 2019-12-03 15:17:31
I'm in the process of writing a hardware accelerated h264 decoder using Media Foundation's Source Reader, but have encountered a problem. I followed this tutorial and supported myself with Windows SDK Media Foundation samples. My app seems to work fine when hardware acceleration is turned off, but it doesn't provide the performance I need. When I turn the acceleration on by passing a IMFDXGIDeviceManager to IMFAttributes used to create the reader, things get complicated. If I create the ID3D11Device using a D3D_DRIVER_TYPE_NULL driver, the app works fine and the frames are processed faster

HLSL mul() variables clarification

不打扰是莪最后的温柔 提交于 2019-12-03 15:01:12
The parameters for HLSL's mul( x, y) indicated here : say that if x is a vector, it is treated as a row vector. if y is a vector, it is treated as a column vector. Does this then follow through meaning that: a. if x is a vector, y is treated as a row-major matrix if y is a vector, x is treated as a column-major matrix b. since ID3DXBaseEffect::SetMatrix() passes in a row-major matrix , hence I'd use the matrix passed into the shader in following order: ex. Output.mPosition = mul( Input.mPosition, SetMatrix()value ); ? I'm just starting out with shaders and current relearning my matrix math. It