Request for Changes-25: Disable Ice shaders if OpenGL version is lower than 2.0
Contents
[Request for Changes - 21] Support CDS import
Status
- Author: Stéphane ALBERT
- Additional Contributors: none
- Submitted on 22/02/2016
- Voted : March 7th, 2016
- Proposed target release : 5.4
- Merged :
- Branch :
Summary
Disable runtime GLSL source-code compilation and use of shaders when running on system which drivers does not provide sufficient OpenGL and GLSL versions. Use standard OpenGL ITK pixel-iterators to store pixel-data into standard OpenGL textures.
Rationale
Allow use of otbIceViewer and Monteverdi on systems which only support old OpenGL drivers such as, for example, remote-desktop systems running on MS-Windows.
This mode allow more users to use otbIceViewer and Monteverdi instead of being stuck.
Implementation details
Classes and files
Image rendering settings are split off from otb::StandardShader
into a new otb::ImageSettings
class. An instance of it is shared between the otb::GlImageActor
and the otb::StandardShader
.
otb::GlImageActor
now provides a ::CreateShader()
method to explicitly instanciate the shader which is not to be called when OpenGL capabilities are not met.
A warning message is output to the console.
OTB:
M Modules/Visualization/Ice/include/otbGlImageActor.h A Modules/Visualization/Ice/include/otbImageSettings.h M Modules/Visualization/Ice/include/otbStandardShader.h M Modules/Visualization/Ice/src/CMakeLists.txt M Modules/Visualization/Ice/src/otbGlImageActor.cxx A Modules/Visualization/Ice/src/otbImageSettings.cxx M Modules/Visualization/Ice/src/otbStandardShader.cxx M Modules/Visualization/IceViewer/src/otbIceViewer.cxx
Monteverdi:
M Code/Application/Monteverdi/mvdMainWindow.cxx M Code/Common/Gui/mvdAbstractImageViewRenderer.h M Code/Common/Gui/mvdImageViewRenderer.cxx M Code/Common/Gui/mvdImageViewRenderer.h M Code/Common/Gui/mvdImageViewWidget.h
Applications
N/A
Tests
N/A
Documentation
N/A
Additional notes
N/A