From 586d613a274ea534d7a47aef5f71eb3aed7df282 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Tue, 2 Mar 2021 17:49:31 +0300 Subject: [PATCH] ref_soft: uncomment texture API functions implementations, they must be working now Fixes #326 and probably some ref_soft crashes --- ref_soft/r_context.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ref_soft/r_context.c b/ref_soft/r_context.c index e0b1e6a9..62859aa0 100644 --- a/ref_soft/r_context.c +++ b/ref_soft/r_context.c @@ -48,12 +48,12 @@ static void GAME_EXPORT R_IncrementSpeedsCounter( int type ) static const byte * GAME_EXPORT R_GetTextureOriginalBuffer( unsigned int idx ) { - /*gl_texture_t *glt = R_GetTexture( idx ); + image_t *glt = R_GetTexture( idx ); if( !glt || !glt->original || !glt->original->buffer ) - return NULL;*/ + return NULL; - return NULL; + return glt->original->buffer; } /* @@ -244,15 +244,15 @@ static float GAME_EXPORT R_GetFrameTime( void ) static const char * GAME_EXPORT GL_TextureName( unsigned int texnum ) { - return "";//return R_GetTexture( texnum )->name; + return R_GetTexture( texnum )->name; } const byte * GAME_EXPORT GL_TextureData( unsigned int texnum ) { -// rgbdata_t *pic = R_GetTexture( texnum )->original; + rgbdata_t *pic = R_GetTexture( texnum )->original; - //if( pic != NULL ) - //return pic->buffer; + if( pic != NULL ) + return pic->buffer; return NULL; }