directx-11

Trying to render a texture on Windows.Forms.Panels

牧云@^-^@ 提交于 2020-01-05 13:06:14
问题 Using a SlimDX.Windows.RenderForm, I want to dynamically create a texture of a map of the US, copy that texture to 2 other textures, then draw unique radar data onto each texture. Then I will pass those 2 textures to each be drawn over its own Windows.Forms.Panel. This way, the user will be able to, for example, view base reflectivity and base velocity side by side in the 2 panels. Right now, I've successfully generated my map of the US onto a texture. But when I try to render it to the

Lights not working properly in Helix Sharp DX

情到浓时终转凉″ 提交于 2020-01-05 11:36:08
问题 I am trying to build an obj file viewer using Helix Toolkit (https://github.com/helix-toolkit/helix-toolkit) with SharpDX. So far I am able to load an object file and render it's contents to Helix Viewport3DX. Model looks good with some obj files but for others there are some lightning problem and back surfaces are always black. I am not sure what am I doing wrong. Is this light problem due to the fact that SharpDX does not support back materials?? Please help. Problem using Helix Sharp DX:

DirectX11 ClearRenderTargetViewback with transparent buffer?

时光总嘲笑我的痴心妄想 提交于 2020-01-04 17:50:14
问题 I'm trying to create a window that uses directx to draw opaque content on top of a transparent view (i.e. the desktop shows through). With DirectX11 I'm trying to do the following, but it's not making the background transparent. In fact, any opacity value I put in gives me the exact same results. What I'm doing: float color[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; deviceContext->ClearRenderTargetView(backBuffer, color); Working repro code (main.cpp): #include <Windows.h> #include <windowsx.h> #pragma

Resetting window after using DirectX 11

。_饼干妹妹 提交于 2020-01-01 14:22:48
问题 I've written an application that can switch between OpenGL, DirectX 9 and DirectX 11 for rendering without restarting or recreating the window. Switching between OpenGL and DirectX 9 as well as to DirectX 11 mode works well, however, after using DirectX 11 no other rendering mode works any longer. After releasing all DirectX 11 interfaces, the window still shows the last rendered frame, it is even properly updated when resizing the window. A DirectX 9 device can be created and the Present

d3dx11.h missing?

筅森魡賤 提交于 2019-12-29 19:58:13
问题 So I've reinstalled directx11 a couple times and even went to the Microsoft website and got the SDK pack that has all the direct x cabinet files in it. Anyone have any idea why i keep getting this error then? I know why it is saying it but more looking for the solution to it. 1>c:\users\vaughn\documents\visual studio 2010\projects\myfirstapp\myfirstapp\main.cpp(5): fatal error C1083: Cannot open include file: 'd3dx11.h': No such file or directory 回答1: That's what you need to do in VS 2010 (it

Rendered texture is transparent in DirectX 11

本小妞迷上赌 提交于 2019-12-25 01:27:07
问题 I am rendering H264 video frames from an IP camera which are decoded into BGRA32 pixel format via DirectX 11 and SharpDx in WPF via D3DImage control. After lot of research and looking at various samples and examples I have managed to get it finally got it to render H264 frames with DirectX 11 My current setup involves setting setting up vertex shader and pixel shader as below: var device = this.Device; var context = device.ImmediateContext; // Compile Vertex and Pixel shaders

DirectX 11 Render to Texture Issue

蹲街弑〆低调 提交于 2019-12-24 18:23:55
问题 In my code, i am making 2 rectangles, Rectangle1: Rendering On a Texture. Rectangle2: Rendering On Back Buffer. I am trying to do programmable blending,so need to access the destination pixel in pixel shader. In my code, I am creating a texture like below: d3d11Device->CreateTexture2D(&textureDesc, NULL, &renderTargetTextureMap); After this i am creating Render Target view of the texture. d3d11Device->CreateRenderTargetView(renderTargetTextureMap, &renderTargetViewDesc, &renderTargetViewMap);

Saving a Texture2D using SharpDX when targeting Win8.1 + Metro?

Deadly 提交于 2019-12-24 16:19:54
问题 I'm trying to save a user-generated Texture2D to disk, but it looks like the standard ways of accomplishing this aren't available when targeting DirectX11.1 / Win8.1 / Metro. ToStream/FromStream are absent, and the DX11 methods for writing a texture to disk are absent as well. Any ideas or suggestions? 回答1: Here's the general solution I ended up with. Getting a DataStream through mapping a texture resource is what got me on the right track. General flow is create a texture with CpuAccessFlags

Making a Model Loader: What to do after reading the vertices and texture?

一笑奈何 提交于 2019-12-24 16:01:27
问题 I recently started a small project within my DirectX 11 engine, which was to make a simple model loader. So far, all it does is open the file with the given file path and prepare to read from it. My question is this, once I read my vertices and texture data, what do I do with it to store it until rendering time? My idea was to put this data in a char array, but this would only work if I only loaded one model, or had many, many char arrays(one for each model). What I have now is this: Read

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