mirror of https://github.com/vitalif/openscad
disable setting alpha without color
parent
4afdde51f4
commit
c6209f15b7
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue