Fix screenshots on gles1

> format must be either GL_RGBA or the value of GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES.
This commit is contained in:
Alexey 2021-01-08 07:14:58 +03:00 committed by Alibek Omarov
parent 102fb8ec40
commit 221a9bab54
1 changed files with 2 additions and 2 deletions

View File

@ -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 )
{