Code Search for Developers
 
 
  

pipe.cpp from Equalizer - Multipipe Rendering at Krugle


Show pipe.cpp syntax highlighted


/* 
 * Copyright (c) 2006-2007, Stefan Eilemann <eile@equalizergraphics.com> 
 * All rights reserved.
 *
 * The pipe object is responsible for maintaining GPU-specific and
 * frame-specific data. The identifier passed by the application contains the
 * version of the frame data corresponding to the rendered frame. The pipe's
 * start frame callback synchronizes the thread-local instance of the frame data
 * to this version.
 */

#include "pipe.h"

#include "node.h"
#include <eq/eq.h>

using namespace eqBase;
using namespace std;

namespace eqPly
{
eq::WindowSystem Pipe::selectWindowSystem() const
{
    const Node*            node     = static_cast<Node*>( getNode( ));
    const InitData&        initData = node->getInitData();
    const eq::WindowSystem ws       = initData.getWindowSystem();

    if( ws == eq::WINDOW_SYSTEM_NONE )
        return eq::Pipe::selectWindowSystem();
    if( !supportsWindowSystem( ws ))
    {
        EQWARN << "Window system " << ws 
               << " not supported, using default window system" << endl;
        return eq::Pipe::selectWindowSystem();
    }

    return ws;
}

bool Pipe::configInit( const uint32_t initID )
{
    const Node*     node        = static_cast<Node*>( getNode( ));
    const InitData& initData    = node->getInitData();
    const uint32_t  frameDataID = initData.getFrameDataID();
    eq::Config*     config      = getConfig();

    const bool mapped = config->mapObject( &_frameData, frameDataID );
    EQASSERT( mapped );

    return eq::Pipe::configInit( initID );
}

bool Pipe::configExit()
{
    eq::Config* config = getConfig();
    config->unmapObject( &_frameData );

    return eq::Pipe::configExit();
}

void Pipe::frameStart( const uint32_t frameID, const uint32_t frameNumber )
{
    _frameData.sync( frameID );
    startFrame( frameNumber );
}
}




See more files for this project here

Equalizer - Multipipe Rendering

Equalizer is a programming interface and resource management system for scalable graphics applications for clusters and shared memory systems. It is build upon a scalable programming interface solving the problems common to any multipipe application.

Project homepage: http://sourceforge.net/projects/equalizer
Programming language(s): C,C++
License: lgpl21

  eqPly.app/
    Contents/
      MacOS/
      Info.plist
  Makefile
  README
  channel.cpp
  channel.h
  config.cpp
  config.h
  eqPly.cpp
  eqPly.h
  frameData.h
  initData.cpp
  initData.h
  localInitData.cpp
  localInitData.h
  logo.rgb
  main.cpp
  node.cpp
  node.h
  pipe.cpp
  pipe.h
  ply.h
  plyfile.cpp
  rockerArm.ply
  tracker.cpp
  tracker.h
  typedefs.h
  vertexBufferBase.h
  vertexBufferData.h
  vertexBufferLeaf.cpp
  vertexBufferLeaf.h
  vertexBufferNode.cpp
  vertexBufferNode.h
  vertexBufferRoot.cpp
  vertexBufferRoot.h
  vertexBufferState.h
  vertexData.cpp
  vertexData.h
  window.cpp
  window.h