Browse Source

Fix transp png images have border, close #122

master
Krisjanis Rijnieks 8 years ago
parent
commit
b193764e6e
  1. 8
      src/Surfaces/SurfaceStack.cpp

8
src/Surfaces/SurfaceStack.cpp

@ -26,8 +26,14 @@ void SurfaceStack::swap(int a, int b){
}
void SurfaceStack::draw(){
ofEnableAlphaBlending();
for(int i = 0; i < _surfaces.size(); ++i){
if(_surfaces[i]->getSource()->getType() == SourceType::SOURCE_TYPE_FBO){
glEnable(GL_BLEND);
glBlendFuncSeparate(GL_ONE, GL_ZERO, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
}else{
ofEnableAlphaBlending();
}
_surfaces[i]->draw();
}
}

Loading…
Cancel
Save