Refactored the support for stereo and keystone RTT setup so that it can be applied to an existing Camera.
This commit is contained in:
@@ -289,8 +289,7 @@ class OSGVIEWER_EXPORT View : public osg::View, public osgGA::GUIActionAdapter
|
||||
osg::Camera* assignRenderToTextureCamera(osg::GraphicsContext* gc, int width, int height, osg::Texture* texture);
|
||||
osg::Camera* assignKeystoneDistortionCamera(osg::DisplaySettings* ds, osg::GraphicsContext* gc, int x, int y, int width, int height, GLenum buffer, osg::Texture* texture, Keystone* keystone);
|
||||
osg::Camera* assignStereoCamera(osg::DisplaySettings* ds, osg::GraphicsContext* gc, int x, int y, int width, int height, GLenum buffer, double eyeScale);
|
||||
void setUpViewForStereo();
|
||||
void setUpViewForKeystone(Keystone* keystone);
|
||||
void assignStereoOrKeystoneToCamera(osg::Camera* camera, osg::DisplaySettings* ds);
|
||||
|
||||
struct StereoSlaveCallback : public osg::View::Slave::UpdateSlaveCallback
|
||||
{
|
||||
|
||||
@@ -23,9 +23,9 @@ class OSGVIEWER_EXPORT SingleWindow : public ViewConfig
|
||||
{
|
||||
public:
|
||||
|
||||
SingleWindow():_x(0),_y(0),_width(-1),_height(-1),_screenNum(0),_border(true),_overrideRedirect(false) {}
|
||||
SingleWindow(int x, int y, int width, int height, unsigned int screenNum=0):_x(x),_y(y),_width(width),_height(height),_screenNum(screenNum),_border(true),_overrideRedirect(false) {}
|
||||
SingleWindow(const SingleWindow& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):ViewConfig(rhs,copyop), _x(rhs._x),_y(rhs._y),_width(rhs._width),_height(rhs._height),_screenNum(rhs._screenNum),_border(rhs._border), _overrideRedirect(rhs._overrideRedirect) {}
|
||||
SingleWindow():_x(0),_y(0),_width(-1),_height(-1),_screenNum(0),_windowDecoration(true),_overrideRedirect(false) {}
|
||||
SingleWindow(int x, int y, int width, int height, unsigned int screenNum=0):_x(x),_y(y),_width(width),_height(height),_screenNum(screenNum),_windowDecoration(true),_overrideRedirect(false) {}
|
||||
SingleWindow(const SingleWindow& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):ViewConfig(rhs,copyop), _x(rhs._x),_y(rhs._y),_width(rhs._width),_height(rhs._height),_screenNum(rhs._screenNum),_windowDecoration(rhs._windowDecoration), _overrideRedirect(rhs._overrideRedirect) {}
|
||||
|
||||
META_Object(osgViewer,SingleWindow);
|
||||
|
||||
@@ -46,8 +46,8 @@ class OSGVIEWER_EXPORT SingleWindow : public ViewConfig
|
||||
void setScreenNum(unsigned int sn) { _screenNum = sn; }
|
||||
unsigned int getScreenNum() const { return _screenNum; }
|
||||
|
||||
void setBorder(bool border) { _border = border; }
|
||||
bool getBorder() const { return _border; }
|
||||
void setWindowDecoration(bool wd) { _windowDecoration = wd; }
|
||||
bool getWindowDecoration() const { return _windowDecoration; }
|
||||
|
||||
void setOverrideRedirect(bool override) { _overrideRedirect = override; }
|
||||
bool getOverrideRedirect() const { return _overrideRedirect; }
|
||||
@@ -56,7 +56,7 @@ class OSGVIEWER_EXPORT SingleWindow : public ViewConfig
|
||||
|
||||
int _x, _y, _width, _height;
|
||||
unsigned int _screenNum;
|
||||
bool _border;
|
||||
bool _windowDecoration;
|
||||
bool _overrideRedirect;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user