[SDL] SDL2, OpenGL 3.2 Core and Steam-Overlay: Black Screenshots

Andreas aw at luflow.net
Sat Sep 10 23:48:19 PDT 2016


On Sun, Sep 04, 2016 at 05:24:45PM +0000, moe wrote:
> Before upgrading to OpenGL 3.2 Core Profile, taking screenshots in
> Steam worked as expected. But after the upgrade all screenshots turned
> out black. I could verify that this has something to do with choosing
> Core Profile while setting up my rendering context. As long as I
> explicitly request a compatible OpenGL 3.2 context, screenshots are
> working fine. Since Steam ships its own version of SDL2.dll I also
> tried to put the version I downloaded from libsdl.org in the same
> directory as my game, but that didn't make any difference. I verified
> that the correct library was loaded by launching my game from steam
> and attaching to the process with my debugger afterwards. The path
> VisualStudio listed for the library was my local path, not the Steam
> one, but the screenshots were still black.

When using Core profile you need to use Vertex Arrays (VAO) too. That
could be the reason why you're seeing black screen.

Here's some documentation to read:


More information about the SDL mailing list