I am having a hard time understanding how OBS draws the preview window and I am looking for someone to help explain the code / architecture behind the DrawPreview function.
For the sake of discussion, lets refer to only capturing the desktop.
I am having a hard time understanding where DrawPreview gets its textures from and how it updates every frame. Are the textures created / updated every frame using BitBlt and sending directly to the DC of the curCaptureTexture surface? I only see BitBlt called during PreProcess() function and not anywhere else, how does the program update the texture on every frame? If I am on the wrong path as to how the textures are updated, please point me the right way.
Let me know if I need to explain something better. Any explanation on the general texture capture architecture for OBS would be much appreciated as sometimes the source is hard to follow.
For the sake of discussion, lets refer to only capturing the desktop.
I am having a hard time understanding where DrawPreview gets its textures from and how it updates every frame. Are the textures created / updated every frame using BitBlt and sending directly to the DC of the curCaptureTexture surface? I only see BitBlt called during PreProcess() function and not anywhere else, how does the program update the texture on every frame? If I am on the wrong path as to how the textures are updated, please point me the right way.
Let me know if I need to explain something better. Any explanation on the general texture capture architecture for OBS would be much appreciated as sometimes the source is hard to follow.