Re: SDL2, OpenGL 3.2 Core and Steam-Overlay: Black Screenshots

Andreas <[email protected]>
Newsgroups gmane.comp.lib.sdl
Message-ID <[email protected]>
Hi,

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:
https://www.opengl.org/sdk/docs/man/html/glGenVertexArrays.xhtml
https://www.opengl.org/sdk/docs/man/html/glBindVertexArray.xhtml
https://www.opengl.org/sdk/docs/man/html/glDeleteVertexArrays.xhtml

-- 
Regards,
Andreas
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.