Commit 01eecace authored by Jan Möbius's avatar Jan Möbius

Dennis:

Added anaglyph stereo support
Added Options for anaglyph stereo

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5571 383ad7c9-94d9-4d36-a494-682f7c89f535
parent e91d8d2d
......@@ -161,6 +161,42 @@ void Core::readApplicationOptions(INIFile& _ini) {
//if ( _ini.get_entry( stereo, "Options" , "Stereo") )
// OpenFlipper::Options::stereo(stereo);
//============================================================================
// Load the stereo mode setting
//============================================================================
int stereoMode = 0;
if ( _ini.get_entry( stereoMode, "Options" , "StereoMode") )
OpenFlipper::Options::stereoMode(static_cast<OpenFlipper::Options::StereoMode> (stereoMode));
//============================================================================
// Load the custom anaglyph stereo mode color matrices
//============================================================================
std::vector<float> mat;
if ( _ini.get_entry( mat, "Options" , "CustomAnaglyphLeftEye") && mat.size () == 9)
{
OpenFlipper::Options::anaglyphLeftEyeColorMatrix(mat);
}
else
{
std::vector<float> set (9,0.0);
set[0] = 0.299;
set[3] = 0.587;
set[6] = 0.114;
OpenFlipper::Options::anaglyphLeftEyeColorMatrix(set);
}
if ( _ini.get_entry( mat, "Options" , "CustomAnaglyphRightEye") && mat.size () == 9)
{
OpenFlipper::Options::anaglyphRightEyeColorMatrix(mat);
}
else
{
std::vector<float> set (9,0.0);
set[4] = 1.0;
set[8] = 1.0;
OpenFlipper::Options::anaglyphRightEyeColorMatrix(set);
}
//============================================================================
// Load the setting for the loger window
//============================================================================
......@@ -478,6 +514,11 @@ void Core::writeApplicationOptions(INIFile& _ini) {
_ini.add_entry("Options","DefaultBackgroundColor", (uint)OpenFlipper::Options::defaultBackgroundColor().rgba () );
_ini.add_entry("Options","DefaultBaseColor", (uint)OpenFlipper::Options::defaultBaseColor().rgba () );
_ini.add_entry("Options","StereoMode",OpenFlipper::Options::stereoMode() );
_ini.add_entry("Options" , "CustomAnaglyphLeftEye", OpenFlipper::Options::anaglyphLeftEyeColorMatrix() );
_ini.add_entry("Options" , "CustomAnaglyphRightEye", OpenFlipper::Options::anaglyphRightEyeColorMatrix() );
}
// _ini.add_entry("Options","Stereo",OpenFlipper::Options::stereo() );
......
This diff is collapsed.
......@@ -88,9 +88,19 @@ static Experience experienceLevel_ = NOVICE;
/// Show gui or not?
static bool nogui_ = false;
/// Store the stereo mode
/// Store the stereo support
static bool stereo_ = true;
/// Store the opengl stereo support
static bool glStereo_ = true;
/// Stereo mode
StereoMode stereoMode_ = OpenGL;
/// vectroy containing left/right color matrices for custom anaglyph mode
std::vector<float> anaglyphLeftEyeColors_ = std::vector<float> (9, 0.0);
std::vector<float> anaglyphRightEyeColors_ = std::vector<float> (9, 0.0);
/// Store the synchronization mode
static bool synchronization_ = false;
......@@ -400,7 +410,7 @@ bool gui( ) {
return !nogui_;
}
/// Store stereo mode setting
/// Store stereo setting
void stereo( bool _stereo ) {
stereo_ = _stereo;
}
......@@ -410,6 +420,53 @@ bool stereo( ) {
return stereo_;
}
/// Store opengl stereo mode setting
void glStereo( bool _glStereo ) {
glStereo_ = _glStereo;
}
/// get current opengl stereo setting
bool glStereo( ) {
return glStereo_;
}
/// Store stereo mode setting
void stereoMode( StereoMode _mode ) {
stereoMode_ = _mode;
}
/// get current stereo mode setting
StereoMode stereoMode( ) {
return stereoMode_;
}
/// Store the 3x3 left eye color matrix values for custom anaglyph stereo mode
void anaglyphLeftEyeColorMatrix( std::vector<float> _mat )
{
for (int i = 0; i < 9; i++)
anaglyphLeftEyeColors_[i] = _mat[i];
}
/// get the 3x3 left eye color matrix values for custom anaglyph stereo mode
std::vector<float> anaglyphLeftEyeColorMatrix( )
{
return anaglyphLeftEyeColors_;
}
/// Store the 3x3 right eye color matrix values for custom anaglyph stereo mode
void anaglyphRightEyeColorMatrix( std::vector<float> _mat )
{
for (int i = 0; i < 9; i++)
anaglyphRightEyeColors_[i] = _mat[i];
}
/// get the 3x3 right eye color matrix values for custom anaglyph stereo mode
std::vector<float> anaglyphRightEyeColorMatrix( )
{
return anaglyphRightEyeColors_;
}
/// Store synchronization mode setting
void synchronization( bool _synchronization ) {
synchronization_ = _synchronization;
......
......@@ -308,15 +308,54 @@ void fontsDir(QDir _dir);
/// get if a gui should be visible or not
DLLEXPORT
bool gui( );
/// Store stereo mode setting
/// Store stereo support setting
DLLEXPORT
void stereo( bool _stereo );
/// get current stereo setting
/// get current stereo support setting
DLLEXPORT
bool stereo( );
/// Stereo mode
enum StereoMode {
OpenGL,
AnaglyphRedCyan,
AnaglyphCustom
};
/// Store opengl stereo support setting
DLLEXPORT
void glStereo( bool _stereo );
/// will be set in core is opengl stereo is supported
DLLEXPORT
bool glStereo( );
/// Store stereo mode setting
DLLEXPORT
void stereoMode( StereoMode _mode );
/// get current stereo mode setting
DLLEXPORT
StereoMode stereoMode( );
/// Store the 3x3 left eye color matrix values for custom anaglyph stereo mode
DLLEXPORT
void anaglyphLeftEyeColorMatrix( std::vector<float> _mat );
/// get the 3x3 left eye color matrix values for custom anaglyph stereo mode
DLLEXPORT
std::vector<float> anaglyphLeftEyeColorMatrix( );
/// Store the 3x3 right eye color matrix values for custom anaglyph stereo mode
DLLEXPORT
void anaglyphRightEyeColorMatrix( std::vector<float> _mat );
/// get the 3x3 right eye color matrix values for custom anaglyph stereo mode
DLLEXPORT
std::vector<float> anaglyphRightEyeColorMatrix( );
/// Store synchronization setting
DLLEXPORT
void synchronization( bool _synchronization );
......
<?xml version = '1.0' encoding = 'UTF-8'?>
<!DOCTYPE KDevPrjSession>
<KDevPrjSession>
<DocsAndViews NumberOfDocuments="2" >
<DocsAndViews NumberOfDocuments="6" >
<Doc0 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/ObjectTypes/MeshObject/MeshObjectT.hh" >
<View0 Encoding="" line="0" Type="Source" />
<View0 Encoding="" line="27" Type="Source" />
</Doc0>
<Doc1 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/ACG/Scenegraph/PolyLineNodeT.hh" >
<View0 Encoding="" line="116" Type="Source" />
<View0 Encoding="" line="120" Type="Source" />
</Doc1>
<Doc2 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/OpenFlipper/BasePlugin/LoadSaveInterface.hh" >
<View0 Encoding="" line="133" Type="Source" />
</Doc2>
<Doc3 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/OpenFlipper/OpenFlipper.cc" >
<View0 Encoding="" line="141" Type="Source" />
</Doc3>
<Doc4 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/OpenFlipper/Core/ParseObj.cc" >
<View0 Encoding="" line="153" Type="Source" />
</Doc4>
<Doc5 NumberOfViews="1" URL="file:///data/home1/moebius/projects/OpenFlipper/OpenFlipper/Core/PluginLoader.cc" >
<View0 Encoding="" line="509" Type="Source" />
</Doc5>
</DocsAndViews>
<pluginList>
<kdevdebugger>
......
......@@ -136,8 +136,8 @@ CoreWidget( QVector<ViewMode*>& _viewModes,
// is stereo possible, use it?
if (format.stereo()) {
std::cerr << "Stereo buffer requested: " << (glWidget_->format().stereo() ? "ok\n" : "failed\n");
OpenFlipper::Options::stereo(glWidget_->format().stereo());
}
OpenFlipper::Options::glStereo(glWidget_->format().stereo());
glView_->setViewport(glWidget_);
......
......@@ -102,6 +102,8 @@
#include <OpenFlipper/BasePlugin/PluginFunctions.hh>
#include <OpenFlipper/common/GlobalOptions.hh>
//== NAMESPACES ===============================================================
......@@ -189,6 +191,14 @@ glViewer::glViewer( QtGLGraphicsScene* _scene,
setAcceptDrops(true);
setHome();
// initialize custom anaglyph stereo
agTexWidth_ = 0;
agTexHeight_ = 0;
agTexture_[0] = 0;
agTexture_[1] = 0;
agProgram_ = 0;
customAnaglyphSupported_ = false;
}
......@@ -197,6 +207,7 @@ glViewer::glViewer( QtGLGraphicsScene* _scene,
glViewer::~glViewer()
{
finiCustomAnaglyphStereo ();
delete glstate_;
}
......@@ -524,53 +535,24 @@ void glViewer::drawScene_mono()
void
glViewer::drawScene_stereo()
{
double l, r, t, b, w, h, a, radians, wd2, ndfl;
w = glWidth();
h = glHeight();
a = w / h;
radians = fovy_ * 0.5 / 180.0 * M_PI;
wd2 = near_ * tan(radians);
ndfl = near_ / focalDist_ * scene_radius_;
l = -a*wd2;
r = a*wd2;
t = wd2;
b = -wd2;
double offset = 0.5 * eyeDist_;
double offset2 = offset * ndfl;
// left eye
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(l+offset2, r+offset2, b, t, near_, far_);
glTranslatef(-offset, 0.0, 0.0);
glMatrixMode(GL_MODELVIEW);
glDrawBuffer(GL_BACK_LEFT);
glstate_->clearBuffers ();
glClear(GL_DEPTH_BUFFER_BIT);
drawScene_mono();
if (OpenFlipper::Options::stereoMode () == OpenFlipper::Options::OpenGL && OpenFlipper::Options::glStereo ())
{
drawScene_glStereo ();
return;
}
else if (OpenFlipper::Options::stereoMode () == OpenFlipper::Options::AnaglyphCustom && customAnaglyphSupported_)
{
drawScene_customAnaglyphStereo ();
// if somthing went wrong, fallback to normal anaglyph
if (customAnaglyphSupported_)
return;
}
// right eye
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(l-offset2, r-offset2, b, t, near_, far_);
glTranslatef(offset, 0.0, 0.0);
glMatrixMode(GL_MODELVIEW);
glDrawBuffer(GL_BACK_RIGHT);
glstate_->clearBuffers ();
glClear(GL_DEPTH_BUFFER_BIT);
drawScene_mono();
glDrawBuffer(GL_BACK);
drawScene_anaglyphStereo ();
}
//-----------------------------------------------------------------------------
......@@ -746,10 +728,6 @@ void glViewer::setView(const ACG::GLMatrixd& _modelview,
void glViewer::initializeGL()
{
// we use GLEW to manage extensions
// initialize it first
glewInit();
// lock update
properties_.lockUpdate();
......@@ -799,6 +777,11 @@ void glViewer::initializeGL()
// unlock update (we started locked)
properties_.unLockUpdate();
customAnaglyphSupported_ = glewIsSupported("GL_ARB_fragment_program") &&
(glewIsSupported("GL_ARB_texture_rectangle") ||
glewIsSupported("GL_EXT_texture_rectangle") ||
glewIsSupported("GL_NV_texture_rectangle"));
}
......
......@@ -454,6 +454,21 @@ private:
// helper called by drawScene() when stereo viewing is active.
void drawScene_stereo();
// helper called by drawScene_stereo() when opengl stereo viewing is active.
void drawScene_glStereo();
// helper called by drawScene_stereo() when anaglyph stereo viewing is active.
void drawScene_anaglyphStereo();
// helper called by drawScene_stereo() when custom anaglyph stereo viewing is active.
void drawScene_customAnaglyphStereo();
// helper called to initialize/update custom anaglyph stereo
void updateCustomAnaglyphStereo();
// helper called to cleanup custom anaglyph stereo
void finiCustomAnaglyphStereo();
//-------------------------------------------------------------- protected data
protected:
......@@ -563,6 +578,13 @@ private:
bool stereo_;
double eyeDist_, focalDist_;
// custom anaglyph stuff
int agTexWidth_;
int agTexHeight_;
GLuint agTexture_[2];
GLuint agProgram_;
bool customAnaglyphSupported_;
/** @} */
......
......@@ -45,12 +45,32 @@
#include <QStatusBar>
#include <QToolButton>
#include <OpenFlipper/common/GlobalOptions.hh>
//== NAMESPACES ===============================================================
//== IMPLEMENTATION ==========================================================
static const char* customAnaglyphProg = {
"!!ARBfp1.0"
"TEMP left, right, lmul, rmul;"
"TEX left, fragment.texcoord[0], texture[0], RECT;"
"TEX right, fragment.texcoord[0], texture[1], RECT;"
"DP3 lmul.r, left, program.env[0];"
"DP3 lmul.g, left, program.env[1];"
"DP3 lmul.b, left, program.env[2];"
"DP3 rmul.r, right, program.env[3];"
"DP3 rmul.g, right, program.env[4];"
"DP3 rmul.b, right, program.env[5];"
"ADD result.color, lmul, rmul;"
"END"
};
//-----------------------------------------------------------------------------
void glViewer::setEyeDistance(double _distance) {
eyeDist_ = _distance;
updateGL();
......@@ -85,5 +105,302 @@ glViewer::setStereoMode(bool _b)
updateGL();
}
//-----------------------------------------------------------------------------
void
glViewer::drawScene_glStereo()
{
double l, r, t, b, w, h, a, radians, wd2, ndfl;
w = glWidth();
h = glHeight();
a = w / h;
radians = fovy_ * 0.5 / 180.0 * M_PI;
wd2 = near_ * tan(radians);
ndfl = near_ / focalDist_ * scene_radius_;
l = -a*wd2;
r = a*wd2;
t = wd2;
b = -wd2;
double offset = 0.5 * eyeDist_;
double offset2 = offset * ndfl;
// left eye
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(l+offset2, r+offset2, b, t, near_, far_);
glTranslatef(-offset, 0.0, 0.0);
glMatrixMode(GL_MODELVIEW);
glDrawBuffer(GL_BACK_LEFT);
glstate_->clearBuffers ();
glClear(GL_DEPTH_BUFFER_BIT);
drawScene_mono();
// right eye
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(l-offset2, r-offset2, b, t, near_, far_);
glTranslatef(offset, 0.0, 0.0);
glMatrixMode(GL_MODELVIEW);
glDrawBuffer(GL_BACK_RIGHT);
glstate_->clearBuffers ();
glClear(GL_DEPTH_BUFFER_BIT);
drawScene_mono();
glDrawBuffer(GL_BACK);
}
//-----------------------------------------------------------------------------
void
glViewer::drawScene_anaglyphStereo()
{
double l, r, t, b, w, h, a, radians, wd2, ndfl;
w = glWidth();
h = glHeight();
a = w / h;
radians = fovy_ * 0.5 / 180.0 * M_PI;
wd2 = near_ * tan(radians);
ndfl = near_ / focalDist_ * scene_radius_;
l = -a*wd2;
r = a*wd2;
t = wd2;
b = -wd2;
double offset = 0.5 * eyeDist_;
double offset2 = offset * ndfl;
// left eye
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(l+offset2, r+offset2, b, t, near_, far_);
glTranslatef(-offset, 0.0, 0.0);
glMatrixMode(GL_MODELVIEW);
glstate_->clearBuffers ();
glClear(GL_DEPTH_BUFFER_BIT);
// draw red channel for left eye
glColorMask(GL_TRUE,GL_FALSE,GL_FALSE,GL_TRUE);
drawScene_mono();
glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE);
// right eye
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(l-offset2, r-offset2, b, t, near_, far_);
glTranslatef(offset, 0.0, 0.0);
glMatrixMode(GL_MODELVIEW);
glClear(GL_DEPTH_BUFFER_BIT);
// draw green and blue channel for right eye
glColorMask(GL_FALSE,GL_TRUE,GL_TRUE,GL_TRUE);
drawScene_mono();
glColorMask(GL_TRUE,GL_TRUE,GL_TRUE,GL_TRUE);
}
//-----------------------------------------------------------------------------
void
glViewer::updateCustomAnaglyphStereo()
{
if (!customAnaglyphSupported_)
return;
if (!agProgram_)
{
GLint errorPos;
glGenProgramsARB (1, &agProgram_);
glGetError ();
glBindProgramARB (GL_FRAGMENT_PROGRAM_ARB, agProgram_);
glProgramStringARB (GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
strlen (customAnaglyphProg), customAnaglyphProg);
glGetIntegerv (GL_PROGRAM_ERROR_POSITION_ARB, &errorPos);
if (glGetError () != GL_NO_ERROR || errorPos != -1)
{
printf("Error loading program %d %s\n",errorPos, glGetString(GL_PROGRAM_ERROR_STRING_ARB));
glDeleteProgramsARB (1, &agProgram_);
customAnaglyphSupported_ = false;
return;
}
}
if (!agTexture_[0])
glGenTextures (2, agTexture_);
if (!agTexture_[0])
{
finiCustomAnaglyphStereo ();
customAnaglyphSupported_ = false;
return;
}
if (glstate_->viewport_width () != agTexWidth_ ||
glstate_->viewport_height () != agTexHeight_)
{
glBindTexture (GL_TEXTURE_RECTANGLE_NV, agTexture_[0]);
glTexImage2D (GL_TEXTURE_RECTANGLE_NV, 0, GL_RGB, glstate_->viewport_width (),
glstate_->viewport_height (), 0, GL_RGB, GL_UNSIGNED_BYTE, 0);
glBindTexture (GL_TEXTURE_RECTANGLE_NV, agTexture_[1]);
glTexImage2D (GL_TEXTURE_RECTANGLE_NV, 0, GL_RGB, glstate_->viewport_width (),
glstate_->viewport_height (), 0, GL_RGB, GL_UNSIGNED_BYTE, 0);
glBindTexture (GL_TEXTURE_RECTANGLE_NV, 0);
agTexWidth_ = glstate_->viewport_width ();
agTexHeight_ = glstate_->viewport_height ();
}
}
//-----------------------------------------------------------------------------
void
glViewer::finiCustomAnaglyphStereo()
{
if (!customAnaglyphSupported_)
return;
if (agProgram_)
glDeleteProgramsARB (1, &agProgram_);
if (agTexture_[0])
glDeleteTextures (2, agTexture_);
}
//-----------------------------------------------------------------------------
void
glViewer::drawScene_customAnaglyphStereo()
{
updateCustomAnaglyphStereo ();
if (!customAnaglyphSupported_)
return;
double l, r, t, b, w, h, a, radians, wd2, ndfl;
w = glWidth();
h = glHeight();
a = w / h;
radians = fovy_ * 0.5 / 180.0 * M_PI;
wd2 = near_ * tan(radians);
ndfl = near_ / focalDist_ * scene_radius_;
l = -a*wd2;
r = a*wd2;
t = wd2;
b = -wd2;
double offset = 0.5 * eyeDist_;
double offset2 = offset * ndfl;
int vp_l, vp_b, vp_w, vp_h;
glstate_->get_viewport (vp_l, vp_b, vp_w, vp_h);
std::vector<float> le = OpenFlipper::Options::anaglyphLeftEyeColorMatrix();
std::vector<float> re = OpenFlipper::Options::anaglyphRightEyeColorMatrix();
// left eye
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(l+offset2, r+offset2, b, t, near_, far_);
glTranslatef(-offset, 0.0, 0.0);
glMatrixMode(GL_MODELVIEW);
glstate_->clearBuffers ();
glClear(GL_DEPTH_BUFFER_BIT);
drawScene_mono();
glBindTexture (GL_TEXTURE_RECTANGLE_NV, agTexture_[0]);
glCopyTexSubImage2D (GL_TEXTURE_RECTANGLE_NV, 0, 0, 0, vp_l, vp_b, vp_w, vp_h);
glBindTexture (GL_TEXTURE_RECTANGLE_NV, 0);
// right eye
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(l-offset2, r-offset2, b, t, near_, far_);
glTranslatef(offset, 0.0, 0.0);
glMatrixMode(GL_MODELVIEW);
glstate_->clearBuffers ();
glClear(GL_DEPTH_BUFFER_BIT);
drawScene_mono();
glBindTexture (GL_TEXTURE_RECTANGLE_NV, agTexture_[1]);
glCopyTexSubImage2D (GL_TEXTURE_RECTANGLE_NV, 0, 0, 0, vp_l, vp_b, vp_w, vp_h);
glBindTexture (GL_TEXTURE_RECTANGLE_NV, 0);
glActiveTexture (GL_TEXTURE0);
glBindTexture (GL_TEXTURE_RECTANGLE_NV, agTexture_[0]);
glEnable (GL_TEXTURE_RECTANGLE_NV);
glActiveTexture (GL_TEXTURE1);
glBindTexture (GL_TEXTURE_RECTANGLE_NV, agTexture_[1]);
glEnable (GL_TEXTURE_RECTANGLE_NV);
glEnable (GL_FRAGMENT_PROGRAM_ARB);
glBindProgramARB (GL_FRAGMENT_PROGRAM_ARB, agProgram_);
glProgramEnvParameter4fARB (GL_FRAGMENT_PROGRAM_ARB, 0, le[0], le[3], le[6], 0.0);
glProgramEnvParameter4fARB (GL_FRAGMENT_PROGRAM_ARB, 1, le[1], le[4], le[7], 0.0);
glProgramEnvParameter4fARB (GL_FRAGMENT_PROGRAM_ARB, 2, le[2], le[5], le[8], 0.0);
glProgramEnvParameter4fARB (GL_FRAGMENT_PROGRAM_ARB, 3, re[0], re[3], re[6], 0.0);
glProgramEnvParameter4fARB (GL_FRAGMENT_PROGRAM_ARB, 4, re[1], re[4], re[7], 0.0);
glProgramEnvParameter4fARB (GL_FRAGMENT_PROGRAM_ARB, 5, re[2], re[5], re[8], 0.0);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0, vp_w, vp_h, 0, 0, 1.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glDisable (GL_DEPTH_TEST);
glBegin (GL_QUADS);
glMultiTexCoord2f (GL_TEXTURE0, 0, vp_h);
glMultiTexCoord2f (GL_TEXTURE1, 0, vp_h);
glVertex2i(0, 0);
glMultiTexCoord2f (GL_TEXTURE0, 0, 0);
glMultiTexCoord2f (GL_TEXTURE1, 0, 0);
glVertex2i(0, vp_h);
glMultiTexCoord2f (GL_TEXTURE0, vp_w, 0);
glMultiTexCoord2f (GL_TEXTURE1, vp_w, 0);
glVertex2i(vp_w, vp_h);
glMultiTexCoord2f (GL_TEXTURE0, vp_w, vp_h);
glMultiTexCoord2f (GL_TEXTURE1, vp_w, vp_h);
glVertex2i(vp_w, 0);
glEnd ();
glEnable (GL_DEPTH_TEST);
glBindProgramARB (GL_FRAGMENT_PROGRAM_ARB, 0);
glDisable (GL_FRAGMENT_PROGRAM_ARB);
glActiveTexture (GL_TEXTURE1);
glBindTexture (GL_TEXTURE_RECTANGLE_NV, 0);
glDisable (GL_TEXTURE_RECTANGLE_NV);
glActiveTexture (GL_TEXTURE0);
glBindTexture (GL_TEXTURE_RECTANGLE_NV, 0);
glDisable (GL_TEXTURE_RECTANGLE_NV);
}
//=============================================================================
//=============================================================================
......@@ -152,6 +152,33 @@ void OptionsWidget::showEvent ( QShowEvent * /*event*/ ) {