diff --git a/Fltk/FlGui.cpp b/Fltk/FlGui.cpp index f99de795ba9ac9f3eb829f6dc7aee570ec0866a4..7fc46308089bf90142cab791bb807da47effb761 100644 --- a/Fltk/FlGui.cpp +++ b/Fltk/FlGui.cpp @@ -185,14 +185,6 @@ FlGui::FlGui(int argc, char **argv) // set default font size FL_NORMAL_SIZE = drawContext::global()->getFontSize(); -#if defined(__APPLE__) && defined(HAVE_64BIT_SIZE_T) -#if (FL_MAJOR_VERSION == 1) && (FL_MINOR_VERSION == 3) - int numStrings = 1000; - if(gl_texture_pile_height() < numStrings) - gl_texture_pile_height(numStrings); -#endif -#endif - // handle themes and tooltip font size if(CTX::instance()->guiTheme.size()) Fl::scheme(CTX::instance()->guiTheme.c_str()); diff --git a/Graphics/drawContext.cpp b/Graphics/drawContext.cpp index d79f3c17c8a7b3dc4165d03655ecb7e6defdbb1c..903f666e1ed360e35cc3146fd73315e71b9c0cb5 100644 --- a/Graphics/drawContext.cpp +++ b/Graphics/drawContext.cpp @@ -21,6 +21,7 @@ #if defined(HAVE_FLTK) #include <FL/Fl_JPEG_Image.H> #include <FL/Fl_PNG_Image.H> +#include <FL/gl.h> #endif drawContextGlobal *drawContext::_global = 0; @@ -252,6 +253,15 @@ void drawContext::draw3d() else CTX::instance()->polygonOffset = 0; + // speedup drawing of textured fonts on cocoa mac version +#if defined(HAVE_FLTK) && defined(__APPLE__) && defined(HAVE_64BIT_SIZE_T) +#if (FL_MAJOR_VERSION == 1) && (FL_MINOR_VERSION == 3) + int numStrings = GModel::current()->getNumVertices(); + if(gl_texture_pile_height() < numStrings) + gl_texture_pile_height(numStrings); +#endif +#endif + glDepthFunc(GL_LESS); glEnable(GL_DEPTH_TEST); initProjection(); diff --git a/Graphics/drawPost.cpp b/Graphics/drawPost.cpp index 1bbd4faa17db3f3951428487f8721ea003fddafa..decb6c91b09bef4cae2c80d1097cdace08f79464 100644 --- a/Graphics/drawPost.cpp +++ b/Graphics/drawPost.cpp @@ -5,6 +5,7 @@ #include <math.h> #include <algorithm> +#include "GmshConfig.h" #include "GmshMessage.h" #include "drawContext.h" #include "PView.h" @@ -16,6 +17,11 @@ #include "Context.h" #include "gl2ps.h" +#if defined(HAVE_FLTK) +#include <FL/Fl.H> +#include <FL/gl.H> +#endif + static void drawArrays(drawContext *ctx, PView *p, VertexArray *va, GLint type, bool useNormalArray) { @@ -273,8 +279,8 @@ static void drawGlyphs(drawContext *ctx, PView *p) Msg::Debug("drawing extra glyphs (this is slow...)"); - // speed-up string drawing with cocoa fltk -#if defined(__APPLE__) && defined(HAVE_64BIT_SIZE_T) + // speedup drawing of textured fonts on cocoa mac version +#if defined(HAVE_FLTK) && defined(__APPLE__) && defined(HAVE_64BIT_SIZE_T) #if (FL_MAJOR_VERSION == 1) && (FL_MINOR_VERSION == 3) if(opt->intervalsType == PViewOptions::Numeric){ int numStrings = 0;