From 1cf7b3e697f5925cbd5f48079e089d8bca3d7de4 Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 2 Apr 2024 03:51:36 +0200 Subject: [PATCH] tf --- src/hardware/r_opengl/r_opengl.c | 34 -------------------------------- 1 file changed, 34 deletions(-) diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index 564d94eba..669375ace 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -987,40 +987,6 @@ void SetStates(void) pglScalef(1.0f, 1.0f, -1.0f); pglGetFloatv(GL_MODELVIEW_MATRIX, modelMatrix); // added for new coronas' code (without depth buffer) } -// -----------------+ -// DeleteTexture : Deletes a texture from the GPU and frees its data -// -----------------+ -EXPORT void HWRAPI(DeleteTexture) (GLMipmap_t *pTexInfo) -{ - FTextureInfo *head = TexCacheHead; - - if (!pTexInfo) - return; - else if (pTexInfo->downloaded) - pglDeleteTextures(1, (GLuint *)&pTexInfo->downloaded); - - while (head) - { - if (head->downloaded == pTexInfo->downloaded) - { - if (head->next) - head->next->prev = head->prev; - else // no next -> tail is being deleted -> update TexCacheTail - TexCacheTail = head->prev; - if (head->prev) - head->prev->next = head->next; - else // no prev -> head is being deleted -> update TexCacheHead - TexCacheHead = head->next; - free(head); - break; - } - - head = head->next; - } - - pTexInfo->downloaded = 0; -} - void GLFramebuffer_Generate(void) {