Commit 9bcaada2 authored by Jordi Inglada's avatar Jordi Inglada
Browse files

ENH: GL_NO_ACCEL becomes GL_USE_ACCEL

parent 6b89bc8b
......@@ -228,12 +228,12 @@ IF(OTB_USE_VISU_GUI)
#-------------------------------
# Display images using textures using video card acceleration
#-------------------------------
OPTION(GL_NO_ACCEL "Do not use video card acceleration." OFF)
MARK_AS_ADVANCED(GL_NO_ACCEL)
IF(GL_NO_ACCEL)
OPTION(GL_USE_ACCEL "Use video card acceleration." ON)
MARK_AS_ADVANCED(GL_USE_ACCEL)
IF(GL_USE_ACCEL)
# Add compiler option
ADD_DEFINITIONS(-DGL_NO_ACCEL)
ENDIF(GL_NO_ACCEL)
ADD_DEFINITIONS(-DGL_USE_ACCEL)
ENDIF(GL_USE_ACCEL)
......
......@@ -332,7 +332,9 @@ ImageWidgetBase<TPixel>
glRasterPos2i(0,this->h());
#ifdef GL_NO_ACCEL
#ifndef GL_USE_ACCEL
std::cout << "No accel" << std::endl;
glPixelZoom(m_OpenGlIsotropicZoom ,-m_OpenGlIsotropicZoom);
// display the image
......@@ -342,6 +344,7 @@ ImageWidgetBase<TPixel>
GL_UNSIGNED_BYTE,
m_OpenGlBuffer);
#else
std::cout << "Accel" << std::endl;
glEnable(GL_TEXTURE_2D);
glColor4f(1.0,1.0,1.0,0.0);
GLuint texture;
......@@ -368,7 +371,7 @@ ImageWidgetBase<TPixel>
// if image overlay is activated, display image overlay
if(m_ImageOverlayVisible)
{
#ifdef GL_NO_ACCEL
#ifndef GL_USE_ACCEL
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
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