I'm trying to take a screenshot of a game (with window) in C++, but I couldn't get any other image than the black screen, even though I tried all the methods here.
This game is captured without any problems in the OBS game capture tool. (Note: black screen again in window capture tool)
You will say yes, OBS is an open source program, look there. Yes, I tried looking and decoding, but I couldn't find anything other than confusion.
I found something like a game capture plugin for Gst Streamer that uses OBS GameCapture. I did not understand anything here, as in OBS.
Can you help me on how to do this?