Skip to content
Snippets Groups Projects
Commit 2ce62b2a authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

more tweaks for 64 bit mac version

parent 0537b0a2
No related branches found
No related tags found
No related merge requests found
......@@ -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());
......
......@@ -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();
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment