From: Bruce S. <ba...@an...> - 2000-12-04 21:52:37
|
One of the high-priority VPython bugs is that the "label" object for displaying text does not exist in the Linux version. Among other things, this makes the autoscaled graphing be unusable. Is it possible that there is someone in the VPython user community who is sufficiently knowledgeable in Linux to be able to help with this? We are short of this resource at the moment. A main component of the problem is simply choosing a font. Here are some notes from students who looked at the problem earlier in the semester but ran out of time to devote to it. -------------------------------- On Unix, an analogous function glXUseXFont() is available. However, we have been using the (higher level) GTK-GLArea widget instead of writing directly to glX. GTK-GLArea seems to only provide a draw_text() function, not a way to obtain fonts. -------------------------------- From Ari: unfortunately, i can't even compile, due to an evil name conflict: X uses the name 'Display' to refer to an X display; we use Display internally as well. I played with trying to #define one away from the other, but the modules are too interlinked -- i always end up hitting both of them. short of massively reordering the include structure, i'm not sure it's practical. Xlib.h typedef's struct _XDisplay to Display. Xlib is pulled in by glx.h which is needed by our xgl.h. But you can't move xgl.h ahead of the stuff that pulls in our display.h (i.e. say from the first to the 2nd line of arrow.cpp) because we need the other core Visual headers so we know what a glcontext is and stuff .... yuck. before i go doing anything drastic (like renaming everyplace we use Display, or putting it in the namespace Visual or something like that) i wanted to consult with Scherer. Do you want me to check my stuff in, even tho it's broken? it's likely also to have font-naming errors, since X will probably want an evil X long named font ('adobe-courier-bitstream-foundry-10-*-1-1-2-3-5-*-=|:-)}-abe-lincoln'). i *think* it might work where i just try to load 'fixed' (since X seems to like to do that in other cases where i specify names that don't exist) but we'll see. i don't have any real docs on glX calls, except Sun's online manpages (which are pretty thin at best). Mesa doesn't bother with documentation :) and the only statement in the red book about glXUseXFont is that it exists (i could *really* use a working example). the Linux X call docs aren't bad tho ... i think everything else in there will work right. |