From f1c5bbae35a1cbaf62271912d011c7c5ec0dfce4 Mon Sep 17 00:00:00 2001 From: Iliyas Jorio Date: Wed, 23 Jun 2021 20:55:15 +0200 Subject: [PATCH] QD3D: Remove glTextureName from TQ3Pixmap --- src/QD3D/3DMFParser.cpp | 1 - src/QD3D/QD3D.cpp | 4 ---- src/QD3D/QD3D.h | 2 -- 3 files changed, 7 deletions(-) diff --git a/src/QD3D/3DMFParser.cpp b/src/QD3D/3DMFParser.cpp index a6165d9..bd05661 100644 --- a/src/QD3D/3DMFParser.cpp +++ b/src/QD3D/3DMFParser.cpp @@ -515,7 +515,6 @@ uint32_t Q3MetaFileParser::Parse_txmm_or_txpm(uint32_t chunkType, uint32_t chunk metaFile.textures[newTextureID] = __Q3Alloc(1, 'PXMP'); TQ3Pixmap& texture = *metaFile.textures[newTextureID]; - texture.glTextureName = 0; texture.pixelType = pixelType; texture.bitOrder = bitOrder; texture.byteOrder = byteOrder; diff --git a/src/QD3D/QD3D.cpp b/src/QD3D/QD3D.cpp index 43f6e6c..fed9890 100644 --- a/src/QD3D/QD3D.cpp +++ b/src/QD3D/QD3D.cpp @@ -36,11 +36,7 @@ void Q3MetaFile_Dispose(TQ3MetaFile* metaFile) __Q3GetCookie(metaFile, '3DMF'); for (int i = 0; i < metaFile->numTextures; i++) - { - if (metaFile->textures[i]->glTextureName) - glDeleteTextures(1, &metaFile->textures[i]->glTextureName); Q3Pixmap_Dispose(metaFile->textures[i]); - } for (int i = 0; i < metaFile->numMeshes; i++) Q3TriMeshData_Dispose(metaFile->meshes[i]); diff --git a/src/QD3D/QD3D.h b/src/QD3D/QD3D.h index 094ea13..090d011 100644 --- a/src/QD3D/QD3D.h +++ b/src/QD3D/QD3D.h @@ -306,7 +306,6 @@ typedef struct TQ3CameraPlacement TQ3Vector3D upVector; } TQ3CameraPlacement; -// WARNING: this structure differs from QD3D. typedef struct TQ3Pixmap { uint8_t *image; @@ -317,7 +316,6 @@ typedef struct TQ3Pixmap uint32_t pixelType; uint32_t bitOrder; uint32_t byteOrder; - uint32_t glTextureName; } TQ3Pixmap; // WARNING: this structure does not exist in QD3D.