Make BlendMode::alpha the fallback for unknown future blend modes

This commit is contained in:
Dmitry Kostenko 2022-07-13 22:45:05 +02:00
parent 20bd6bdb68
commit 6df69f9b5b

@ -63,12 +63,6 @@ Particle::Particle(
: ParticleParamTypes::BlendMode::alpha; : ParticleParamTypes::BlendMode::alpha;
switch (blendmode) { switch (blendmode) {
case ParticleParamTypes::BlendMode::alpha:
bfsrc = video::EBF_SRC_ALPHA;
bfdst = video::EBF_ONE_MINUS_SRC_ALPHA;
blendop = video::EBO_ADD;
break;
case ParticleParamTypes::BlendMode::add: case ParticleParamTypes::BlendMode::add:
bfsrc = video::EBF_SRC_ALPHA; bfsrc = video::EBF_SRC_ALPHA;
bfdst = video::EBF_DST_ALPHA; bfdst = video::EBF_DST_ALPHA;
@ -87,7 +81,11 @@ Particle::Particle(
blendop = video::EBO_ADD; blendop = video::EBO_ADD;
break; break;
default: assert(false); default: // includes ParticleParamTypes::BlendMode::alpha
bfsrc = video::EBF_SRC_ALPHA;
bfdst = video::EBF_ONE_MINUS_SRC_ALPHA;
blendop = video::EBO_ADD;
break;
} }
// Texture // Texture