From ced0d8add9ca17a24133cd54a3c61f391f0fcfae Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 23 Apr 2013 09:52:51 +0200 Subject: [PATCH] Modified shaders' source path. --- common/drawpanel_gal.cpp | 7 +++++-- common/gal/opengl/opengl_gal.cpp | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 107e8ff543..4f028531c4 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -27,7 +27,8 @@ #include #include #include -#include +#include +#include #include #include @@ -50,7 +51,9 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_view = NULL; m_painter = NULL; - m_galShaderPath = std::string( ::wxGetCwd().mb_str() ) + "/../../gal/opengl/shader/"; + wxStandardPaths paths; + wxFileName executableFile( paths.GetExecutablePath() ); + m_galShaderPath = std::string( executableFile.GetPath() + "/../../common/gal/opengl/shader/" ); SwitchBackend( aGalType, false ); SetBackgroundStyle( wxBG_STYLE_CUSTOM ); diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index c97d5f307a..39cd64adb6 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -65,7 +65,7 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, isUseShader = isUseShaders; isShaderInitialized = false; isGroupStarted = false; - shaderPath = "../../../gal/opengl/shader/"; + shaderPath = "../../common/gal/opengl/shader/"; wxSize parentSize = aParent->GetSize(); SetSize( parentSize );