#include <pipe.h>


Classes | |
| class | PipeThread |
| The pipe thread. | |
Public Member Functions | |
| Pipe (Node *parent) | |
| Constructs a new pipe. | |
| virtual | ~Pipe () |
| Destructs the pipe. | |
| void | waitExited () const |
| Wait for the pipe to be exited. | |
| bool | isRunning () const |
| void | waitFrameFinished (const uint32_t frameNumber) const |
| Wait for a frame to be finished. | |
| void | waitFrameLocal (const uint32_t frameNumber) const |
| Wait for a frame to be released locally. | |
| void | startThread () |
| Start the pipe thread. | |
| void | joinThread () |
| Wait for the pipe thread to exit. | |
Data Access. | |
| net::CommandQueue * | getPipeThreadQueue () |
| Node * | getNode () |
| const Node * | getNode () const |
| Config * | getConfig () |
| const Config * | getConfig () const |
| ClientPtr | getClient () |
| ServerPtr | getServer () |
| const WindowVector & | getWindows () const |
| const std::string & | getName () const |
| uint32_t | getTasks () const |
| Return the set of tasks this pipe's channels might execute in the worst case. | |
| bool | isThreaded () const |
| uint32_t | getCurrentFrame () const |
| uint32_t | getFinishedFrame () const |
| VisitorResult | accept (PipeVisitor &visitor) |
| Traverse this pipe and all children using a pipe visitor. | |
| void | setPixelViewport (const eq::PixelViewport &pvp) |
| Set the pipes's pixel viewport. | |
| const PixelViewport & | getPixelViewport () const |
| uint32_t | getPort () const |
| Returns the port number of this pipe. | |
| uint32_t | getDevice () const |
| Returns the device number of this pipe. | |
| WindowSystem | getWindowSystem () const |
| Return the window system used by this pipe. | |
| int64_t | getFrameTime () const |
| WGLEWContext * | wglewGetContext () |
Operations | |
| Frame * | getFrame (const net::ObjectVersion &frameVersion, const Eye eye) |
| Get an assembly frame. | |
| void | flushFrames () |
| bool | isCurrent (const Window *window) const |
| void | setCurrent (const Window *window) const |
| Set the window as current window. | |
| View * | getView (const net::ObjectVersion &viewVersion) |
Interface to and from the OSPipe, the window-system specific | |
pieces for a pipe. | |
| void | setOSPipe (OSPipe *pipe) |
| Set the OS-specific pipe. | |
| const OSPipe * | getOSPipe () const |
| OSPipe * | getOSPipe () |
Error information. | |
| void | setErrorMessage (const std::string &message) |
| Set a message why the last operation failed. | |
Protected Member Functions | |
| virtual void | attachToSession (const uint32_t id, const uint32_t instanceID, net::Session *session) |
Actions | |
| void | startFrame (const uint32_t frameNumber) |
| Start a frame by unlocking all child resources. | |
| void | releaseFrame (const uint32_t frameNumber) |
| Signal the completion of a frame to the parent. | |
| void | releaseFrameLocal (const uint32_t frameNumber) |
| Release the local synchronization of the parent for a frame. | |
Callbacks | |
The callbacks are called by Equalizer during rendering to execute various actions. | |
| virtual bool | supportsWindowSystem (const WindowSystem system) const |
| Tests wether a particular windowing system is supported by this pipe and all its windows. | |
| virtual WindowSystem | selectWindowSystem () const |
| Return the window system to be used by this pipe. | |
| virtual bool | configInit (const uint32_t initID) |
| Initialises this pipe. | |
| virtual bool | configExit () |
| Exit this pipe. | |
| virtual void | frameStart (const uint32_t frameID, const uint32_t frameNumber) |
| Start rendering a frame. | |
| virtual void | frameFinish (const uint32_t frameID, const uint32_t frameNumber) |
| Finish rendering a frame. | |
| virtual void | frameDrawFinish (const uint32_t frameID, const uint32_t frameNumber) |
| Finish drawing. | |
Configuration. | |
| virtual bool | useMessagePump () |
| Enable or disable automatic or external OS event dispatch for the pipe thread. | |
Friends | |
| class | Node |
| class | Window |
All Pipe, Window and Channel task methods are executed in a separate eq::base::Thread, in parallel with all other pipes in the system, unless the pipe is non-threaded, in which case the tasks are executed on the Node's main thread.
Definition at line 55 of file lib/client/pipe.h.
| eq::Pipe::Pipe | ( | Node * | parent | ) |
Constructs a new pipe.
Reimplemented in eqPly::Pipe.
Definition at line 60 of file lib/client/pipe.cpp.
References eq::Node::_addPipe(), and EQINFO.

