23 #include "wx/msw/wrapwin.h"
26 #include "hugin_config.h"
27 #if defined HAVE_EPOXY && HAVE_EPOXY
32 #include <OpenGL/gl.h>
42 #define DIFFERENCE_DOUBLE 2
53 #if defined HAVE_EPOXY && HAVE_EPOXY
54 if (epoxy_has_gl_extension(
"GL_ARB_imaging"))
58 if ((glBlendEquation != NULL) && (epoxy_has_gl_extension(
"GL_EXT_blend_subtract")))
65 if((glBlendEquation!=NULL) && (GLEW_EXT_blend_subtract))
88 if (!image_set.empty())
128 unsigned int display_list;
133 glBlendEquation(GL_FUNC_REVERSE_SUBTRACT);
135 glBlendFunc(GL_SRC_ALPHA, GL_SRC_ALPHA);
141 glCallList(display_list);
147 float viewer_exposure = 1.0 /
pow(2.0,
149 float es =
static_cast<float>(viewer_exposure / img->
getExposure());
150 float scale[3] = {
static_cast<float>(es / img->getWhiteBalanceRed()),
152 static_cast<float>(es / img->getWhiteBalanceBlue()) };
154 while (scale[0] > 0.0 && scale[1] > 0.0 && scale[2] > 0.0)
157 glCallList(display_list);
158 scale[0] -= 1.0; scale[1] -= 1.0; scale[2] -= 1.0;
160 glColor3f(1.0, 1.0, 1.0);
162 glBlendEquation(GL_FUNC_ADD);
165 glBlendFunc(GL_DST_COLOR, GL_ONE);
168 glCallList(display_list);
170 glEnable(GL_TEXTURE_2D);
void DisableTexture(bool maskOnly=false)
bool GetPhotometricCorrect()
void ForceRequireRedraw()
float pow(float a, double b)
TextureManager * GetTextureManager()
double getExposure() const
void BindTexture(unsigned int image_number)
void DrawImage(unsigned int image_number, unsigned int display_list)
const PanoramaOptions & getOptions() const
returns the options for this panorama
HuginBase::SrcPanoImage * GetSrcImage(unsigned int image_nr)
All variables of a source image.
unsigned int GetMeshDisplayList(unsigned int image_nr)
double outputExposureValue