summaryrefslogtreecommitdiff
path: root/src/gl_draw.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2016-01-17 00:44:07 +0000
committerMatthias Melcher <fltk@matthiasm.com>2016-01-17 00:44:07 +0000
commiteb8207ff1bde8a1e092e60d4b2c15336c78e3a40 (patch)
treeb1c9db0aa00c0245e8d5a01c09b305ef83185f92 /src/gl_draw.cxx
parent3235168654b225ce256ae4b54324d68b563b9413 (diff)
Trying to create a more detaild way to configure the library, added runtime information, added an OpenGL graphics driver that renders a button on top of an OpenGL window (see test/cube).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11006 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/gl_draw.cxx')
-rw-r--r--src/gl_draw.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gl_draw.cxx b/src/gl_draw.cxx
index d8500ac75..2fa8f8380 100644
--- a/src/gl_draw.cxx
+++ b/src/gl_draw.cxx
@@ -469,6 +469,8 @@ void gl_texture_fifo::display_texture(int rank)
// pre-computes a string texture
int gl_texture_fifo::compute_texture(const char* str, int n)
{
+ Fl_Graphics_Driver *prev_driver = fl_graphics_driver;
+ fl_graphics_driver = Fl_Display_Device::display_device()->driver();
current = (current + 1) % size_;
if (current > last) last = current;
if ( fifo[current].utf8 ) free(fifo[current].utf8);
@@ -510,6 +512,7 @@ int gl_texture_fifo::compute_texture(const char* str, int n)
} else {
fifo[current].ratio = float(fifo[current].width)/glutStrokeLength(GLUT_STROKE_ROMAN, (uchar*)fifo[current].utf8);
}
+ fl_graphics_driver = prev_driver;
return current;
}