From ee225899fa2f9ac3da3d38c0c7e37d1c46006eab Mon Sep 17 00:00:00 2001 From: Bergmann89 Date: Thu, 9 Apr 2015 17:17:05 +0200 Subject: [PATCH] * fixed bug: upload of compressed textures will fail --- glBitmap.pas | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/glBitmap.pas b/glBitmap.pas index 4934c14..edd0957 100644 --- a/glBitmap.pas +++ b/glBitmap.pas @@ -8524,13 +8524,13 @@ begin raise EglBitmapNonPowerOfTwo.Create('TglBitmap1D.GenTexture - Rendercontex dosn''t support non power of two texture.'); end; + inherited UploadData(aDataObj, aCheckSize); + if (fID = 0) then CreateID; SetupParameters(BuildWithGlu); UploadDataIntern(aDataObj, BuildWithGlu); glAreTexturesResident(1, @fID, @fIsResident); - - inherited UploadData(aDataObj, aCheckSize); end; {$ENDIF} @@ -8600,6 +8600,8 @@ begin {$IFEND} end; + inherited UploadData(aDataObj, aCheckSize); + if (fID = 0) then CreateID; SetupParameters({$IFNDEF OPENGL_ES}BuildWithGlu{$ENDIF}); @@ -8607,8 +8609,6 @@ begin {$IFNDEF OPENGL_ES} glAreTexturesResident(1, @fID, @fIsResident); {$ENDIF} - - inherited UploadData(aDataObj, aCheckSize); end; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -8693,12 +8693,12 @@ begin {$IFEND} end; + inherited UploadData(aDataObj, aCheckSize); + if (fID = 0) then CreateID; SetupParameters({$IFNDEF OPENGL_ES}BuildWithGlu{$ENDIF}); UploadDataIntern(aDataObj, aCubeTarget{$IFNDEF OPENGL_ES}, BuildWithGlu{$ENDIF}); - - inherited UploadData(aDataObj, aCheckSize); end; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -- 2.1.4