编译了一下Equalizer 1.6版本 ,还挺好用,不过它的OpenGL渲染环境和窗口需要自己管理,这个有点不爽,这样让Equalizer嵌入其他基于OpenGL的程序有点麻烦。
在同一台电脑 开启分布式渲染 方法:
修改配置文件 2-node.eqc 如下内容:
#Equalizer 1.2 ascii
# two-node software-framelocked config
global
{
EQ_WINDOW_IATTR_HINT_FULLSCREEN OFF
}
server
{
connection { hostname "127.0.0.1" port 4241}
config
{
appNode
{
connection { hostname "127.0.0.1" port 4242}
pipe
{
device 0
window
{
viewport [ .25 .25 .5 .5 ]
channel { name "channel1" }
}
}
}
node
{
connection { hostname "127.0.0.1" port 4243}
pipe
{
device 0
window
{
viewport [ .25 .25 .5 .5 ]
channel { name "channel2" }
}
}
}
layout { view { }}
canvas
{
layout 0
wall
{
bottom_left [ -1.6 -.5 -1 ]
bottom_right [ 1.6 -.5 -1 ]
top_left [ -1.6 .5 -1 ]
}
swapbarrier {}
segment { viewport [ 0 0 .5 1 ] channel "channel1" }
segment { viewport [ .5 0 .5 1 ] channel "channel2" }
}
}
}
其中appNode 是应用程序节点,可以有渲染窗口,也可以没有。node 节点为渲染节点(也就是被动节点,其渲染循环由appNode 带动)
node 节点在 启动时要加 --eq-client
OK 启动步骤:
1. 启动服务器: eqserver 2-node.eqc
2. 启动node 节点(对应上面的ip) osgScaleViewer.exe --eq-server 127.0.0.1:4241 --eq-listen 127.0.0.1:4243 --eq-client
3. 启动appNode 节点 (和配置文件对应) osgScaleViewer.exe --eq-server 127.0.0.1:4241 --eq-listen 127.0.0.1:4242