sokol: add screenshot function to OpenGL based backends (#12169)

This commit is contained in:
Larpon 2021-10-13 20:22:58 +02:00 committed by GitHub
parent 97e999768a
commit 5bfa3d5530
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 64 additions and 2 deletions

View file

@ -4657,7 +4657,9 @@ _SOKOL_PRIVATE void _sg_dummy_update_image(_sg_image_t* img, const sg_image_data
#if defined(_SOKOL_USE_WIN32_GL_LOADER)
// X Macro list of GL function names and signatures
// __v_ start
#define _SG_GL_FUNCS \
_SG_XMACRO(glReadPixels, void, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void * data)) \
_SG_XMACRO(glBindVertexArray, void, (GLuint array)) \
_SG_XMACRO(glFramebufferTextureLayer, void, (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)) \
_SG_XMACRO(glGenFramebuffers, void, (GLsizei n, GLuint * framebuffers)) \
@ -4754,6 +4756,7 @@ _SOKOL_PRIVATE void _sg_dummy_update_image(_sg_image_t* img, const sg_image_data
_SG_XMACRO(glGenVertexArrays, void, (GLsizei n, GLuint * arrays)) \
_SG_XMACRO(glFrontFace, void, (GLenum mode)) \
_SG_XMACRO(glCullFace, void, (GLenum mode))
// __v_ end
// generate GL function pointer typedefs
#define _SG_XMACRO(name, ret, args) typedef ret (GL_APIENTRY* PFN_ ## name) args;