diff --git a/shared/rd-rend2/tr_image.cpp b/shared/rd-rend2/tr_image.cpp index 8919c40563..7dd0fa1e62 100644 --- a/shared/rd-rend2/tr_image.cpp +++ b/shared/rd-rend2/tr_image.cpp @@ -37,6 +37,7 @@ static struct ImagesPool image_t *pPool; ImagesPool *pNext; } *imagesPool; +static bool imagePoolInitialized = false; static image_t *hashTable[FILE_HASH_SIZE]; @@ -3599,11 +3600,14 @@ Initialise the images pool allocator */ void R_InitImagesPool() { + if (imagePoolInitialized) + return; Com_Memset(hashTable, 0, sizeof(hashTable)); imagesPool = NULL; tr.imagesFreeList = NULL; R_ExtendImagesPool(); + imagePoolInitialized = true; } /* @@ -3644,6 +3648,7 @@ void R_DeleteTextures( void ) { imagesPool = pNext; } + imagePoolInitialized = false; Com_Memset( glState.currenttextures, 0, sizeof( glState.currenttextures ) ); GL_SelectTexture( 1 ); qglBindTexture( GL_TEXTURE_2D, 0 ); diff --git a/shared/rd-rend2/tr_model.cpp b/shared/rd-rend2/tr_model.cpp index 1bacf55519..2ef0db0372 100644 --- a/shared/rd-rend2/tr_model.cpp +++ b/shared/rd-rend2/tr_model.cpp @@ -1598,9 +1598,6 @@ void R_SVModelInit() R_InitImagesPool(); R_InitImages(); - R_InitGPUBuffers(); - FBO_Init(); - GLSL_LoadGPUShaders(); R_InitShaders(qfalse); #endif