directx

The purpose of Model View Projection Matrix

安稳与你 提交于 2019-11-26 23:21:48
For what purposes are we using Model View Projection Matrix? Why do shaders require Model View Projection Matrix? The model, view and projection matrices are three separate matrices. Model maps from an object's local coordinate space into world space, view from world space to camera space, projection from camera to screen. If you compose all three, you can use the one result to map all the way from object space to screen space, making you able to work out what you need to pass on to the next stage of a programmable pipeline from the incoming vertex positions. In the fixed functionality

Get the graphics card model?

♀尐吖头ヾ 提交于 2019-11-26 22:01:37
问题 I was wondering how I can get the graphics card model/brand from code particularly from DirectX 9.0c (from within C++ code). 回答1: At runtime, you can query the device model and vendor: In OpenGL, use the command glGetString(GL_VENDOR) or GL_RENDERER or GL_VERSION to get the information you're after. In DirectX 9, it appears the info is in the Microsoft config system, and is queried from the device database. It's section 3 of this document, which also has example code: http://msdn.microsoft

Take screenshot of DirectX full-screen application

戏子无情 提交于 2019-11-26 22:01:25
This boggles me. DirectX bypasses everything and talks directly to the device driver, thus GDI and other usual methods won't work - unless Aero is disabled (or unavailable), all that appears is a black rectangle at the top left of the screen. I have tried what other have suggested on several forums, using DirectX to get the back buffer and save it, but I get the same result: device->GetFrontBufferData(0, surface); D3DXSaveSurfaceToFile("fileName", D3DXIFF_BMP, surface, NULL, NULL); Is there any way to get a screenshot of another full-screen DirectX application when Aero is enabled? Have a look

How to overlay graphics on Windows games?

我的未来我决定 提交于 2019-11-26 20:07:11
问题 I want my program to be able to launch any Windows game, and while the user is playing it, intermittently display some text or pictures in some part of the game window. The game may be in windowed or full-screen mode. From what I have been able to figure out from online resources, this could be done using a graphics library that supports overlays and using Windows Hooks to keep track of the target application's window. In this context I have some questions. Will the overlays affect the game's

Implementing Ray Picking

巧了我就是萌 提交于 2019-11-26 18:29:00
I have a renderer using directx and openGL, and a 3d scene. The viewport and the window are of the same dimensions. How do I implement picking given mouse coordinates x and y in a platform independent way? Andreas Brinck If you can, do the picking on the CPU by calculating a ray from the eye through the mouse pointer and intersect it with your models. If this isn't an option I would go with some type of ID rendering. Assign each object you want to pick a unique color, render the objects with these colors and finally read out the color from the framebuffer under the mouse pointer. EDIT: If the

How can I reverse engineer a DirectShow graph?

落花浮王杯 提交于 2019-11-26 17:55:40
I have a DirectShow graph to render MPEG2/4 movies from a network stream. When I assemble the graph by connecting the pins manually it doesn't render. But when I call Render on the GraphBuilder it renders fine. Obviously there is some setup step that I'm not performing on some filter in the graph that GraphBuilder is performing. Is there any way to see debug output from GraphBuilder when it assembles a graph? Is there a way to dump a working graph to see how it was put together? Any other ideas for unraveling the mystery that lives in the DirectShow box? Thanks! -Z You can watch the graph you

How to smooth ugly jitter/flicker/jumping when resizing windows, especially dragging left/top border (Win 7-10; bg, bitblt and DWM)?

强颜欢笑 提交于 2019-11-26 16:20:37
THE PROBLEM: When I grab the resize border of my Windows app, especially the top or left borders, and resize the window, the contents of the window do resize "live" as I drag, but they resize in a hideous manner that looks like a blatant bug to even the most novice user: the contents at the opposite edge of the window from the edge I am dragging jitter/flicker/jump back and forth wildly. Depending on the situation, the phenomenon may look like: contents that seem to walk off the edge of the window and snap back when we slow down or stop dragging contents that seem to pull into the window,

Forcing NVIDIA GPU programmatically in Optimus laptops

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 15:46:45
问题 I'm programming a DirectX game, and when I run it on an Optimus laptop the Intel GPU is used, resulting in horrible performance. If I force the NVIDIA GPU using the context menu or by renaming my executable to bf3.exe or some other famous game executable name, performance is as expected. Obviously neither is an acceptable solution for when I have to redistribute my game, so is there a way to programmatically force the laptop to use the NVIDIA GPU? I've already tried using DirectX to enumerate

UWP App realtime blur background using DX Compositor

坚强是说给别人听的谎言 提交于 2019-11-26 14:20:03
问题 So the UWP Composition support has been out for a while I am looking for a way to do real-time blurring of elements (live blur as they move or load, not static snapshot). So far I have been looking at some answers on stackoverflow, and google which lead me to use Lumia Imaging SDK Sample and Win2D. None of them are good enough for realtime blur support. I know doing blur in realtime is possible in composition because I have seen demos of blurred videos and there is an obsolete project XAMLFx

完美解决: Wampserver64找不到msvcr120.dll,需要重新安装服务 亲测可用【简单高效】

可紊 提交于 2019-11-26 13:54:14
参考解决方案: https://blog.csdn.net/lsqingfeng/article/details/90063824 【下载这个工具修复,一键搞定-】其他其他很多方法都无效,搞来搞去最后这个一键修复了 传送门: DirectX修复工具 下载地址: https://www.crsky.com/soft/31471.html 来源: https://blog.csdn.net/weixin_43343144/article/details/98882647