mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
sokol: add screenshot function to OpenGL based backends (#12169)
This commit is contained in:
9
thirdparty/sokol/sokol_v.post.h
vendored
Normal file
9
thirdparty/sokol/sokol_v.post.h
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
#if defined(SOKOL_GLCORE33) || defined(SOKOL_GLES2) || defined(SOKOL_GLES3)
|
||||
void v_sapp_gl_read_rgba_pixels(int x, int y, int width, int height, unsigned char* pixels) {
|
||||
glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
|
||||
}
|
||||
#else
|
||||
void v_sapp_gl_read_rgba_pixels(int x, int y, int width, int height, unsigned char* pixels) {
|
||||
// TODO
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user