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

small fix for 64 bit mac

parent d6525bf5
No related branches found
No related tags found
No related merge requests found
......@@ -165,8 +165,8 @@ int meshSizeEditor()
if(CTX::instance()->nonModalWindows) editor->window->set_non_modal();
editor->sa = new Release_Slider(0, 0, 200, 20);
editor->sa->type(FL_HOR_NICE_SLIDER);
editor->sa->minimum(0.05);
editor->sa->maximum(5);
editor->sa->minimum(0.01);
editor->sa->maximum(2.5);
editor->sa->callback(mesh_size_factor);
editor->window->border(0);
editor->window->end();
......
......@@ -3,7 +3,7 @@
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to <gmsh@geuz.org>.
#include "stdio.h"
#include <stdio.h>
#include "openglWindow.h"
#include "graphicWindow.h"
#include "manipWindow.h"
......@@ -15,10 +15,7 @@
#include "MElement.h"
#include "Numeric.h"
#include "FlGui.h"
#if defined(__APPLE__)
#include <OpenGL/glu.h>
#else
#include <GL/glu.h>
#include "drawContext.h"
#endif
#include "Context.h"
......@@ -180,7 +177,7 @@ void openglWindow::draw()
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
_ctx->draw3d();
_ctx->draw3d();
glColor4ubv((GLubyte *) & CTX::instance()->color.fg);
glPointSize((float)CTX::instance()->geom.pointSize);
glBegin(GL_POINTS);
......@@ -434,7 +431,7 @@ int openglWindow::handle(int event)
// find line in real space corresponding to current cursor position
double p[3], d[3];
_ctx->unproject(_curr.win[0], _curr.win[1], p, d);
// fin closest point to the center of graity
// find closest point to the center of gravity
double r[3] = {CTX::instance()->cg[0] - p[0], CTX::instance()->cg[1] - p[1],
CTX::instance()->cg[2] - p[2]}, t;
prosca(r, d, &t);
......
......@@ -260,6 +260,12 @@ void drawContext::draw3d()
#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(CTX::instance()->mesh.pointsNum)
numStrings = std::max(numStrings, GModel::current()->getNumMeshVertices());
if(CTX::instance()->mesh.linesNum || CTX::instance()->mesh.surfacesNum ||
CTX::instance()->mesh.volumesNum)
numStrings = std::max(numStrings, GModel::current()->getNumMeshElements());
numStrings *= 2;
if(gl_texture_pile_height() < numStrings)
gl_texture_pile_height(numStrings);
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment