summaryrefslogtreecommitdiff
path: root/src/gl_draw.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2011-02-07 13:49:34 +0000
committerManolo Gouy <Manolo>2011-02-07 13:49:34 +0000
commitcb902eebe3b419e77599fe669bc0cbeb3bce104a (patch)
tree97724c741db795181108c27c7db583af7ebf6123 /src/gl_draw.cxx
parentdb3e5716372f6118f07c1b9dfed380258bb9e722 (diff)
Replaced global variable fl_fontsize by fl_graphics_driver->font_descriptor().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8395 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/gl_draw.cxx')
-rw-r--r--src/gl_draw.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx
index 95f9a37ce..913b47389 100644
--- a/src/gl_draw.cxx
+++ b/src/gl_draw.cxx
@@ -3,7 +3,7 @@
//
// OpenGL drawing support routines for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2011 by Bill Spitzak and others.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
@@ -77,6 +77,7 @@ static Fl_Font_Descriptor *gl_fontsize;
*/
void gl_font(int fontid, int size) {
fl_font(fontid, size);
+ Fl_Font_Descriptor *fl_fontsize = fl_graphics_driver->font_descriptor();
#if !GL_DRAW_USES_TEXTURES
if (!fl_fontsize->listbase) {
@@ -482,7 +483,7 @@ int gl_texture_fifo::compute_texture(const char* str, int n)
if (base == NULL) return -1;
fl_gc = CGBitmapContextCreate(base, fifo[current].width, fifo[current].height, 8, fifo[current].width*4, lut, kCGImageAlphaPremultipliedLast);
CGColorSpaceRelease(lut);
- fl_fontsize = gl_fontsize;
+ fl_graphics_driver->font_descriptor(gl_fontsize);
GLfloat colors[4];
glGetFloatv(GL_CURRENT_COLOR, colors);
fl_color((uchar)(colors[0]*255), (uchar)(colors[1]*255), (uchar)(colors[2]*255));