| eq::Pipe::~Pipe | ( | ) | [virtual] |
Destructs the pipe.
Reimplemented in eqPly::Pipe.
Definition at line 79 of file lib/client/pipe.cpp.
References eq::Node::_removePipe().

| uint32_t eq::Pipe::getTasks | ( | ) | const [inline] |
Return the set of tasks this pipe's channels might execute in the worst case.
It is not guaranteed that all the tasks will be actually executed during rendering.
Definition at line 90 of file lib/client/pipe.h.
Referenced by eq::Node::frameDrawFinish(), and eq::Node::frameTasksFinish().

| VisitorResult eq::Pipe::accept | ( | PipeVisitor & | visitor | ) |
Traverse this pipe and all children using a pipe visitor.
| visitor | the visitor. |
Definition at line 114 of file lib/client/pipe.cpp.
References eq::Window::accept(), eq::TRAVERSE_CONTINUE, eq::TRAVERSE_PRUNE, eq::TRAVERSE_TERMINATE, eq::PipeVisitor::visitPost(), and eq::PipeVisitor::visitPre().
Referenced by eq::Node::accept().


| void eq::Pipe::setPixelViewport | ( | const eq::PixelViewport & | pvp | ) | [inline] |
Set the pipes's pixel viewport.
Used from _osPipe calls
| pvp | the viewport in pixels. |
Definition at line 111 of file lib/client/pipe.h.
Referenced by eq::WGLPipe::configExit(), and eq::WGLPipe::configInit().

| const PixelViewport& eq::Pipe::getPixelViewport | ( | ) | const [inline] |
Definition at line 116 of file lib/client/pipe.h.
Referenced by eq::WGLPipe::configInit(), and eq::AGLWindow::configInitAGLFullscreen().

| uint32_t eq::Pipe::getPort | ( | ) | const [inline] |
Returns the port number of this pipe.
The port number identifies the X server for systems using the X11/GLX window system. It currently has no meaning on other systems.
EQ_UNDEFINED_UINT32. Definition at line 127 of file lib/client/pipe.h.
| uint32_t eq::Pipe::getDevice | ( | ) | const [inline] |
Returns the device number of this pipe.
The device number identifies the X screen for systems using the X11/GLX window system, or the number of the virtual screen for the AGL window system. On Windows systems it identifies the graphics adapter. Normally the device identifies a GPU.
EQ_UNDEFINED_UINT32. Definition at line 140 of file lib/client/pipe.h.
Referenced by eq::GLXPipe::configInit(), eq::AGLPipe::configInit(), and eq::WGLPipe::createWGLDisplayDC().

| WindowSystem eq::Pipe::getWindowSystem | ( | ) | const [inline] |
Return the window system used by this pipe.
The return value is quaranteed to be constant for an initialized pipe, that is, the window system is determined using selectWindowSystem() before the pipe init method is executed.
Definition at line 151 of file lib/client/pipe.h.
Referenced by eq::Window::configInitOSWindow().

| int64_t eq::Pipe::getFrameTime | ( | ) | const |
Definition at line 109 of file lib/client/pipe.cpp.
References eq::Config::getTime().

| WGLEWContext * eq::Pipe::wglewGetContext | ( | ) |
Definition at line 450 of file lib/client/pipe.cpp.
References eq::OSPipe::wglewGetContext().
Referenced by eq::Window::wglewGetContext().


| Frame * eq::Pipe::getFrame | ( | const net::ObjectVersion & | frameVersion, | |
| const Eye | eye | |||
| ) |
Get an assembly frame.
| frameVersion | the frame's identifier and version. | |
| eye | the current eye pass. |
For internal use only.
Definition at line 307 of file lib/client/pipe.cpp.
References eq::Frame::getDataVersion(), eq::Node::getFrameData(), eq::net::Object::getSession(), eq::net::ObjectVersion::id, eq::net::Session::mapObject(), eq::Frame::setData(), eq::net::Object::sync(), and eq::net::ObjectVersion::version.

