directx

Mapping corners to arbitrary positions using Direct2D

我的梦境 提交于 2019-12-01 23:18:32
I'm using WIC and Direct2D (via SharpDX) to composite photos into video frames. For each frame I have the exact coordinates where each corner will be found. While the photos themselves are a standard aspect ratio (e.g. 4:3 or 16:9) the insertion points are not -- they may be rotated, scaled, and skewed. Now I know in Direct2D I can apply matrix transformations to accomplish this... but I'm not exactly sure how. The examples I've seen are more about applying specific transformations (e.g. rotate 30 degrees) than trying to match an exact destination. Given that I know the exact coordinates (A,B

C++ Directx 11 Multiple Video Cards

我们两清 提交于 2019-12-01 23:15:25
问题 I am writing a program in C++ using directx 11 for my graphics. My laptop has a light weight intel graphics card that is used to extend my battery life and is supposed to only be used for "lightweight" graphics. I have another much more powerful video card installed also. I am wondering how to specify which video card to use in directx? Is there a way when I am creating the device to specify which card to use within my code? Thanks 回答1: If your card is some intel/nvidia combination, you have

API to get the graphics or video memory

巧了我就是萌 提交于 2019-12-01 18:51:06
I want to get the adpater RAM or graphics RAM which you can see in Display settings or Device manager using API. I am in C++ application. I have tried seraching on net and as per my RnD I have come to conclusion that we can get the graphics memory info from 1. DirectX SDK structure called DXGI_ADAPTER_DESC. But what if I dont want to use DirectX API. 2. Win32_videocontroller : But this class does not always give you adapterRAM info if availability of video controller is offline. I have checked it on vista. Is there any other way to get the graphics RAM? There is NO way to directly get graphics

How can I compile asm shader to fxo file?

旧城冷巷雨未停 提交于 2019-12-01 17:52:49
问题 I have a compiled fxo shader which I'm trying to edit slightly (just adjusting some constants). Using fxdis (https://code.google.com/archive/p/fxdis-d3d1x/) I can disassemble this shader, this is the output: # DXBC chunk 0: RDEF offset 52 size 972 # DXBC chunk 1: ISGN offset 1032 size 80 # DXBC chunk 2: OSGN offset 1120 size 44 # DXBC chunk 3: SHEX offset 1172 size 1592 # DXBC chunk 4: STAT offset 2772 size 148 ps_5_0 dcl_global_flags refactoringAllowed dcl_constant_buffer cb0[30].xyzw,

Simulate a DirectShow Webcam

那年仲夏 提交于 2019-12-01 13:06:21
I am a developer in DotNet. I want to give skype a possibility to add a webcam simulator and send my bitmap frames to the DirectShow simulator. In this case I can draw my images in my application and on skype I can share this images to my friend. I was on: http://msdn.microsoft.com/en-us/library/dd407344%28VS.85%29.aspx but it's no Dotnet and I am not sure what example I should believe in. I also saw: http://directshownet.sourceforge.net/ But as far as I undestand, here I cannot do with this framework what I need, or can I? My question is: What is basically needed to create such an DirectShow

Analysis of a shader in VR

别说谁变了你拦得住时间么 提交于 2019-12-01 11:35:12
问题 I would like to create a shader like that that takes world coordinates and creates waves. I would like to analyse the video and know the steps that are required. I'm not looking for codes, I'm just looking for ideas on how to implement that using GLSL or HLSL or any other language. Here low quality and fps GIF in case link broke. Here is the fragment shader: #version 330 core // Interpolated values from the vertex shaders in vec2 UV; in vec3 Position_worldspace; in vec3 Normal_cameraspace; in

Simulate a DirectShow Webcam

回眸只為那壹抹淺笑 提交于 2019-12-01 11:04:52
问题 I am a developer in DotNet. I want to give skype a possibility to add a webcam simulator and send my bitmap frames to the DirectShow simulator. In this case I can draw my images in my application and on skype I can share this images to my friend. I was on: http://msdn.microsoft.com/en-us/library/dd407344%28VS.85%29.aspx but it's no Dotnet and I am not sure what example I should believe in. I also saw: http://directshownet.sourceforge.net/ But as far as I undestand, here I cannot do with this

Skeletal animation of DirectX files in OpenGL

百般思念 提交于 2019-12-01 10:53:39
I'm trying to import *.x files to my engine and animate them using OpenGL (without shaders for now, but that isn't really relevant right now). I've found the format reference at MSDN, but it doesn't help much in the problem. So - basically - I've created a file containing a simple animation of a demon-like being with 7 bones (main, 2 for the tail, and 4 for the legs), from which only 2 (the ones in the right leg) are animated at the moment. I've tested the mesh in the DXViewer, and it seems to work perfectly there, so the problem must be the side of my code. When I export the mesh, I get a

Working with Direct X and VS2012

删除回忆录丶 提交于 2019-12-01 08:23:17
I have both Visual Studio 2012 Express for Desktop and for Windows 8, and I wanted to create Direct X applications and games. I know that there is a Windows SDK now, and in VS 2012 exp for win8 the IDE is pre-installed with the SDK (I know that from the new Direct3D project). My question is, if I wanted to develop applications for Windows Desktop (using VS2012exp) does it come Windows SDK or do I need to install Direct X SDK? And how do I know if my graphics card support which version of Direct X? Will any Direct X SDK version work with any Direct X version? As you can see I am a newbie at

Low polygon cone - smooth shading at the tip

六月ゝ 毕业季﹏ 提交于 2019-12-01 07:35:10
If you subdivide a cylinder into an 8-sided prism, calculating vertex normals based on their position ("smooth shading"), it looks pretty good. If you subdivide a cone into an 8-sided pyramid, calculating normals based on their position, you get stuck on the tip of the cone (technically the vertex of the cone, but let's call it the tip to avoid confusion with the mesh vertices). For each triangular face, you want to match the normals along both edges. But because you can only specify one normal at each vertex of a triangle, you can match one edge or the other, but not both. You can compromise