diff options
| author | Stefan Eilemann <eilemann@gmail.com> | 2012-02-23 17:25:27 +0100 |
|---|---|---|
| committer | Stefan Eilemann <eilemann@gmail.com> | 2012-02-23 17:25:27 +0100 |
| commit | 7043fe4235eabd29a89195288fe3b80e7f5ea199 (patch) | |
| tree | 910db985e77a846774f9cb55d4cc5efacaa7bcb2 | |
| parent | dd068a9758610b59306357c64cfa921ade9fa2ac (diff) | |
| download | bino-7043fe4235eabd29a89195288fe3b80e7f5ea199.tar.gz | |
Fix swap synchronization in Equalizer mode: The master player alternatingly produces "prep_frame" and "display_frame" signals, each one causing an eq::Config frame. Since the config frames are swaplocked, the maximum video framerate is then half of the display refresh. Fix by only swapping buffers when "display_frame" is set. This causes still too many eq frames to be rendered, but they can be rendered faster than the display refresh rate
| -rw-r--r-- | src/player_equalizer.cpp | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/player_equalizer.cpp b/src/player_equalizer.cpp index 68129ea..2d76ee6 100644 --- a/src/player_equalizer.cpp +++ b/src/player_equalizer.cpp @@ -966,13 +966,6 @@ public: } protected: - virtual bool configInit(const eq::uint128_t &init_id) - { - // https://github.com/Eyescale/Equalizer/issues/81 - if( getIAttribute( IATTR_HINT_SWAPSYNC ) != eq::ON ) - setIAttribute( IATTR_HINT_SWAPSYNC, eq::OFF ); - return eq::Window::configInit( init_id ); - } virtual bool configInitGL(const eq::uint128_t &init_id) { @@ -1001,6 +994,13 @@ protected: msg::dbg(HERE); return eq::Window::configExitGL(); } + + virtual void swapBuffers() + { + eq_node *node = static_cast<eq_node *>(getNode()); + if (node->frame_data.display_frame) + eq::Window::swapBuffers(); + } }; /* @@ -1078,12 +1078,6 @@ protected: glGetIntegerv(GL_VIEWPORT, viewport); _video_output.display_current_frame(mono_right_instead_of_left, quad_x, quad_y, quad_w, quad_h, viewport, node->frame_data.tex_coords); - - // Statistics Overlay - if (node->frame_data.display_statistics) - { - drawStatistics(); - } } virtual void frameStart(const eq::uint128_t &, const uint32_t frame_number) @@ -1109,9 +1103,12 @@ protected: startFrame(frame_number); } - virtual void frameFinish(const eq::uint128_t &, const uint32_t frame_number) + void frameViewFinish( const eq::uint128_t& id ) { - releaseFrame(frame_number); + eq_node *node = static_cast<eq_node *>(getNode()); + if (node->frame_data.display_statistics) + drawStatistics(); + eq::Channel::frameViewFinish( id ); } }; |
