summaryrefslogtreecommitdiff
path: root/src/gl_draw.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2004-05-15 22:58:19 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2004-05-15 22:58:19 +0000
commit998f74be9f970c741c5e1fee9ee1358190346114 (patch)
treeec3823599ad90721427547a18b5e6171f638c069 /src/gl_draw.cxx
parente643c17eea3312b6871ea389d3ab754f030fc3b8 (diff)
Fl_Scroll now uses a full redraw when the scheme is set to
plastic and the box type is a frame (STR #205) Fl_Window::resize() did not work properly with KDE 3.2 (STR #356) FLTK didn't delete font bitmaps when the last OpenGL window was deleted, preventing future text from displaying (STR #310) FLUID didn't include a full initialization record for the trailing NULL menu items (STR #375) Fl_Browser::item_width() did not properly handle format modifiers (STR #372) Fl_Browser::item_height() did not handle columns properly (STR #371) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3419 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/gl_draw.cxx')
-rw-r--r--src/gl_draw.cxx45
1 files changed, 43 insertions, 2 deletions
diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx
index 50599dc8c..6bbdb5ab0 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.12 2004/04/11 04:39:00 easysw Exp $"
+// "$Id: gl_draw.cxx,v 1.7.2.5.2.13 2004/05/15 22:58:19 easysw Exp $"
//
// OpenGL drawing support routines for the Fast Light Tool Kit (FLTK).
//
@@ -74,6 +74,47 @@ void gl_font(int fontid, int size) {
glListBase(fl_fontsize->listbase);
}
+
+void gl_remove_displaylist_fonts()
+{
+# if HAVE_GL
+
+ // clear variables used mostly in fl_font
+ fl_font_ = 0;
+ fl_size_ = 0;
+
+ for (int j = 0 ; j < FL_FREE_FONT ; ++j)
+ {
+ Fl_FontSize* past = 0;
+ Fl_Fontdesc* s = fl_fonts + j ;
+ Fl_FontSize* f = s->first;
+ while (f != 0) {
+ if(f->listbase) {
+ if(f == s->first) {
+ s->first = f->next;
+ }
+ else {
+ past->next = f->next;
+ }
+
+ // It would be nice if this next line was in a descturctor somewhere
+ glDeleteLists(f->listbase, 256);
+
+ Fl_FontSize* tmp = f;
+ f = f->next;
+ delete tmp;
+ }
+ else {
+ past = f;
+ f = f->next;
+ }
+ }
+ }
+
+#endif
+}
+
+
void gl_draw(const char* str, int n) {
glCallLists(n, GL_UNSIGNED_BYTE, str);
}
@@ -166,5 +207,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.12 2004/04/11 04:39:00 easysw Exp $".
+// End of "$Id: gl_draw.cxx,v 1.7.2.5.2.13 2004/05/15 22:58:19 easysw Exp $".
//