| void eq::Pipe::flushFrames | ( | ) |
For internal use only.
Clear the frame cache and delete all frames.
Definition at line 331 of file lib/client/pipe.cpp.
References eq::Frame::flush(), eq::net::Object::getSession(), and eq::net::Session::unmapObject().

| bool eq::Pipe::isCurrent | ( | const Window * | window | ) | const |
Definition at line 414 of file lib/client/pipe.cpp.
Referenced by eq::Window::configExitOSWindow(), eq::Window::makeCurrent(), and eq::Window::~Window().

| void eq::Pipe::setCurrent | ( | const Window * | window | ) | const |
Set the window as current window.
Definition at line 421 of file lib/client/pipe.cpp.
Referenced by eq::Window::configExitOSWindow(), eq::OSWindow::makeCurrent(), and eq::Window::~Window().

| View * eq::Pipe::getView | ( | const net::ObjectVersion & | viewVersion | ) |
For internal use only.
Definition at line 346 of file lib/client/pipe.cpp.
References eq::View::_pipe, eq::NodeFactory::createView(), eq::Global::getNodeFactory(), eq::net::Object::getSession(), eq::net::ObjectVersion::id, eq::net::Session::mapObject(), eq::net::Object::sync(), and eq::net::ObjectVersion::version.
Referenced by eq::Channel::getNativeView(), and eq::Channel::getView().


| void eq::Pipe::waitExited | ( | ) | const |
Wait for the pipe to be exited.
Definition at line 455 of file lib/client/pipe.cpp.
References eq::base::Monitor< T >::waitEQ().

| void eq::Pipe::waitFrameFinished | ( | const uint32_t | frameNumber | ) | const |
Wait for a frame to be finished.
| frameNumber | the frame number. |
Definition at line 465 of file lib/client/pipe.cpp.
References eq::base::Monitor< T >::waitGE().

| void eq::Pipe::waitFrameLocal | ( | const uint32_t | frameNumber | ) | const |
Wait for a frame to be released locally.
| frameNumber | the frame number. |
Definition at line 470 of file lib/client/pipe.cpp.
References eq::base::Monitor< T >::waitGE().
Referenced by eq::Node::frameDrawFinish(), and eq::Node::frameTasksFinish().


| void eq::Pipe::startThread | ( | ) |
| void eq::Pipe::joinThread | ( | ) |
| void eq::Pipe::setOSPipe | ( | OSPipe * | pipe | ) | [inline] |
Set the OS-specific pipe.
The OS-specific pipe implements the window-system-dependent part. The os-specific pipe has to be initialized.
Definition at line 225 of file lib/client/pipe.h.
Referenced by configInit().

| void eq::Pipe::setErrorMessage | ( | const std::string & | message | ) | [inline] |
Set a message why the last operation failed.
The message will be transmitted to the originator of the request, for example to Config::init when set from within the configInit method.
| message | the error message. |
Definition at line 242 of file lib/client/pipe.h.
Referenced by configInit(), and eq::WGLPipe::createWGLDisplayDC().

| void eq::Pipe::startFrame | ( | const uint32_t | frameNumber | ) | [protected] |
Start a frame by unlocking all child resources.
| frameNumber | the frame to start. |
Definition at line 620 of file lib/client/pipe.cpp.
References EQLOG, and eq::LOG_TASKS.
Referenced by frameStart().

| void eq::Pipe::releaseFrame | ( | const uint32_t | frameNumber | ) | [protected] |
Signal the completion of a frame to the parent.
| frameNumber | the frame to end. |
Definition at line 627 of file lib/client/pipe.cpp.
References EQLOG, and eq::LOG_TASKS.
Referenced by frameFinish().

| void eq::Pipe::releaseFrameLocal | ( | const uint32_t | frameNumber | ) | [protected] |
Release the local synchronization of the parent for a frame.
The synchronization is released only for this frame, not for previous, possible yet unreleased frames.
The synchronization is released only for this frame, not for previous, possible yet unreleased frames.
| frameNumber | the frame to release. |
Definition at line 634 of file lib/client/pipe.cpp.
References EQLOG, eq::base::Monitor< T >::get(), and eq::LOG_TASKS.
Referenced by frameDrawFinish(), frameFinish(), and frameStart().


