ahmadR

Is there a way to get at the raw surface bits (yuv or rgb) from a pointer to a IDirect3DSurface9 pointer. I need to copy the raw surface data to a yuv/rgb file.

Thanks



Re: Game Technologies: DirectX 101 IDirect3DSurface9 Question

Ralf Kornmann

The way to access the raw data stored in a surface is to use LockRect and UnlockRect. Depending on how you have created the surface you cannot use LockRect on it. In this case you have to create an additional surface in the system memory pool. To transfer the content from the original surface to this additional surface you normally use GetRenderTargetData.






Re: Game Technologies: DirectX 101 IDirect3DSurface9 Question

ahmadR

I am working on the VMR9Allocator example in the DirectShow Samples. Basically I need to copy the

lpPresInfo->lpSurf surface

in the CAllocator::PresentHelper function to a file. However, I cannot seem to put a breakpoint on this function. I get an error message to stop the system debugger. Why am I unable to debug

Also, when I try to open a file from this function and save some debu data into sat c:\trace.txt, the file does not get created. What is the reason for this behavior

Thanks