Commit 344168fb authored by Mike Kremer's avatar Mike Kremer

Implemented philips stereo update method. Tidied up a bit.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7580 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 697da800
......@@ -142,6 +142,8 @@ glViewer::glViewer( QGraphicsScene* _scene,
glWidget_(_glWidget),
cursorPainter_(0),
cursorPositionValid_(false),
pProgram_(0),
philipsStereoInitialized_(false),
pickCache_(0),
updatePickCache_(true),
pickCacheSupported_(true),
......@@ -428,7 +430,7 @@ void glViewer::setSceneCenter( const ACG::Vec3d& _center ) {
//-----------------------------------------------------------------------------
void glViewer::setTrackBallCenter( const ACG::Vec3d& _center ) {
trackball_center_ = _center;
}
......@@ -731,12 +733,12 @@ glViewer::drawScene_stereo()
} else if (OpenFlipper::Options::stereoMode () == OpenFlipper::Options::Philips )
{
drawScenePhilipsStereo ();
return;
}
drawScene_anaglyphStereo ();
}
......
......@@ -61,6 +61,9 @@
#include <ACG/Scenegraph/SceneGraph.hh>
#include <ACG/QtWidgets/QtSceneGraphWidget.hh>
#include <ACG/ShaderUtils/GLSLShader.hh>
#include <ACG/GL/globjects.hh>
#include <QtOpenGL/QGLFormat>
#include <QBoxLayout>
#include <QtNetwork/QUdpSocket>
......@@ -216,18 +219,18 @@ public:
* Set new center point of scene
*/
void setSceneCenter( const ACG::Vec3d& _center );
/** \brief Set Trackball Center point of scene
*
* The scene is rotated around the trackball center when using the mouse
*/
void setTrackBallCenter( const ACG::Vec3d& _center );
/** \brief Get Trackball Center point of scene
*
* The scene is rotated around the trackball center when using the mouse
*/
const ACG::Vec3d trackBallCenter( ) { return trackball_center_; };
const ACG::Vec3d trackBallCenter( ) { return trackball_center_; };
/** Get scene's center
\see setScenePos()
......@@ -533,10 +536,13 @@ private:
// helper called to cleanup custom anaglyph stereo
void finiCustomAnaglyphStereo();
// Draws the scene for a philips stereo display ( Header, left color image, right depth map )
void drawScenePhilipsStereo();
// Updates the scene for a philips stereo display
void updateScenePhilipsStereo();
//-------------------------------------------------------------- protected data
protected:
......@@ -673,6 +679,13 @@ private:
GLuint agProgram_;
bool customAnaglyphSupported_;
// Philips stereo mode stuff
int pTexWidth_;
int pTexHeight_;
ACG::Texture2D pColorTexture_;
ACG::Texture2D pDepthStencilTexture_;
GLSL::PtrProgram pProgram_;
bool philipsStereoInitialized_;
/** @} */
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment