diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2004-09-09 21:34:48 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2004-09-09 21:34:48 +0000 |
| commit | e20773fa577154d9d5338cecf5f0912d1c9514cc (patch) | |
| tree | 978d03742b04d3a63ba4cf30156c655636ff3e30 /src/gl_draw.cxx | |
| parent | b90f593ae6c6769a1244b5efebbcad3f469027ae (diff) | |
Quartz port:
- removed all #warning statemnets and explained caveats with regular
// warning lines
- made GL text rendering work again (may use wrong fonts since agl doesn't
really support ATS)
- removed horizontal jittering in Fl_Input_ caused by fractional text
positions. Unfortunatly, this does not work for Fl_Text_Display, which
not only jitters, but also became horendously slow due to the complex
font rendering in Quartz)
I will fix some of the speed issues in fl_measure this afternoon, and
also improve on the 'innards' for rgb data rendering. After that, I will
have to leave the Quartz port alone for a while due to lack of time.
I suggest we make another rc in the next days.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3812 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/gl_draw.cxx')
| -rw-r--r-- | src/gl_draw.cxx | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx index cf8a870c9..fbf43cb7d 100644 --- a/src/gl_draw.cxx +++ b/src/gl_draw.cxx @@ -1,5 +1,5 @@ // -// "$Id: gl_draw.cxx,v 1.7.2.5.2.16 2004/08/31 22:00:49 matthiaswm Exp $" +// "$Id: gl_draw.cxx,v 1.7.2.5.2.17 2004/09/09 21:34:48 matthiaswm Exp $" // // OpenGL drawing support routines for the Fast Light Tool Kit (FLTK). // @@ -62,7 +62,16 @@ void gl_font(int fontid, int size) { aglUseFont(aglGetCurrentContext(), fl_fontsize->font, fl_fontsize->face, fl_fontsize->size, 0, 256, fl_fontsize->listbase); #elif defined(__APPLE_QUARTZ__) -#warning quartz : add ATS font calls! + short font, face, size; + uchar fn[256]; + fn[0]=strlen(fl_fontsize->q_name); + strcpy((char*)(fn+1), fl_fontsize->q_name); + GetFNum(fn, &font); + face = 0; + size = fl_fontsize->size; + fl_fontsize->listbase = glGenLists(256); + aglUseFont(aglGetCurrentContext(), font, face, + size, 0, 256, fl_fontsize->listbase); #else # if USE_XFT fl_xfont = fl_xxfont(); @@ -116,9 +125,17 @@ void gl_remove_displaylist_fonts() #endif } +#ifdef __APPLE__ +const char *fl_iso2macRoman(const char*, int); +#endif void gl_draw(const char* str, int n) { +#ifdef __APPLE__ + const char *txt = fl_iso2macRoman(str, n); + glCallLists(n, GL_UNSIGNED_BYTE, txt); +#else glCallLists(n, GL_UNSIGNED_BYTE, str); +#endif } void gl_draw(const char* str, int n, int x, int y) { @@ -209,5 +226,5 @@ void gl_draw_image(const uchar* b, int x, int y, int w, int h, int d, int ld) { #endif // -// End of "$Id: gl_draw.cxx,v 1.7.2.5.2.16 2004/08/31 22:00:49 matthiaswm Exp $". +// End of "$Id: gl_draw.cxx,v 1.7.2.5.2.17 2004/09/09 21:34:48 matthiaswm Exp $". // |
