Skip to content

Instantly share code, notes, and snippets.

View metacollin's full-sized avatar

metacollin metacollin

View GitHub Profile
@metacollin
metacollin / note.md
Last active July 2, 2016 02:22
clang and openmp in Mac OS X

Refer to https://clang-omp.github.io/ .

We need to install something:

brew install libiomp
brew install clang-omp

Then we need to set the environment:

diff -rup wxWidgets-3.1-6.0/include/wx/glcanvas.h wxWidgets-3.1-7.0/include/wx/glcanvas.h
--- wxWidgets-3.1-6.0/include/wx/glcanvas.h 2016-02-28 14:33:37.000000000 -0700
+++ wxWidgets-3.1-7.0/include/wx/glcanvas.h 2016-05-13 08:09:54.000000000 -0600
@@ -19,6 +19,8 @@
#include "wx/palette.h"
#include "wx/window.h"
+#define RETINA_OPENGL_PATCH
+
class WXDLLIMPEXP_FWD_GL wxGLCanvas;
diff -rupN include/wx/glcanvas.h include/wx/glcanvas.h
--- include/wx/glcanvas.h 2015-05-21 00:36:27.406145182 +0200
+++ include/wx/glcanvas.h 2015-05-21 00:37:59.169474782 +0200
@@ -19,6 +19,8 @@
#include "wx/palette.h"
#include "wx/window.h"
+#define RETINA_OPENGL_PATCH
+
class WXDLLIMPEXP_FWD_GL wxGLCanvas;
diff -ruN wxWidgets-3.1-2.0/Makefile.in wxWidgets-3.1-1.0/Makefile.in
--- wxWidgets-3.1-2.0/Makefile.in 2016-02-28 14:33:37.000000000 -0700
+++ wxWidgets-3.1-1.0/Makefile.in 2016-04-20 17:34:41.000000000 -0600
@@ -13220,7 +13220,7 @@
monodll_carbon_frame.o \
monodll_carbon_mdi.o \
monodll_carbon_metafile.o \
- monodll_carbon_overlay.o \
+ monodll_osx_cocoa_overlay.o \
monodll_carbon_popupwin.o \
diff -ru wxWidgets-3.1.0/configure wxWidgets-3.10mod/configure
--- wxWidgets-3.1.0/configure 2016-02-28 14:33:37.000000000 -0700
+++ wxWidgets-3.10mod/configure 2016-03-04 23:50:09.000000000 -0700
@@ -28199,7 +28199,7 @@
*-*-darwin* )
install_name_tool=`which ${HOST_PREFIX}install_name_tool`
if test "$install_name_tool" -a -x "$install_name_tool"; then
- DYLIB_RPATH_POSTLINK="${HOST_PREFIX}install_name_tool -id \$@ \$@"
+ DYLIB_RPATH_POSTLINK=""
cat <<EOF >change-install-names
- !ruby/struct:QFN
name: QFN12
size_x: 3.0
size_y: 3.0
pad_width: 0.25
pitch: 0.5
pads_tb: 3
pads_lr: 3
expad_x: 1.65
expad_y: 1.65
diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp
index 73c71fb..d618ef6 100644
--- a/common/gal/opengl/opengl_gal.cpp
+++ b/common/gal/opengl/opengl_gal.cpp
@@ -163,7 +163,10 @@ void OPENGL_GAL::BeginDrawing()
// Enable the depth buffer
glEnable( GL_DEPTH_TEST );
glDepthFunc( GL_LESS );
-
+ glEnable( GL_LINE_SMOOTH );
@metacollin
metacollin / wx.patch
Last active September 26, 2015 11:15
I love kittens!
diff --git a/gr-wxgui/CMakeLists.txt b/gr-wxgui/CMakeLists.txt
index 0006160..67228b2 100644
--- a/gr-wxgui/CMakeLists.txt
+++ b/gr-wxgui/CMakeLists.txt
@@ -23,7 +23,7 @@
include(GrBoost)
include(GrPython)
-GR_PYTHON_CHECK_MODULE("wx >= 2.8" wx "wx.version().split()[0] >= '2.8'" WX_FOUND)
+GR_PYTHON_CHECK_MODULE("wx >= 2.8" wxversion "wxversion.select(\"3.0.2.0\")" WX_FOUND)
diff --git a/cmake/Modules/GrPython.cmake b/cmake/Modules/GrPython.cmake
index 791114e..b2297f5 100644
--- a/cmake/Modules/GrPython.cmake
+++ b/cmake/Modules/GrPython.cmake
@@ -74,7 +74,7 @@ macro(GR_PYTHON_CHECK_MODULE desc mod cmd have)
message(STATUS "")
message(STATUS "Python checking for ${desc}")
execute_process(
- COMMAND ${PYTHON_EXECUTABLE} -c "
+ COMMAND ${PYTHON_EXECUTABLE} -c "import wxversion; wxversion.select(\"3.0.2.0\");
diff -ruN wxPython-src-3.0.2.0/Makefile.in wxPython-src-3.0.2-1.0/Makefile.in
--- wxPython-src-3.0.2.0/Makefile.in 2014-10-08 10:51:06.000000000 -0600
+++ wxPython-src-3.0.2-1.0/Makefile.in 2015-05-20 18:54:34.000000000 -0600
@@ -14645,7 +14645,7 @@
monodll_carbon_frame.o \
monodll_carbon_mdi.o \
monodll_carbon_metafile.o \
- monodll_carbon_overlay.o \
+ monodll_osx_cocoa_overlay.o \
monodll_carbon_popupwin.o \