mirror of https://github.com/vitalif/openscad
Switch from getContrastColor to getColor in GLView
* Removed bgcontrast * Added new `Color4f axescolor` obtained by `ColorMap::getColor(..., AXES_COLOR)` * Switched showAxes and showScalemarkers to `axescolor`master
parent
89371f60cf
commit
5e3cd59eeb
|
@ -158,7 +158,7 @@ void GLView::paintGL()
|
||||||
glDisable(GL_LIGHTING);
|
glDisable(GL_LIGHTING);
|
||||||
|
|
||||||
Color4f bgcol = ColorMap::getColor(*this->colorscheme, BACKGROUND_COLOR);
|
Color4f bgcol = ColorMap::getColor(*this->colorscheme, BACKGROUND_COLOR);
|
||||||
Color4f bgcontrast = ColorMap::getContrastColor(bgcol);
|
Color4f axescolor = ColorMap::getColor(*this->colorscheme, AXES_COLOR);
|
||||||
glClearColor(bgcol[0], bgcol[1], bgcol[2], 1.0);
|
glClearColor(bgcol[0], bgcol[1], bgcol[2], 1.0);
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
|
||||||
|
|
||||||
|
@ -169,9 +169,9 @@ void GLView::paintGL()
|
||||||
if (showcrosshairs) GLView::showCrosshairs();
|
if (showcrosshairs) GLView::showCrosshairs();
|
||||||
glTranslated(cam.object_trans.x(), cam.object_trans.y(), cam.object_trans.z());
|
glTranslated(cam.object_trans.x(), cam.object_trans.y(), cam.object_trans.z());
|
||||||
// ...the axis lines need to follow the object translation.
|
// ...the axis lines need to follow the object translation.
|
||||||
if (showaxes) GLView::showAxes(bgcontrast);
|
if (showaxes) GLView::showAxes(axescolor);
|
||||||
// mark the scale along the axis lines
|
// mark the scale along the axis lines
|
||||||
if (showaxes && showscale) GLView::showScalemarkers(bgcontrast);
|
if (showaxes && showscale) GLView::showScalemarkers(axescolor);
|
||||||
}
|
}
|
||||||
|
|
||||||
glEnable(GL_LIGHTING);
|
glEnable(GL_LIGHTING);
|
||||||
|
@ -191,7 +191,7 @@ void GLView::paintGL()
|
||||||
|
|
||||||
// Only for GIMBAL
|
// Only for GIMBAL
|
||||||
glDisable(GL_LIGHTING);
|
glDisable(GL_LIGHTING);
|
||||||
if (showaxes) GLView::showSmallaxes(bgcontrast);
|
if (showaxes) GLView::showSmallaxes(axescolor);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_OPENCSG
|
#ifdef ENABLE_OPENCSG
|
||||||
|
|
Loading…
Reference in New Issue