diff --git a/doc/Changelog.md b/doc/Changelog.md index 982d21441a..a72791d231 100644 --- a/doc/Changelog.md +++ b/doc/Changelog.md @@ -3,6 +3,8 @@ Changelog {#Changelog} # git master {#master} +* [473](https://github.com/Eyescale/Equalizer/pull/473) + Fix OS X OpenGL detection * [463](https://github.com/Eyescale/Equalizer/pull/463): Use program name as default window title * [463](https://github.com/Eyescale/Equalizer/pull/463): diff --git a/eq/fabric/drawableConfig.h b/eq/fabric/drawableConfig.h index e55d5a2626..2257044728 100644 --- a/eq/fabric/drawableConfig.h +++ b/eq/fabric/drawableConfig.h @@ -30,14 +30,15 @@ namespace fabric { DrawableConfig() : stencilBits(0), colorBits(0), alphaBits(0), accumBits(0) - , glVersion( 0.f ), stereo( false ), doublebuffered( false ) - , coreProfile( false ) {} + , glVersion( 0.f ), glewGLVersion( 0.f ), stereo( false ) + , doublebuffered( false ) , coreProfile( false ) {} int32_t stencilBits; //!< Number of stencil bits int32_t colorBits; //!< Number of bits per color component int32_t alphaBits; //!< Number of alpha bits int32_t accumBits; //!< Number of accumulation bits - float glVersion; //!< OpenGL version + float glVersion; //!< OpenGL version (glGetString( GL_VERSION )) + float glewGLVersion; //!< OpenGL version (GLEW detected) bool stereo; //!< Active stereo supported bool doublebuffered; //!< Doublebuffering supported bool coreProfile; //!< Core or Compat profile (since OpenGL 3.2) @@ -46,7 +47,7 @@ namespace fabric inline std::ostream& operator << ( std::ostream& os, const DrawableConfig& config ) { - os << "GL" << config.glVersion; + os << "GL" << config.glVersion << "|GLEW" << config.glewGLVersion; if( config.glVersion >= 3.2f ) os << (config.coreProfile ? "|Core" : "|Compat"); os << "|rgb" << config.colorBits; @@ -77,4 +78,3 @@ template<> inline void byteswap( eq::fabric::DrawableConfig& value ) } } #endif // EQ_DRAWABLECONFIG_H - diff --git a/eq/glWindow.cpp b/eq/glWindow.cpp index 4c26e46b1a..a335abad7e 100644 --- a/eq/glWindow.cpp +++ b/eq/glWindow.cpp @@ -103,7 +103,7 @@ void GLWindow::initGLEW() if( _impl->glewInitialized ) return; -#ifndef _MSC_VER +#ifdef __linux__ // http://sourceforge.net/p/glew/patches/40/ glewExperimental = true; #endif @@ -254,6 +254,10 @@ void GLWindow::finish() glFinish(); } +#define TEST_GLEW_VERSION( MAJOR, MINOR ) \ + if( GLEW_VERSION_ ## MAJOR ## _ ## MINOR ) \ + drawableConfig.glewGLVersion = MAJOR ## . ## MINOR ## f; \ + void GLWindow::queryDrawableConfig( DrawableConfig& drawableConfig ) { // GL version @@ -274,6 +278,26 @@ void GLWindow::queryDrawableConfig( DrawableConfig& drawableConfig ) drawableConfig.coreProfile = mask & GL_CONTEXT_CORE_PROFILE_BIT; } + TEST_GLEW_VERSION( 1, 1 ); + TEST_GLEW_VERSION( 1, 2 ); + TEST_GLEW_VERSION( 1, 3 ); + TEST_GLEW_VERSION( 1, 4 ); + TEST_GLEW_VERSION( 1, 5 ); + TEST_GLEW_VERSION( 2, 0 ); + TEST_GLEW_VERSION( 2, 1 ); + TEST_GLEW_VERSION( 3, 0 ); + TEST_GLEW_VERSION( 3, 1 ); + TEST_GLEW_VERSION( 3, 2 ); + TEST_GLEW_VERSION( 3, 3 ); + TEST_GLEW_VERSION( 4, 0 ); + TEST_GLEW_VERSION( 4, 1 ); + TEST_GLEW_VERSION( 4, 2 ); + TEST_GLEW_VERSION( 4, 3 ); +#ifdef GLEW_VERSION_4_5 + TEST_GLEW_VERSION( 4, 4 ); + TEST_GLEW_VERSION( 4, 5 ); +#endif + // Framebuffer capabilities GLboolean result; EQ_GL_CALL( glGetBooleanv( GL_STEREO, &result )); diff --git a/examples/configs/4-window.all.eqc b/examples/configs/4-window.all.eqc index c6ad2d9c94..b8580af864 100644 --- a/examples/configs/4-window.all.eqc +++ b/examples/configs/4-window.all.eqc @@ -149,6 +149,21 @@ server } } layout + { + name "DB_Active" + view + { + observer 0 + viewport [ 0 .5 .5 .5 ] + wall + { + bottom_left [ -.5 -.5 -1 ] + bottom_right [ .5 -.5 -1 ] + top_left [ -.5 .5 -1 ] + } + } + } + layout { name "Eye" view @@ -316,6 +331,7 @@ server layout "DB_Stream" layout "DB_DirectSend" layout "DB_BinarySwap" + layout "DB_Active" layout "MultiLevel" layout "DFR" @@ -872,6 +888,21 @@ server inputframe { name "frame.channel4" } } + compound + { + channel ( segment 0 layout "DB_Active" view 0 ) + buffer [ COLOR DEPTH ] + + load_equalizer{ mode DB } + compound {} + compound { channel "channel2" outputframe {} } + compound { channel "channel3" outputframe {} } + compound { channel "channel4" outputframe {} } + inputframe { name "frame.channel2" } + inputframe { name "frame.channel3" } + inputframe { name "frame.channel4" } + } + # wall with cross-segment load-balancing compound {