[GRASS-dev] Re: North Arrow updates
Glynn Clements
glynn at gclements.plus.com
Thu Dec 7 21:40:12 EST 2006
Hamish wrote:
> Hamish wrote:
> > > > I also set the default arrow and text colors in
> > > > panel_main.tcl to black (you might want to change these).
> >
> > I changed the default text color to white as the two are drawn
> > on top of each other. Note the text color is ignored. I will look
> > into this next.
>
> A bit stuck...
>
> The north arrow "North" text uses basically the same method as the
> panel_label.tcl text (which works), but "North" always comes out white.
>
> If I add:
> gsd_colormode(CM_COLOR);
> before the gl commands I get the color through, but then the 3D surface
> goes all black. If after the gl calls I add:
> gsd_colormode(CM_AD);
> it mostly gets back to normal, but looks a bit washed out.*
>
> The 3D surface stays black if I do:
> gsd_colormode(CM_DIFFUSE);
> instead of CM_AD.
>
> (I don't know what the colormodes do, I'm just trying things here)
After gsd_init_lightmodel(), the state will initially be equivalent to
CM_NULL, although it may subsequently be changed, possibly to a state
which doesn't correspond to anything which can be achieved through
gsd_colormode().
For safety, I suggest using glPushAttrib(GL_LIGHTING_BIT) and
glPopAttrib() to save and restore the lighting state.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list