void Graphics3DExtrude::drawQuad(const Pnt2f& p1, const Pnt2f& p2, const Pnt2f& p3, const Pnt2f& p4, const Vec2f& t1, const Vec2f& t2, const Vec2f& t3, const Vec2f& t4, const Color4f& color, const TextureObjChunkUnrecPtr Texture, const Real32& Opacity) const { Real32 Alpha( Opacity * getOpacity() * color.alpha()); if(Alpha < 1.0 || Texture->getImage()->hasAlphaChannel()) { //Setup the Blending equations properly glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); } if(Texture != NULL) { Texture->activate(getDrawEnv()); } glBegin(GL_QUADS); glColor4f(color.red(), color.green(), color.blue(), Alpha ); glTexCoord2fv(t1.getValues()); glVertex2fv(p1.getValues()); glTexCoord2fv(t2.getValues()); glVertex2fv(p2.getValues()); glTexCoord2fv(t3.getValues()); glVertex2fv(p3.getValues()); glTexCoord2fv(t4.getValues()); glVertex2fv(p4.getValues()); glEnd(); if(Texture != NULL) { Texture->deactivate(getDrawEnv()); } if(Alpha < 1.0 || Texture->getImage()->hasAlphaChannel()) { glDisable(GL_BLEND); } }