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)
[*] bug #4238 ? I'm not sure if the bug is really in my video card driver,
as no one else has reported the same problem AFAIK.
https://intevation.de/rt/webrt?serial_num=4238
here's some of the code:
=======================================
lib/ogsf/gsd_objs.c gsd_north_arrow() :
gsd_color_func(text_clr);
txt = "North";
...
glRasterPos3fv(base[0]);
glListBase(fontbase);
glCallLists(strlen(txt), GL_BYTE, (GLubyte *) txt);
GS_done_draw();
gsd_popmatrix();
gsd_flush();
=======================================
panel_label.tcl leads to:
lib/ogsf/gsd_label.c:
/* Set text color */
gsd_color_func(color);
do_label_display(fontbase, labpt, text);
lib/ogsf/gsd_fonts.c
/*****************************************/
void do_label_display(GLuint fontbase, float *lab_pos, char *txt)
{
glRasterPos2f(lab_pos, lab_pos[Y]);
glListBase(fontbase);
glCallLists(strlen(txt), GL_BYTE, (GLubyte *) txt);
return;
}
=======================================
I don't see the difference. (beyond 2D/3D placement)
?
Hamish