Commit 0d95ceea authored by Rashad Kanavath's avatar Rashad Kanavath

Merge remote-tracking branch 'origin/release-3.2' into develop

parents a6d0e444 8498ac0a
......@@ -103,6 +103,8 @@ namespace mvd
#define REFERENCE_LAYER_COMBOBOX_NAME "referenceLayerComboBox"
#define FORCE_NO_GLSL ( ( defined( _DEBUG ) && 0 ) || 0 )
/*****************************************************************************/
/* STATIC IMPLEMENTATION SECTION */
......@@ -181,6 +183,21 @@ MainWindow
bool isGLSL = m_ImageView->GetRenderer()->CheckGLCapabilities( &m_GLSL140 );
#if FORCE_NO_GLSL
m_ImageView->GetRenderer()->SetGLSLEnabled( false );
isGLSL = false;
#endif // FORCE_NO_GLSL
// MANTIS-1204
// {
//
// Forward GLSL state to quicklook view.
assert( GetQuicklookView()!=NULL );
assert( GetQuicklookView()->GetRenderer()!=NULL );
GetQuicklookView()->GetRenderer()->SetGLSLEnabled( isGLSL );
// }
assert( m_ShaderWidget!=NULL );
......@@ -2016,7 +2033,7 @@ MainWindow
void
MainWindow
::OnApplicationToLaunchSelected( const QString & appName,
const QString & docName )
const QString & docName )
{
assert( Application::ConstInstance()!=NULL );
assert( Application::ConstInstance()->GetOTBApplicationsModel()!=NULL );
......
......@@ -532,7 +532,7 @@ InputProcessXMLInitializer
inline
ToolTipInitializer::result_type
ToolTipInitializer
::operator () ( argument_type widget ) const
::operator () ( argument_type itkNotUsed(widget) ) const
{
assert( widget!=NULL );
......
......@@ -314,7 +314,7 @@ StackedLayerModel
/*******************************************************************************/
std::string
StackedLayerModel
::GenerateKey( AbstractLayerModel * layerModel )
::GenerateKey( AbstractLayerModel * itkNotUsed(layerModel) )
{
std::ostringstream oss;
......
......@@ -215,6 +215,12 @@ public:
/**
*/
inline bool IsBypassRenderingEnabled() const;
/**
*/
inline bool SetGLSLEnabled( bool );
/**
*/
inline bool IsGLSLEnabled() const;
/**
*/
inline bool ZoomToRegion( const PointType & origin,
......@@ -264,7 +270,8 @@ protected:
AbstractImageViewRenderer( QObject* parent = NULL ) :
QObject( parent ),
m_StackedLayerModel( NULL ),
m_BypassRenderingEnabled( false )
m_BypassRenderingEnabled( false ),
m_GLSLEnabled( true )
{
}
......@@ -330,6 +337,9 @@ private:
/**
*/
bool m_BypassRenderingEnabled: 1;
/**
*/
bool m_GLSLEnabled: 1;
/*-[ PRIVATE SLOTS SECTION ]-----------------------------------------------*/
......@@ -419,6 +429,28 @@ AbstractImageViewRenderer
return bypass;
}
/*****************************************************************************/
inline
bool
AbstractImageViewRenderer
::IsGLSLEnabled() const
{
return m_GLSLEnabled;
}
/*****************************************************************************/
inline
bool
AbstractImageViewRenderer
::SetGLSLEnabled( bool isEnabled )
{
bool wasEnabled = m_GLSLEnabled;
m_GLSLEnabled = isEnabled;
return wasEnabled;
}
/*****************************************************************************/
inline
void
......
......@@ -530,7 +530,7 @@ ImageViewManipulator
/******************************************************************************/
void
ImageViewManipulator
::ResizeEvent( QResizeEvent* event )
::ResizeEvent( QResizeEvent* itkNotUsed(event) )
{
assert( event!=NULL );
......
......@@ -197,15 +197,15 @@ ImageViewRenderer
);
}
//
// Set GLSL effects state.
SetGLSLEnabled( isOk );
//
// Return if check has succeeded.
if( isOk )
return true;
//
// Disable GLSL effects.
m_EffectsEnabled = false;
//
// Construct message.
QString message(
......@@ -696,6 +696,8 @@ ImageViewRenderer
imageSettings->SetMaxBlue( settings.GetHighIntensity(RGBW_CHANNEL_BLUE ) );
}
// qDebug() << this << " gamma: " << settings.GetGamma();
imageSettings->SetGamma( settings.GetGamma() );
if( properties==NULL )
......@@ -722,6 +724,10 @@ ImageViewRenderer
if( !fragmentShader.IsNull() )
{
// If this point is reached, shader is not null which means
// that isGLSLEnabled() is true.
assert( IsGLSLEnabled() );
otb::StandardShader::Pointer shader(
otb::DynamicCast< otb::StandardShader >( fragmentShader )
);
......@@ -877,7 +883,7 @@ ImageViewRenderer
// << "\tQString:" << vectorImageModel->GetFilename()
// << "\tstd::string" << QFile::encodeName( vectorImageModel->GetFilename() );
if( m_EffectsEnabled )
if( IsGLSLEnabled() )
{
// qDebug() << "Created shader for" << FromStdString( it->first );
......
......@@ -220,7 +220,7 @@ QuicklookViewManipulator
/******************************************************************************/
void
QuicklookViewManipulator
::WheelEvent( QWheelEvent* event )
::WheelEvent( QWheelEvent* itkNotUsed(event) )
{
assert( event!=NULL );
}
......@@ -228,7 +228,7 @@ QuicklookViewManipulator
/******************************************************************************/
void
QuicklookViewManipulator
::KeyPressEvent( QKeyEvent* event )
::KeyPressEvent( QKeyEvent* itkNotUsed(event) )
{
assert( event!=NULL );
......@@ -238,7 +238,7 @@ QuicklookViewManipulator
/******************************************************************************/
void
QuicklookViewManipulator
::KeyReleaseEvent( QKeyEvent* event )
::KeyReleaseEvent( QKeyEvent* itkNotUsed(event) )
{
assert( event!=NULL );
......
......@@ -6,6 +6,9 @@ Monteverdi 3.2.0 - Changes since version 3.0.0 (March 30th, 2016)
=================================================================
* Bug fixes:
* MANTIS-1203: Clicking on 1:1 button several time result in strange cycling behaviour
* MANTIS-1202: Wrong aspect ratio at loading
* MANTIS-1197: Clicking on minimap to navigate result in monteverdi crashing
* MANTIS-1196: OTB-application Quit button closes widget but not window when using Mapla
* MANTIS-1179: Using the Upper Bound mode for resolution lookup in preferences result in wrong resolution used
* MANTIS-1178: Zoom to full resolution does not zoom to 1 image pixel = 1 screen pixel for georeferenced data
......
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