EMI: Check another bit in the mesh face flags to enable blending.

Bit 0x40000 in the mesh face flags (set only in the intro) should
enable blending, too. This fix lets the various screens of the intro
fade into each other.
This commit is contained in:
Christian Krause 2014-08-14 02:51:29 +02:00
parent 4204b2649c
commit cbbf60d155
4 changed files with 8 additions and 4 deletions

View File

@ -63,7 +63,8 @@ public:
EMIModel *_parent;
enum MeshFaceFlags {
kAlphaBlend = 0x10000
kAlphaBlend = 0x10000,
kUnknownBlend = 0x40000 // used only in intro screen actors
};
EMIMeshFace() : _faceLength(0), _numFaces(0), _hasTexture(0), _texID(0), _flags(0), _indexes(NULL), _parent(NULL), _indicesEBO(0) { }

View File

@ -755,7 +755,8 @@ void GfxOpenGL::drawEMIModelFace(const EMIModel *model, const EMIMeshFace *face)
glEnable(GL_TEXTURE_2D);
else
glDisable(GL_TEXTURE_2D);
if (face->_flags & EMIMeshFace::kAlphaBlend)
if (face->_flags & EMIMeshFace::kAlphaBlend ||
face->_flags & EMIMeshFace::kUnknownBlend)
glEnable(GL_BLEND);
glBegin(GL_TRIANGLES);

View File

@ -907,7 +907,8 @@ void GfxOpenGLS::updateEMIModel(const EMIModel* model) {
}
void GfxOpenGLS::drawEMIModelFace(const EMIModel* model, const EMIMeshFace* face) {
if (face->_flags & EMIMeshFace::kAlphaBlend)
if (face->_flags & EMIMeshFace::kAlphaBlend ||
face->_flags & EMIMeshFace::kUnknownBlend)
glEnable(GL_BLEND);
const EMIModelUserData *mud = (const EMIModelUserData *)model->_userData;
mud->_shader->use();

View File

@ -758,7 +758,8 @@ void GfxTinyGL::drawEMIModelFace(const EMIModel *model, const EMIMeshFace *face)
tglEnable(TGL_TEXTURE_2D);
else
tglDisable(TGL_TEXTURE_2D);
if (face->_flags & EMIMeshFace::kAlphaBlend)
if (face->_flags & EMIMeshFace::kAlphaBlend ||
face->_flags & EMIMeshFace::kUnknownBlend)
tglEnable(TGL_BLEND);
tglBegin(TGL_TRIANGLES);