Further fixes for the various sky lines which do not respond to Night Vision setting (such as equator)
My solution is to calculate a local color for lines, and also labels, the calculation is lifted from SkyGrid::draw
source code was 0.11.4a
in /src/core/modules/GridLinesMgr.cpp function SkyLine::draw replace these lines:
// Initialize a painter and set openGL state
StelPainter sPainter(prj);
sPainter.setColor(color[0], color[1], color[2], fader.getInterstate());
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode
Vec4f textColor(color[0], color[1], color[2], 0);
with these, where a new local variable lcolor is conditionally set redish:
// Initialize a painter and set openGL state
StelPainter sPainter(prj);
Vec3f lcolor;
lcolor = color;
if(StelApp::getInstance().getVisionModeNight()) { //code lifted fron SkyGrid::draw
lcolor[0] = (color[0] + color[1] + color[2]) / 3.0;
lcolor[1] = lcolor[2] = 0.;
}
sPainter.setColor(lcolor[0], lcolor[1], lcolor[2], fader.getInterstate());
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transparency mode
Further fixes for the various sky lines which do not respond to Night Vision setting (such as equator)
My solution is to calculate a local color for lines, and also labels, the calculation is lifted from SkyGrid::draw
source code was 0.11.4a
in /src/core/ modules/ GridLinesMgr. cpp function SkyLine::draw replace these lines:
// Initialize a painter and set openGL state setColor( color[0] , color[1], color[2], fader.getInters tate()) ; GL_BLEND) ; GL_SRC_ ALPHA, GL_ONE_ MINUS_SRC_ ALPHA); // Normal transparency mode
StelPainter sPainter(prj);
sPainter.
glEnable(
glBlendFunc(
Vec4f textColor(color[0], color[1], color[2], 0);
with these, where a new local variable lcolor is conditionally set redish: :getInstance( ).getVisionMode Night() ) { //code lifted fron SkyGrid::draw setColor( lcolor[ 0], lcolor[1], lcolor[2], fader.getInters tate()) ; GL_BLEND) ; GL_SRC_ ALPHA, GL_ONE_ MINUS_SRC_ ALPHA); // Normal transparency mode
// Initialize a painter and set openGL state
StelPainter sPainter(prj);
Vec3f lcolor;
lcolor = color;
if(StelApp:
lcolor[0] = (color[0] + color[1] + color[2]) / 3.0;
lcolor[1] = lcolor[2] = 0.;
}
sPainter.
glEnable(
glBlendFunc(
Vec4f textColor( lcolor[ 0], lcolor[1], lcolor[2], 0);
Not sure if this is the most elegant solution, but it works.