disable setting alpha without color

stl_dim
Marius Kintel 2011-09-03 01:53:00 +02:00
parent 4afdde51f4
commit c6209f15b7
3 changed files with 4 additions and 3 deletions

View File

@ -93,7 +93,7 @@ void OpenCSGRenderer::renderCSGChain(CSGChain *chain, GLint *shaderinfo,
chain->polysets[j]->render_surface(PolySet::COLORMODE_HIGHLIGHT, PolySet::csgmode_e(csgmode + 20), m, shaderinfo);
} else if (background) {
chain->polysets[j]->render_surface(PolySet::COLORMODE_BACKGROUND, PolySet::csgmode_e(csgmode + 10), m, shaderinfo);
} else if (c[0] >= 0 || c[1] >= 0 || c[2] >= 0 || c[3] >= 0) {
} else if (c[0] >= 0 || c[1] >= 0 || c[2] >= 0) {
// User-defined color from source
glColor4dv(c);
if (shaderinfo) {

View File

@ -92,7 +92,7 @@ void ThrownTogetherRenderer::renderCSGChain(CSGChain *chain, bool highlight,
} else {
chain->polysets[i]->render_surface(PolySet::COLORMODE_NONE, PolySet::csgmode_e(csgmode), m);
}
} else if (c[0] >= 0 || c[1] >= 0 || c[2] >= 0 || c[3] >= 0) {
} else if (c[0] >= 0 || c[1] >= 0 || c[2] >= 0) {
glColor4dv(c);
chain->polysets[i]->render_surface(PolySet::COLORMODE_NONE, PolySet::csgmode_e(csgmode), m);
if (showedges) {

View File

@ -47,7 +47,8 @@ AbstractNode *ColorModule::evaluate(const Context *ctx, const ModuleInstantiatio
{
ColorNode *node = new ColorNode(inst);
for (int i = 0; i < 4; i++) node->color[i] = -1;
node->color[0] = node->color[1] = node->color[2] = -1.0;
node->color[3] = 1.0;
QVector<QString> argnames;
QVector<Expression*> argexpr;