Commit 99395757 authored by Jordi Inglada's avatar Jordi Inglada
Browse files

ENH: GL_USE_ACCEL becomes OTB_GL_USE_ACCEL

parent 9bcaada2
...@@ -228,12 +228,12 @@ IF(OTB_USE_VISU_GUI) ...@@ -228,12 +228,12 @@ IF(OTB_USE_VISU_GUI)
#------------------------------- #-------------------------------
# Display images using textures using video card acceleration # Display images using textures using video card acceleration
#------------------------------- #-------------------------------
OPTION(GL_USE_ACCEL "Use video card acceleration." ON) OPTION(OTB_GL_USE_ACCEL "Use video card acceleration." ON)
MARK_AS_ADVANCED(GL_USE_ACCEL) MARK_AS_ADVANCED(OTB_GL_USE_ACCEL)
IF(GL_USE_ACCEL) IF(OTB_GL_USE_ACCEL)
# Add compiler option # Add compiler option
ADD_DEFINITIONS(-DGL_USE_ACCEL) ADD_DEFINITIONS(-DOTB_GL_USE_ACCEL)
ENDIF(GL_USE_ACCEL) ENDIF(OTB_GL_USE_ACCEL)
......
...@@ -332,7 +332,7 @@ ImageWidgetBase<TPixel> ...@@ -332,7 +332,7 @@ ImageWidgetBase<TPixel>
glRasterPos2i(0,this->h()); glRasterPos2i(0,this->h());
#ifndef GL_USE_ACCEL #ifndef OTB_GL_USE_ACCEL
std::cout << "No accel" << std::endl; std::cout << "No accel" << std::endl;
glPixelZoom(m_OpenGlIsotropicZoom ,-m_OpenGlIsotropicZoom); glPixelZoom(m_OpenGlIsotropicZoom ,-m_OpenGlIsotropicZoom);
...@@ -345,6 +345,7 @@ ImageWidgetBase<TPixel> ...@@ -345,6 +345,7 @@ ImageWidgetBase<TPixel>
m_OpenGlBuffer); m_OpenGlBuffer);
#else #else
std::cout << "Accel" << std::endl; std::cout << "Accel" << std::endl;
glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);
glColor4f(1.0,1.0,1.0,0.0); glColor4f(1.0,1.0,1.0,0.0);
GLuint texture; GLuint texture;
...@@ -371,7 +372,7 @@ ImageWidgetBase<TPixel> ...@@ -371,7 +372,7 @@ ImageWidgetBase<TPixel>
// if image overlay is activated, display image overlay // if image overlay is activated, display image overlay
if(m_ImageOverlayVisible) if(m_ImageOverlayVisible)
{ {
#ifndef GL_USE_ACCEL #ifndef OTB_GL_USE_ACCEL
glEnable(GL_BLEND); glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glDrawPixels(m_BufferedRegion.GetSize()[0], glDrawPixels(m_BufferedRegion.GetSize()[0],
......
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