From 221a9bab546547f683a531415e21c4d4d0315bd4 Mon Sep 17 00:00:00 2001 From: Alexey Date: Fri, 8 Jan 2021 07:14:58 +0300 Subject: [PATCH] Fix screenshots on gles1 > format must be either GL_RGBA or the value of GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES. --- ref_gl/gl_backend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ref_gl/gl_backend.c b/ref_gl/gl_backend.c index 2706c145..ffc56ab0 100644 --- a/ref_gl/gl_backend.c +++ b/ref_gl/gl_backend.c @@ -465,13 +465,13 @@ qboolean VID_ScreenShot( const char *filename, int shot_type ) r_shot->width = (gpGlobals->width + 3) & ~3; r_shot->height = (gpGlobals->height + 3) & ~3; r_shot->flags = IMAGE_HAS_COLOR; - r_shot->type = PF_RGB_24; + r_shot->type = PF_RGBA_32; r_shot->size = r_shot->width * r_shot->height * gEngfuncs.Image_GetPFDesc( r_shot->type )->bpp; r_shot->palette = NULL; r_shot->buffer = Mem_Malloc( r_temppool, r_shot->size ); // get screen frame - pglReadPixels( 0, 0, r_shot->width, r_shot->height, GL_RGB, GL_UNSIGNED_BYTE, r_shot->buffer ); + pglReadPixels( 0, 0, r_shot->width, r_shot->height, GL_RGBA, GL_UNSIGNED_BYTE, r_shot->buffer ); switch( shot_type ) {