| bool eq::Pipe::supportsWindowSystem | ( | const WindowSystem | system | ) | const [protected, virtual] |
Tests wether a particular windowing system is supported by this pipe and all its windows.
| system | the window system to test. |
true if the window system is supported, false if not. Definition at line 207 of file lib/client/pipe.cpp.
References eq::WINDOW_SYSTEM_AGL, eq::WINDOW_SYSTEM_GLX, and eq::WINDOW_SYSTEM_WGL.
Referenced by eqPly::Pipe::selectWindowSystem(), and selectWindowSystem().

| WindowSystem eq::Pipe::selectWindowSystem | ( | ) | const [protected, virtual] |
Return the window system to be used by this pipe.
This function determines which of the supported windowing systems is used by this pipe instance.
Reimplemented in eqPly::Pipe.
Definition at line 224 of file lib/client/pipe.cpp.
References supportsWindowSystem().

| bool eq::Pipe::configInit | ( | const uint32_t | initID | ) | [protected, virtual] |
Initialises this pipe.
| initID | the init identifier. |
Reimplemented in eqPly::Pipe.
Definition at line 484 of file lib/client/pipe.cpp.
References eq::OSPipe::configInit(), EQERROR, EQINFO, eq::OSPipe::getErrorMessage(), setErrorMessage(), setOSPipe(), eq::WINDOW_SYSTEM_AGL, eq::WINDOW_SYSTEM_GLX, and eq::WINDOW_SYSTEM_WGL.
Referenced by eqPly::Pipe::configInit().


| void eq::Pipe::frameStart | ( | const uint32_t | frameID, | |
| const uint32_t | frameNumber | |||
| ) | [protected, virtual] |
Start rendering a frame.
Called once at the beginning of each frame, to do per-frame updates of pipe-specific data, for example updating the rendering engine. Waits for the node to start the frame, unless the thread model is async. If the thread model is async, the local synchronization is released immediately.
This method has to call startFrame().
| frameID | the per-frame identifier. | |
| frameNumber | the frame to start. |
Reimplemented in eqPly::Pipe.
Definition at line 554 of file lib/client/pipe.cpp.
References eq::ASYNC, eq::DRAW_SYNC, eq::Node::getIAttribute(), eq::Node::IATTR_THREAD_MODEL, eq::LOCAL_SYNC, releaseFrameLocal(), startFrame(), and eq::Node::waitFrameStarted().

| void eq::Pipe::frameFinish | ( | const uint32_t | frameID, | |
| const uint32_t | frameNumber | |||
| ) | [protected, virtual] |
Finish rendering a frame.
Called once at the end of each frame, to do per-frame updates of pipe-specific data, for example updating the rendering engine. Releases the local synchronization if the thread model is local_sync. Always releases the global synchronization for this pipe.
This method has to call releaseFrame().
| frameID | the per-frame identifier. | |
| frameNumber | the frame to finish. |
Definition at line 597 of file lib/client/pipe.cpp.
References eq::ASYNC, eq::DRAW_SYNC, eq::Node::getIAttribute(), eq::Node::IATTR_THREAD_MODEL, eq::LOCAL_SYNC, releaseFrame(), and releaseFrameLocal().

| void eq::Pipe::frameDrawFinish | ( | const uint32_t | frameID, | |
| const uint32_t | frameNumber | |||
| ) | [protected, virtual] |
Finish drawing.
Called once per frame after the last draw operation. Releases the local synchronization if the thread model is draw_sync (the default).
| frameID | the per-frame identifier. | |
| frameNumber | the frame to finished with draw. |
Definition at line 577 of file lib/client/pipe.cpp.
References eq::ASYNC, eq::DRAW_SYNC, eq::Node::getIAttribute(), eq::Node::IATTR_THREAD_MODEL, eq::LOCAL_SYNC, and releaseFrameLocal().

| virtual bool eq::Pipe::useMessagePump | ( | ) | [inline, protected, virtual] |
Enable or disable automatic or external OS event dispatch for the pipe thread.
Definition at line 375 of file lib/client/pipe.h.
| void eq::Pipe::attachToSession | ( | const uint32_t | id, | |
| const uint32_t | instanceID, | |||
| net::Session * | session | |||
| ) | [protected, virtual] |
Reimplemented from eq::net::Object.
Definition at line 155 of file lib/client/pipe.cpp.
References eq::net::Dispatcher::registerCommand().

0.9 by
1.5.8