examples/eqPixelBench/config.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "config.h"
00019 #include "configEvent.h"
00020
00021 using namespace std;
00022
00023 namespace eqPixelBench
00024 {
00025 Config::Config( eq::base::RefPtr< eq::Server > parent )
00026 : eq::Config( parent )
00027 , _clock(0)
00028 {
00029 }
00030
00031 Config::~Config()
00032 {
00033 delete _clock;
00034 _clock = 0;
00035 }
00036
00037 uint32_t Config::startFrame( const uint32_t frameID )
00038 {
00039 if( !_clock )
00040 _clock = new eq::base::Clock;
00041
00042 _clock->reset();
00043 return eq::Config::startFrame( frameID );
00044 }
00045
00046 bool Config::handleEvent( const eq::ConfigEvent* event )
00047 {
00048 switch( event->data.type )
00049 {
00050 case ConfigEvent::READBACK:
00051 case ConfigEvent::READBACK_PBO:
00052 case ConfigEvent::ASSEMBLE:
00053 case ConfigEvent::START_LATENCY:
00054 cout << static_cast< const ConfigEvent* >( event ) << endl;
00055 return true;
00056
00057 default:
00058 return eq::Config::handleEvent( event );
00059 }
00060 }
00061 }