EgtGraphics 1.8i2 :
- corretta gestione trasparenza 0 (superfici e solidi completamente trasparenti).
This commit is contained in:
Binary file not shown.
+5
-1
@@ -449,9 +449,13 @@ Scene::DrawGeoObj( const IGdbIterator& iIter, int nPass, const MdStMkCol& siObj)
|
||||
if ( (( nGeoType & GEO_CURVE) != 0 || pUserObj != nullptr) && m_bShowCurveDirection)
|
||||
bShowAux = true ;
|
||||
|
||||
// recupero il valore di opacità (solo per le superfici può esserci trasparenza)
|
||||
// recupero il valore di opacità (solo per le superfici e i solidi può esserci trasparenza)
|
||||
int nAlpha = siObj.colObj.GetIntAlpha() ;
|
||||
|
||||
// salto in ogni caso le superfici e i solidi completamente trasparenti
|
||||
if ( nAlpha == 0 && ( nGeoType & ( GEO_SURF | GEO_VOLUME)) != 0)
|
||||
return true ;
|
||||
|
||||
// se hiddenline e non selezione
|
||||
if ( m_nShowMode == SM_HIDDENLINE && ! m_bSelect) {
|
||||
// in prima passata disegno solo le superfici opache
|
||||
|
||||
+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