EgtGraphics 1.8i2 :
- corretta gestione trasparenza 0 (superfici e solidi completamente trasparenti).
This commit is contained in:
+10
-1
@@ -83,7 +83,7 @@ TextureMgr::LoadTexture( const string& sName, const string& sFile,
|
||||
return false ;
|
||||
|
||||
// se necessario, converto l'immagine a 32 bit per pixel (BGRA)
|
||||
int bitsPerPixel = FreeImage_GetBPP( pDib) ;
|
||||
int bitsPerPixel = FreeImage_GetBPP( pDib) ;
|
||||
if ( bitsPerPixel != 32) {
|
||||
FIBITMAP* pTmpDib = pDib ;
|
||||
pDib = FreeImage_ConvertTo32Bits( pTmpDib) ;
|
||||
@@ -384,6 +384,15 @@ TextureMgr::TestImageWithOpenGL( FIBITMAP*& pDib)
|
||||
FreeImage_Unload( pTmpDib) ;
|
||||
nWidth = nNewW ;
|
||||
nHeight = nNewH ;
|
||||
// verifico che la nuova immagine sia valida
|
||||
if ( pDib == nullptr)
|
||||
return false ;
|
||||
if ( FreeImage_GetBits( pDib) == nullptr ||
|
||||
FreeImage_GetWidth( pDib) != nWidth || FreeImage_GetHeight( pDib) != nHeight) {
|
||||
FreeImage_Unload( pDib) ;
|
||||
pDib = nullptr ;
|
||||
return false ;
|
||||
}
|
||||
}
|
||||
|
||||
// verifico sia caricabile da OpenGL corrente
|
||||
|
||||
Reference in New Issue
Block a user