DirectX/C++ 3D Engine programming: Learn now, or wait for DirectX 12? [closed]

Think of DX12 as “DirectX without training wheels, without brakes, and at the moment maybe without tires”. It will be more than a ‘few months’ for DirectX 12 to have a rich set of tutorials, support libraries, best practices, rock-solid drivers, and widely deployed support in the operating system on end-users machines. It’s “bleed edge” … Read more

Getting green screen in ffplay: Streaming desktop (DirectX surface) as H264 video over RTP stream using Live555

It’s harder than it seems. If you want to use the encoder as you’re doing, by calling IMFTransform interface directly, you have to convert RGB frames to NV12. If you want good performance, you should do it on GPU. Possible to do with pixel shaders, render 2 frames, full size one into DXGI_FORMAT_R8_UNORM render target … Read more

Hook/Overlay a DirectX game?

You can try my example on hooking the Direct3D 9 API using C#. This utilizes EasyHook an open source .NET assembly that allows you to install hooks from managed code into unmanaged functions. SlimDX is also used – this is an open source managed wrapper around the Direct3D libraries. The tricky part of the hooking … Read more

Forcing NVIDIA GPU programmatically in Optimus laptops

According to http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf starting from 302 drivers it is enough to link statically with one of the following libraries: vcamp110.dll, vcamp110d.dll, nvapi.dll, nvapi64.dll, opencl.dll, nvcuda.dll, cudart*.*, or to export a NvOptimusEnablement variable in your program: extern “C” { _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; }

Comparison between XNA and DirectX (C#)

If you’re actually good at writing unmanaged code, then you’ll probably be able to write a faster graphics engine on top of DirectX. However, for the hobbyist, XNA has plenty of performance, both for 2D and 3D game development. Here is a good Channel 9 video where they run an XNA-built racing game on Xbox … Read more