examples/eqNBody/node.cpp

00001 /*
00002  * Copyright (c) 2009, Philippe Robert <probert@eyescale.ch> 
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00016  */
00017 
00018 #include "node.h"
00019 
00020 #include "client.h"
00021 #include "initData.h"
00022 #include "config.h"
00023 
00024 using namespace eq::base;
00025 using namespace std;
00026 
00027 namespace eqNbody
00028 {
00029     bool Node::configInit( const uint32_t initID )
00030     {
00031         if( !eq::Node::configInit( initID ))
00032             return false;
00033         
00034         // All render data is static or multi-buffered, we can run asynchronously
00035         if( getIAttribute( IATTR_THREAD_MODEL ) == eq::UNDEFINED ) {
00036             setIAttribute( IATTR_THREAD_MODEL, eq::ASYNC );
00037         }
00038         
00039         Config* config = static_cast< Config* >( getConfig( ));
00040         config->mapData( initID );
00041 
00042         return true;
00043     }
00044     
00045     bool Node::configExit()
00046     {
00047         Config* config = static_cast< Config* >( getConfig( ));
00048         config->unmapData();
00049         
00050         return eq::Node::configExit();
00051     }
00052     
00053 }
Generated on Mon Aug 10 18:58:40 2009 for Equalizer 0.9 by  doxygen 1.5.8