Skip to content

Commit 2d41f8e

Browse files
committed
refactor gl version defines
1 parent 2b24a84 commit 2d41f8e

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

src/objects/gui/moTimeline.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,8 @@ void moTimeline::customReset(){
113113
void moTimeline::setupObjectContent(shared_ptr<ofAppGLFWWindow> &mainWindow){
114114

115115
ofGLFWWindowSettings settings;
116-
#if defined(MO_GL_VERSION_MAJOR)
117-
settings.setGLVersion(4,1);
118-
#elif defined(MO_GL_VERSION_MINOR)
119-
settings.setGLVersion(3,2);
116+
#if defined(OFXVP_GL_VERSION_MAJOR) && defined(OFXVP_GL_VERSION_MINOR)
117+
settings.setGLVersion(OFXVP_GL_VERSION_MAJOR,OFXVP_GL_VERSION_MINOR);
120118
#else
121119
settings.setGLVersion(3,2);
122120
#endif

src/objects/windowing/OutputWindow.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,8 @@ void OutputWindow::setupObjectContent(shared_ptr<ofAppGLFWWindow> &mainWindow){
117117
loadWindowSettings();
118118

119119
ofGLFWWindowSettings settings;
120-
#if defined(MO_GL_VERSION_MAJOR)
121-
settings.setGLVersion(4,1);
122-
#elif defined(MO_GL_VERSION_MINOR)
123-
settings.setGLVersion(3,2);
120+
#if defined(OFXVP_GL_VERSION_MAJOR) && defined(OFXVP_GL_VERSION_MINOR)
121+
settings.setGLVersion(OFXVP_GL_VERSION_MAJOR,OFXVP_GL_VERSION_MINOR);
124122
#else
125123
settings.setGLVersion(3,2);
126124
#endif

src/objects/windowing/ProjectionMapping.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,8 @@ void ProjectionMapping::setupObjectContent(shared_ptr<ofAppGLFWWindow> &mainWind
9191
fileDialog.setIsRetina(this->isRetina);
9292

9393
ofGLFWWindowSettings settings;
94-
#if defined(MO_GL_VERSION_MAJOR)
95-
settings.setGLVersion(4,1);
96-
#elif defined(MO_GL_VERSION_MINOR)
97-
settings.setGLVersion(3,2);
94+
#if defined(OFXVP_GL_VERSION_MAJOR) && defined(OFXVP_GL_VERSION_MINOR)
95+
settings.setGLVersion(OFXVP_GL_VERSION_MAJOR,OFXVP_GL_VERSION_MINOR);
9896
#else
9997
settings.setGLVersion(3,2);
10098
#endif

src/ofxVPConfig.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
#define MOD_KEY OF_KEY_CONTROL
4545
#endif
4646

47+
#define OFXVP_GL_VERSION_MAJOR 4
48+
#define OFXVP_GL_VERSION_MINOR 1
49+
4750
#define OUTPUT_TEX_MAX_WIDTH 4800
4851
#define OUTPUT_TEX_MAX_HEIGHT 4800
4952

0 commit comments

Comments
 (0)