I am using DirectX 9. I need to synchronize the time a bitmap displays and output of a TTL pulse with a National Instruments Digital Input/Output board. The only method available seems to be:
IDirectDraw::WaitForVerticalBlank(DWORD dwFlags,HANDLE hEvent);
I have found no tutorials regarding DirectDraw in DirectX 9 (because it is no longer released with DirectX) or how to work around the depreciated functions.
HOW can I use this method (i.e. WaitForVerticalBlank)? WHAT should I Initialize? Do I need to use DirectShow to get to the IDirectDrawSurface multimedia interface? How would I do that? Would this lead me to IDirectDraw? Does it need to be initialized like I currently do to get the Direct3D object & device?
g_pD3D = Direct3DCreate9(D3D_SDK_VERSION);
Now I am able to render a .bmp by using IDirect3DSurface9* backbuffer; GetBackBuffer(...); StretchRect(...); and Present(...);
But again the time of display is not well synchronized with the TTL pulse. I determine this on an oscilloscope by comparing the output of a photodector against the TTL.
Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.
Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris.
Well, a long time ago, in a galaxy far far away, I was…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…