28 #ifndef EQ_ADMIN_ADD_WINDOW_H
29 #define EQ_ADMIN_ADD_WINDOW_H
33 #include <eq/admin/base.h>
38 inline bool addWindow( eq::admin::ServerPtr server,
const bool passiveStereo )
44 eq::admin::Pipe* pipe = findPipe( server );
49 eq::admin::Config* config = pipe->getConfig();
50 eq::admin::Window* window =
new eq::admin::Window( pipe );
51 eq::admin::Channel* channel =
new eq::admin::Channel( window );
52 eq::admin::Canvas* canvas =
new eq::admin::Canvas( config );
53 eq::admin::Segment* segment =
new eq::admin::Segment( canvas );
54 eq::admin::Layout* layout =
new eq::admin::Layout( config );
55 eq::admin::View* view =
new eq::admin::View( layout );
56 eq::admin::Observer* observer =
new eq::admin::Observer( config );
61 channel->setName(
"Runtime-created channel" );
62 canvas->setName(
"Runtime-created canvas" );
63 layout->setName(
"Runtime-created layout" );
64 view->setName(
"Runtime-created view" );
65 observer->setName(
"Runtime-created observer" );
66 view->changeMode( eq::admin::View::MODE_STEREO );
70 window->setName(
"Passive stereo window" );
71 window->setPixelViewport(
74 view->changeMode( eq::admin::View::MODE_MONO );
77 eq::admin::Channel* channelLeft =
new eq::admin::Channel( window );
78 eq::admin::Channel* channelRight =
new eq::admin::Channel( window );
80 eq::admin::Segment* segmentLeft =
new eq::admin::Segment( canvas );
81 eq::admin::Segment* segmentRight =
new eq::admin::Segment( canvas );
85 segmentLeft->setChannel( channelLeft );
89 segmentRight->setChannel( channelRight );
91 channelLeft->setName(
"Runtime-created left eye channel" );
92 channelRight->setName(
"Runtime-created right eye channel" );
95 window->setName(
"Active stereo window" );
97 view->setObserver( observer );
99 eq::fabric::Vector3f( .4f,-.3f,-1.f ),
100 eq::fabric::Vector3f(-.4f, .3f,-1.f )));
101 segment->setChannel( channel );
102 canvas->addLayout( layout );
110 #endif // EQ_ADMIN_ADD_WINDOW_H
A fractional viewport with methods for manipulation.
A wall defining a view frustum.
Window drawable (WindowSettings::IATTR_HINT_DRAWABLE)
Window, pbuffer, FBO or OFF.
Holds a 2D pixel viewport with methods for manipulation.