Skip to content
Snippets Groups Projects
Select Git revision
  • 76d5163e7bb90751578d82c9db1e92e6bc65a49c
  • master default protected
  • feature/ita
  • develop protected
  • feature/IMAGES_WITH_OPENVR
  • feature/IMAGES_AND_VIEWPORTS
  • feature/UPDATE_LEAP_DRIVER_TO_SDK_V3
  • feature/volume_raycaster_bindless
  • feature/IntegrateNewOculusSDK
  • feature/SimpleOpenGLDraw
  • feature/LeapMotionMeasureNameFix
  • feature/observeable_sequenced_notifications
  • feature/BoundingBoxIntentionSelect
  • feature/RenamedVistaTexture
  • feature/QuadBufferPostprocessing
  • feature/conan_io_support
  • release/1.16 protected
  • release/1.15 protected
  • feature/REMOVE_PLUGIN_DLL
  • feature/COH_GRP_TRUNK_INTEGRATE
  • release/1.14 protected
  • 1.16.0
  • Before_OGLExt_CoreLibs_Integration
  • 1.14.0
  • 1.15.0
  • 1.11.0
  • 1.12.0
  • 1.13
  • 1.13.0
  • 1.10.1
  • 1.10.0
31 results

VistaFrameSeriesCapture.cpp

Blame
  • VistaFrameSeriesCapture.cpp 13.06 KiB
    /*============================================================================*/
    /*                              ViSTA VR toolkit                              */
    /*               Copyright (c) 1997-2016 RWTH Aachen University               */
    /*============================================================================*/
    /*                                  License                                   */
    /*                                                                            */
    /*  This program is free software: you can redistribute it and/or modify      */
    /*  it under the terms of the GNU Lesser General Public License as published  */
    /*  by the Free Software Foundation, either version 3 of the License, or      */
    /*  (at your option) any later version.                                       */
    /*                                                                            */
    /*  This program is distributed in the hope that it will be useful,           */
    /*  but WITHOUT ANY WARRANTY; without even the implied warranty of            */
    /*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             */
    /*  GNU Lesser General Public License for more details.                       */
    /*                                                                            */
    /*  You should have received a copy of the GNU Lesser General Public License  */
    /*  along with this program.  If not, see <http://www.gnu.org/licenses/>.     */
    /*============================================================================*/
    /*                                Contributors                                */
    /*                                                                            */
    /*============================================================================*/
    
    
    #include "VistaFrameSeriesCapture.h"
    
    #include <VistaBase/VistaTimeUtils.h>
    #include <VistaKernel/VistaSystem.h>
    #include <VistaKernel/EventManager/VistaSystemEvent.h>
    #include <VistaKernel/EventManager/VistaEventManager.h>
    #include <VistaKernel/DisplayManager/VistaDisplayManager.h>
    #include <VistaKernel/Cluster/VistaClusterMode.h>
    #include <VistaKernel/VistaFrameLoop.h>
    #include <VistaTools/VistaFileSystemDirectory.h>
    
    
    #if defined(WIN32)
    #include <windows.h>
    #include <time.h>
    #else
    #include <sys/time.h>
    #include <time.h>
    #include <unistd.h>
    #endif
    
    
    /*============================================================================*/
    /* MACROS AND DEFINES                                                         */
    /*============================================================================*/
    
    /*============================================================================*/
    /* IMPLEMENTATION                                                             */
    /*============================================================================*/
    
    VistaFrameSeriesCapture::VistaFrameSeriesCapture( VistaSystem* pSystem,
    												 VistaWindow* pWindow,
    												 const bool bAutoRegisterUnregisterAsEventHandler )
    : m_pSystem( pSystem )
    , m_pWindow( pWindow )
    , m_bAutoRegisterUnregisterAsEventHandler( bAutoRegisterUnregisterAsEventHandler )
    , m_bIsRegistered( false )
    , m_nScreenshotCount( 0 )
    , m_nPeriod( 0 )
    , m_nFrameCylce( 0 )
    , m_eCaptureMode( CM_INVALID )
    , m_nLastCaptureFrameIndex( 0 )
    , m_nLastCaptureTime( 0 )
    {
    	if( m_pWindow == NULL )
    	{