From dcc82d8926e447e422f200d01e1aa990233bc16a Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 7 Feb 2018 15:34:44 +0000 Subject: STR#3450: Draw text with OpenGL using textures on all platforms. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12650 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl.H | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'FL/Fl.H') diff --git a/FL/Fl.H b/FL/Fl.H index 8cfed7f05..cb7f24ebb 100644 --- a/FL/Fl.H +++ b/FL/Fl.H @@ -134,6 +134,7 @@ class FL_EXPORT Fl { private: static int use_high_res_GL_; + static int draw_GL_text_with_textures_; public: @@ -1279,6 +1280,27 @@ int main() { \version 1.3.4 */ static int use_high_res_GL() { return use_high_res_GL_; } + + /** sets whether OpenGL uses textures to draw all text. + By default, FLTK draws OpenGL text using textures, if the necessary + hardware support is available. Call \p Fl::draw_GL_text_with_textures(0) + once in your program before the first call to gl_font() to have FLTK + draw instead OpenGL text using a legacy, platform-dependent procedure. + It's recommended not to deactivate textures under the MacOS platform + because the MacOS legacy procedure is extremely rudimentary. + \param val use 0 to prevent FLTK from drawing GL text with textures + \see gl_texture_pile_height(int max) + \version 1.4.0 + */ + static void draw_GL_text_with_textures(int val) { draw_GL_text_with_textures_ = val; } + + /** returns whether whether OpenGL uses textures to draw all text. + Default is yes. + \see draw_GL_text_with_textures(int val) + \version 1.4.0 + */ + static int draw_GL_text_with_textures() { return draw_GL_text_with_textures_; } + #ifdef FLTK_HAVE_CAIRO /** \defgroup group_cairo Cairo Support Functions and Classes -- cgit v1.2.3