mirror of https://github.com/vitalif/openscad
Build fixes to compile on MXE with C++11 enabled.
parent
d37f4fbbab
commit
c71e70c0f9
|
@ -216,7 +216,7 @@ void GLView::enable_opencsg_shaders()
|
||||||
else if (GLEW_EXT_framebuffer_object && GLEW_EXT_packed_depth_stencil) {
|
else if (GLEW_EXT_framebuffer_object && GLEW_EXT_packed_depth_stencil) {
|
||||||
this->is_opencsg_capable = true;
|
this->is_opencsg_capable = true;
|
||||||
}
|
}
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
else if (WGLEW_ARB_pbuffer && WGLEW_ARB_pixel_format) this->is_opencsg_capable = true;
|
else if (WGLEW_ARB_pbuffer && WGLEW_ARB_pixel_format) this->is_opencsg_capable = true;
|
||||||
#elif !defined(__APPLE__)
|
#elif !defined(__APPLE__)
|
||||||
else if (GLXEW_SGIX_pbuffer && GLXEW_SGIX_fbconfig) this->is_opencsg_capable = true;
|
else if (GLXEW_SGIX_pbuffer && GLXEW_SGIX_fbconfig) this->is_opencsg_capable = true;
|
||||||
|
|
|
@ -33,7 +33,7 @@ static std::string lookupResourcesPath()
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
const char *searchpath[] = {
|
const char *searchpath[] = {
|
||||||
".", // Release location
|
".", // Release location
|
||||||
RESOURCE_FOLDER("../share/openscad"), // MSYS2 location
|
RESOURCE_FOLDER("../share/openscad"), // MSYS2 location
|
||||||
|
@ -185,7 +185,7 @@ fs::path PlatformUtils::resourcePath(const std::string &resource)
|
||||||
|
|
||||||
int PlatformUtils::setenv(const char *name, const char *value, int overwrite)
|
int PlatformUtils::setenv(const char *name, const char *value, int overwrite)
|
||||||
{
|
{
|
||||||
#if defined(WIN32)
|
#if defined(_WIN32)
|
||||||
const char *ptr = getenv(name);
|
const char *ptr = getenv(name);
|
||||||
if ((overwrite == 0) && (ptr != NULL)) {
|
if ((overwrite == 0) && (ptr != NULL)) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -135,14 +135,11 @@ void QGLView::display_opencsg_warning_dialog()
|
||||||
message += _("It is highly recommended to use OpenSCAD on a system with "
|
message += _("It is highly recommended to use OpenSCAD on a system with "
|
||||||
"OpenGL 2.0 or later.\n"
|
"OpenGL 2.0 or later.\n"
|
||||||
"Your renderer information is as follows:\n");
|
"Your renderer information is as follows:\n");
|
||||||
QString rendererinfo;
|
QString rendererinfo(_("GLEW version %1\n%2 (%3)\nOpenGL version %4\n"));
|
||||||
rendererinfo.sprintf(_("GLEW version %s\n"
|
message += rendererinfo.arg((const char *)glewGetString(GLEW_VERSION),
|
||||||
"%s (%s)\n"
|
(const char *)glGetString(GL_RENDERER),
|
||||||
"OpenGL version %s\n"),
|
(const char *)glGetString(GL_VENDOR),
|
||||||
glewGetString(GLEW_VERSION),
|
(const char *)glGetString(GL_VERSION));
|
||||||
glGetString(GL_RENDERER), glGetString(GL_VENDOR),
|
|
||||||
glGetString(GL_VERSION));
|
|
||||||
message += rendererinfo;
|
|
||||||
|
|
||||||
dialog->setText(message);
|
dialog->setText(message);
|
||||||
dialog->enableOpenCSGBox->setChecked(Preferences::inst()->getValue("advanced/enable_opencsg_opengl1x").toBool());
|
dialog->enableOpenCSGBox->setChecked(Preferences::inst()->getValue("advanced/enable_opencsg_opengl1x").toBool());
|
||||||
|
|
|
@ -24,13 +24,13 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "mathc99.h"
|
||||||
#include "function.h"
|
#include "function.h"
|
||||||
#include "expression.h"
|
#include "expression.h"
|
||||||
#include "evalcontext.h"
|
#include "evalcontext.h"
|
||||||
#include "builtin.h"
|
#include "builtin.h"
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include "mathc99.h"
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "stl-utils.h"
|
#include "stl-utils.h"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include "mathc99.h"
|
#include "mathc99.h"
|
||||||
#include "linalg.h"
|
#include "linalg.h"
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WIN32
|
||||||
typedef __int64 int64_t;
|
typedef __int64 int64_t;
|
||||||
#else
|
#else
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifdef WIN32
|
#if defined(_MSC_VER)
|
||||||
|
|
||||||
|
// only for native windows builds, not MXE
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
//for native win32 builds we need to provide C99 math functions by ourselves
|
//for native win32 builds we need to provide C99 math functions by ourselves
|
||||||
|
@ -11,6 +13,7 @@ float fmax(float a, float b);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
#define _USE_MATH_DEFINES
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include "mathc99.h"
|
||||||
#include "modcontext.h"
|
#include "modcontext.h"
|
||||||
#include "module.h"
|
#include "module.h"
|
||||||
#include "expression.h"
|
#include "expression.h"
|
||||||
|
|
Loading…
Reference in New Issue