From: <jl...@us...> - 2008-09-24 16:24:20
|
Revision: 3457 http://hugin.svn.sourceforge.net/hugin/?rev=3457&view=rev Author: jlegg Date: 2008-09-24 16:21:15 +0000 (Wed, 24 Sep 2008) Log Message: ----------- [OpenGL Preview] confine debuging information to the debug build, fix images drawn in wrong order (don't allow redraw while already redrawing), fix slow draw of bright images, and fix no update after modifying photometric parameters. Modified Paths: -------------- hugin/branches/gsoc2008_integration/src/hugin1/hugin/GLViewer.cpp hugin/branches/gsoc2008_integration/src/hugin1/hugin/GLViewer.h hugin/branches/gsoc2008_integration/src/hugin1/hugin/MeshManager.cpp hugin/branches/gsoc2008_integration/src/hugin1/hugin/TexCoordRemapper.cpp hugin/branches/gsoc2008_integration/src/hugin1/hugin/TextureManager.cpp hugin/branches/gsoc2008_integration/src/hugin1/hugin/TextureManager.h hugin/branches/gsoc2008_integration/src/hugin1/hugin/VertexCoordRemapper.cpp hugin/branches/gsoc2008_integration/src/hugin1/hugin/ViewState.cpp hugin/branches/gsoc2008_integration/src/hugin_base/hugin_math/hugin_math.h Modified: hugin/branches/gsoc2008_integration/src/hugin1/hugin/GLViewer.cpp =================================================================== --- hugin/branches/gsoc2008_integration/src/hugin1/hugin/GLViewer.cpp 2008-09-24 10:41:35 UTC (rev 3456) +++ hugin/branches/gsoc2008_integration/src/hugin1/hugin/GLViewer.cpp 2008-09-24 16:21:15 UTC (rev 3457) @@ -72,6 +72,7 @@ frame = frame_in; started_creation = false; + redrawing = false; } GLViewer::~GLViewer() @@ -88,14 +89,14 @@ void GLViewer::SetUpContext() { // set the context - std::cout << "Setting rendering context:\n"; + DEBUG_INFO("Setting rendering context..."); Show(); #ifdef __WXMAC__ m_glContext->SetCurrent(); #else m_glContext->SetCurrent(*this); #endif - std::cout << "OK\n"; + DEBUG_INFO("...got a rendering context."); if (!started_creation) { // It appears we are setting up for the first time. @@ -106,13 +107,13 @@ if (error_state != GLEW_OK) { // glewInit failed - std::cerr << "Error initlialising GLEW: " - << glewGetErrorString(error_state) << ".\n"; + DEBUG_ERROR("Error initlialising GLEW: " + << glewGetErrorString(error_state) << "."); } // check the openGL version if (!GLEW_VERSION_1_3) { - std::cerr << "Sorry, OpenGL 1.3 is required.\n"; + DEBUG_ERROR("Sorry, OpenGL 1.3 is required."); } // we need something to store the state of the view and control updates @@ -136,9 +137,15 @@ void GLViewer::RedrawE(wxPaintEvent& e) { if(!IsShown()) return; - SetUpContext(); - wxPaintDC dc(this); // we need this object on the stack to draw. - Redraw(); + // don't redraw during a redraw. + if (!redrawing) + { + redrawing = true; + SetUpContext(); + wxPaintDC dc(this); // we need this object on the stack to draw. + Redraw(); + redrawing = false; + } } void GLViewer::RefreshWrapper(void * obj) @@ -165,7 +172,7 @@ { // get the renderer to redraw the OpenGL stuff if(!m_renderer) return; - std::cout << "Rendering.\n"; + DEBUG_INFO("Rendering."); // we should use the window background colour outside the panorama // FIXME shouldn't this work on textured backrounds? @@ -185,6 +192,7 @@ SwapBuffers(); // tell the view state we did all the updates and redrew. m_view_state->FinishedDraw(); + DEBUG_INFO("Finished Rendering."); } void GLViewer::MouseMotion(wxMouseEvent& e) Modified: hugin/branches/gsoc2008_integration/src/hugin1/hugin/GLViewer.h =================================================================== --- hugin/branches/gsoc2008_integration/src/hugin1/hugin/GLViewer.h 2008-09-24 10:41:35 UTC (rev 3456) +++ hugin/branches/gsoc2008_integration/src/hugin1/hugin/GLViewer.h 2008-09-24 16:21:15 UTC (rev 3457) @@ -66,7 +66,7 @@ wxGLContext *m_glContext; PT::Panorama * m_pano; - bool started_creation; + bool started_creation, redrawing; vigra::Diff2D offset; GLPreviewFrame *frame; }; Modified: hugin/branches/gsoc2008_integration/src/hugin1/hugin/MeshManager.cpp =================================================================== --- hugin/branches/gsoc2008_integration/src/hugin1/hugin/MeshManager.cpp 2008-09-24 10:41:35 UTC (rev 3456) +++ hugin/branches/gsoc2008_integration/src/hugin1/hugin/MeshManager.cpp 2008-09-24 16:21:15 UTC (rev 3457) @@ -87,7 +87,7 @@ mesh_info_itt->second.Update(); } else { // not found, make a new one - std::cout << "Making new mesh remapper for image " << image_number << ".\n"; + DEBUG_INFO("Making new mesh remapper for image " << image_number << "."); meshes[image_number].SetSource(m_pano, image_number, view_state); } } @@ -151,13 +151,13 @@ void MeshManager::MeshInfo::CompileList() { // build the display list from the coordinates generated by the remapper - std::cout << "Preparing to compile a display list for " << image_number - << ".\n"; + DEBUG_INFO("Preparing to compile a display list for " << image_number + << "."); DEBUG_ASSERT(remap); unsigned int number_of_faces = 0; glNewList(display_list_number, GL_COMPILE); remap->UpdateAndResetIndex(); - std::cout << "Specifying faces.\n"; + DEBUG_INFO("Specifying faces in display list."); #ifndef WIREFRAME glBegin(GL_QUADS); #endif @@ -186,7 +186,7 @@ glEnd(); #endif glEndList(); - std::cout << "Prepared a display list for " << image_number << ", using " - << number_of_faces << " face(s).\n"; + DEBUG_INFO("Prepared a display list for " << image_number << ", using " + << number_of_faces << " face(s)."); } Modified: hugin/branches/gsoc2008_integration/src/hugin1/hugin/TexCoordRemapper.cpp =================================================================== --- hugin/branches/gsoc2008_integration/src/hugin1/hugin/TexCoordRemapper.cpp 2008-09-24 10:41:35 UTC (rev 3456) +++ hugin/branches/gsoc2008_integration/src/hugin1/hugin/TexCoordRemapper.cpp 2008-09-24 16:21:15 UTC (rev 3457) @@ -44,8 +44,8 @@ // we want to make a remapped mesh, get the transformation we need: HuginBase::SrcPanoImage *src_img = view_state->GetSrcImage(image_number); transform.createTransform(*src_img, *(view_state->GetOptions())); - std::cout << "updating mesh for image " << image_number - << ", using faces spaced about " << scale << " units apart.\n"; + DEBUG_INFO("updating mesh for image " << image_number + << ", using faces spaced about " << scale << " units apart.\n"); // fill the map with transformed points. for (unsigned int x = 0; x < divisions_x; x++) { Modified: hugin/branches/gsoc2008_integration/src/hugin1/hugin/TextureManager.cpp =================================================================== --- hugin/branches/gsoc2008_integration/src/hugin1/hugin/TextureManager.cpp 2008-09-24 10:41:35 UTC (rev 3456) +++ hugin/branches/gsoc2008_integration/src/hugin1/hugin/TextureManager.cpp 2008-09-24 16:21:15 UTC (rev 3457) @@ -38,10 +38,6 @@ #include <GL/glew.h> #include <wx/platform.h> -#ifndef __WXMSW__ -#include <wx/utils.h> -#endif - #ifdef __WXMAC__ #include <OpenGL/gl.h> #include <OpenGL/glu.h> @@ -71,10 +67,11 @@ HuginBase::SrcPanoImage *img_p = view_state->GetSrcImage(image_number); TextureKey key(img_p, &photometric_correct); it = textures.find(key); + DEBUG_ASSERT(it != textures.end()); it->second.Bind(); if (it->second.GetUseAlpha()) { - // use an alpha blend if + // use an alpha blend if there is s mask for this image. glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); } @@ -105,11 +102,13 @@ glBlendFunc(GL_DST_COLOR, GL_ONE); glColor4f(1.0, 1.0, 1.0, 1.0); // double the brightness for colour components until it is almost - // right + // right, however limit it incase it is really bright. bool r, g, b; - while ( (r = (scale[0] > 2.0)) + unsigned short int count = 0; + while (( (r = (scale[0] > 2.0)) || (g = (scale[1] > 2.0)) || (b = (scale[2] > 2.0))) + && count < 9) { glColor4f(r ? 1.0 : 0.0, g ? 1.0 : 0.0, b ? 1.0 : 0.0, 1.0); glCallList(display_list); @@ -146,6 +145,7 @@ HuginBase::SrcPanoImage *img_p = view_state->GetSrcImage(image_number); TextureKey key(img_p, &photometric_correct); it = textures.find(key); + DEBUG_ASSERT(it != textures.end()); return it->second.GetNumber(); } @@ -184,7 +184,7 @@ HuginBase::PanoramaOptions *dest_img = view_state->GetOptions(); // Recalculuate the ideal image density if required // TODO tidy up once it works. - std::cout << "Updating texture sizes\n"; + DEBUG_INFO("Updating texture sizes."); // find the total of fields of view of the images, in degrees squared // we assume each image has the same density across all it's pixels double total_fov = 0.0; @@ -377,8 +377,8 @@ // maximum mip level tex_width_p > tex_height_p ? tex_width_p : tex_height_p, photometric_correct, - dest_img, - view_state->GetSrcImage(image_index)); + *dest_img, + *view_state->GetSrcImage(image_index)); } } // We should remove any images' texture when it is no longer in the panorama @@ -431,12 +431,13 @@ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_size); if (glGetError()) { - std::cout << "Cannot find maximum texture size!"; - return 4; + DEBUG_ERROR("Cannot find maximum texture size!"); + // opengl docs say 64 pixels square is the minimum size guranteed to be supported. + return 6; } - std::cout << "Max texture size supported is " << max_size; max_size_p = int(log2(max_size)); - std::cout << " (2^" << max_size_p << ")\n"; + DEBUG_INFO("Max texture size supported is " << max_size << + " (2^" << max_size_p << ")"); return max_size_p; } @@ -467,6 +468,7 @@ // remove it if it was not found if (!found) { + DEBUG_INFO("Removing old texture for " << tex->first.filename << "."); retry = true; textures.erase(tex); break; @@ -477,6 +479,8 @@ TextureManager::TextureInfo::TextureInfo() { + // we shouldn't be using this. It exists only to make std::map happy. + DEBUG_ASSERT(0); CreateTexture(); } @@ -496,13 +500,12 @@ glGenTextures(1, (GLuint*) &num); // we want to generate all levels of detail, they are all undefined. min_lod = 1000; - glBindTexture(GL_TEXTURE_2D, (GLuint) num); SetParameters(); } void TextureManager::TextureInfo::SetParameters() { - glBindTexture(GL_TEXTURE_2D, num); + Bind(); glEnable(GL_TEXTURE_2D); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); @@ -522,11 +525,11 @@ { has_anisotropic = true; glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &anisotropy); - std::cout << "Using anisotropic filtering at maximum value " - << anisotropy << ".\n"; + DEBUG_INFO("Using anisotropic filtering at maximum value " + << anisotropy); } else { has_anisotropic = false; - std::cout << "Anisotropic filtering is not available.\n"; + DEBUG_INFO("Anisotropic filtering is not available."); } checked_anisotropic = true; } @@ -538,8 +541,8 @@ GLenum error = glGetError(); if (error != GL_NO_ERROR) { - std::cout << "GL Error when setting texture parameters: " - << gluErrorString(error) << ".\n."; + DEBUG_ERROR("GL Error when setting texture parameters: " + << gluErrorString(error) << "."); } } @@ -557,10 +560,10 @@ // Note min and max refer to the mipmap levels, not the sizes of them. min has // the biggest size. void TextureManager::TextureInfo::DefineLevels(int min, - int max, + int max, bool photometric_correct, - HuginBase::PanoramaOptions *dest_img, - HuginBase::SrcPanoImage *src_img) + const HuginBase::PanoramaOptions &dest_img, + const HuginBase::SrcPanoImage &src_img) { // This might take a while, so show a busy cursor. wxBusyCursor busy_cursor; @@ -579,17 +582,17 @@ // time reading the texture and converting the numbers. (float and uint16) // remove some cache items if we are using lots of memory: ImageCache::getInstance().softFlush(); - std::cout << "Loading image\n"; - ImageCache::EntryPtr entry = ImageCache::getInstance().getImage( - src_img->getFilename()); - std::cout << "Converting to 8 bits\n"; + DEBUG_INFO("Loading image"); + std::string img_name = src_img.getFilename(); + ImageCache::EntryPtr entry = ImageCache::getInstance().getImage(img_name); + DEBUG_INFO("Converting to 8 bits"); boost::shared_ptr<vigra::BRGBImage> img = entry->get8BitImage(); boost::shared_ptr<vigra::BImage> mask = entry->mask; // first make the biggest mip level. int wo = 1 << (width_p - min), ho = 1 << (height_p - min); if (wo < 1) wo = 1; if (ho < 1) ho = 1; // use Vigra to resize image - std::cout << "Scaling image\n"; + DEBUG_INFO("Scaling image"); vigra::BRGBImage out_img(wo, ho); // also read in the mask. OpenGL requires that the mask is in the same array // as the colour data, but the ImageCache doesn't work in this way. @@ -616,7 +619,7 @@ { vigra::resizeImageLinearInterpolation(srcImageRange(*(entry->mask)), destImageRange(out_alpha)); - }/**/ + }*/ // much faster. It shouldn't be so bad after it vigra::resizeImageNoInterpolation(srcImageRange(*img), @@ -629,19 +632,19 @@ // now perform photometric correction if (photometric_correct) { - std::cout << "Performing photometric correction\n"; + DEBUG_INFO("Performing photometric correction"); // setup photometric transform for this image type // this corrects for response curve, white balance, exposure and // radial vignetting HuginBase::Photometric::InvResponseTransform <unsigned char, double> - invResponse(*src_img); + invResponse(src_img); // Assume LDR for now. // if (m_destImg.outputMode == PanoramaOptions::OUTPUT_LDR) { // select exposure and response curve for LDR output std::vector<double> outLut; - vigra_ext::EMoR::createEMoRLUT(dest_img->outputEMoRParams, outLut); + vigra_ext::EMoR::createEMoRLUT(dest_img.outputEMoRParams, outLut); vigra_ext::enforceMonotonicity(outLut); - invResponse.setOutput(1.0/pow(2.0,dest_img->outputExposureValue), + invResponse.setOutput(1.0/pow(2.0,dest_img.outputExposureValue), outLut, 255.0); /*} else { // HDR output. not sure how that would be handled by the opengl @@ -652,8 +655,8 @@ invResponse.setHDROutput(); }*/ // now perform the corrections - double scale_x = (double) src_img->getSize().width() / (double) wo, - scale_y = (double) src_img->getSize().height() / (double) ho; + double scale_x = (double) src_img.getSize().width() / (double) wo, + scale_y = (double) src_img.getSize().height() / (double) ho; for (int x = 0; x < wo; x++) { for (int y = 0; y < ho; y++) @@ -671,9 +674,9 @@ // this will use a box filter. // dependent on OpenGL 1.3. Might need an alternative for 1.2. // TODO use texture compresion? - std::cout << "Defining mipmap levels " << min << " to " << max + DEBUG_INFO("Defining mipmap levels " << min << " to " << max << " of texture " << num << ", starting with a size of " - << wo << " by " << ho << ".\n"; + << wo << " by " << ho << "."); GLint error; if (has_mask) { @@ -707,17 +710,17 @@ } if (error) { - std::cout << "GLU Error when building mipmap levels: " - << gluErrorString(error) << ".\n"; + DEBUG_ERROR("GLU Error when building mipmap levels: " + << gluErrorString(error) << "."); } error = glGetError(); if (error != GL_NO_ERROR) { - std::cout << "GL Error when bulding mipmap levels: " - << gluErrorString(error) << ".\n."; + DEBUG_ERROR("GL Error when bulding mipmap levels: " + << gluErrorString(error) << "."); } SetParameters(); - std::cout << "Finsihed loading texture.\n"; + DEBUG_INFO("Finsihed loading texture."); } void TextureManager::TextureInfo::SetMaxLevel(int level) @@ -732,8 +735,8 @@ GLenum error = glGetError(); if (error != GL_NO_ERROR) { - std::cout << "Error when setting the base mipmap level: " - << gluErrorString(error) << ".\n."; + DEBUG_ERROR("Error when setting the base mipmap level: " + << gluErrorString(error) << "."); } } Modified: hugin/branches/gsoc2008_integration/src/hugin1/hugin/TextureManager.h =================================================================== --- hugin/branches/gsoc2008_integration/src/hugin1/hugin/TextureManager.h 2008-09-24 10:41:35 UTC (rev 3456) +++ hugin/branches/gsoc2008_integration/src/hugin1/hugin/TextureManager.h 2008-09-24 16:21:15 UTC (rev 3457) @@ -91,8 +91,8 @@ void DefineLevels(int min, int max, bool photometric_correct, - HuginBase::PanoramaOptions *dest_img, - HuginBase::SrcPanoImage *state); + const HuginBase::PanoramaOptions &dest_img, + const HuginBase::SrcPanoImage &state); void SetMaxLevel(int level); void Bind(); unsigned int GetNumber() {return num;}; Modified: hugin/branches/gsoc2008_integration/src/hugin1/hugin/VertexCoordRemapper.cpp =================================================================== --- hugin/branches/gsoc2008_integration/src/hugin1/hugin/VertexCoordRemapper.cpp 2008-09-24 10:41:35 UTC (rev 3456) +++ hugin/branches/gsoc2008_integration/src/hugin1/hugin/VertexCoordRemapper.cpp 2008-09-24 16:21:15 UTC (rev 3457) @@ -117,8 +117,8 @@ HuginBase::SrcPanoImage *src = view_state->GetSrcImage(image_number); transform.createInvTransform(*src, *(view_state->GetOptions())); // use the scale to determine edge lengths in pixels for subdivision - std::cout << "updating mesh for image " << image_number << ", using scale " - << scale << ".\n"; + DEBUG_INFO("updating mesh for image " << image_number << ", using scale " + << scale << ".\n"); // find key points used for +/- 180 degree boundary correction // {x|y}_add_360's are added to a value near the left/top boundary to get // the corresponding point over the right/bottom boundary. @@ -297,7 +297,6 @@ void VertexCoordRemapper::RecursiveUpdate(unsigned int node_num, unsigned int stretch_x, unsigned stretch_y) { - // std::cout << "Updating node " << node_num <<".\n"; // find where we are and what we are mapping // TODO? GetPosition is called by GetInputCoordinates, reuse results? unsigned int x, y, row_size, depth; @@ -403,7 +402,6 @@ valid[i][j] = true; } } - //std::cout << "(" << tex_coords[i][j][0] << ", " << tex_coords[i][j][1] << ") |-> (" << node->verts[i][j][0] << ", " << node->verts[i][j][1] << ")\n"; } } @@ -440,7 +438,6 @@ y *= 2; row_size *= 2; depth++; - // std::cout << "Recursively updating child nodes.\n"; // the top left is always generated RecursiveUpdate(tree.GetIndex(x, y, row_size, depth), stretch_x, stretch_y); @@ -804,8 +801,6 @@ depth++; count += 1 << (depth * 2); } - // std::cout << "Found node " << node_num << "'s depth to be " << depth - // << ".\n"; return depth; } @@ -827,9 +822,6 @@ unsigned int position_id = node_num - sub; x = position_id % row_size; y = position_id / row_size; - /*std::cout << "Found node " << node_num << "'s position to be " << x << ", " - << y << " of depth " << depth << " (which has a row size of " - << row_size << ").\n";*/ } unsigned int VertexCoordRemapper::Tree::GetIndex(const unsigned int x, @@ -837,21 +829,18 @@ const unsigned int row_size, unsigned int depth) { - unsigned int add = 0;//, old_depth = depth; + unsigned int add = 0; while (depth) { depth--; add += 1 << (depth * 2); } - //std::cout << "Calculated that the node at " << x << ", " <<y << " of depth " - // << old_depth << " to be " << add + x + y *row_size << ".\n"; return add + x + y * row_size; } void VertexCoordRemapper::Tree::GetInputCoordinates(const unsigned int node_num, double coords[2][2][2]) { - // std::cout << "Finding input coordinates for node " << node_num <<".\n"; // find the coordinates of each point at the vertices in the original image. // this is used to look up the remapped coordinates and provide texture // coordinates. @@ -903,7 +892,6 @@ coords[i][j][1] = coords[i][j][1] * y_crop_scale + y_crop_offs; } } - // std::cout << "Node " << node_num << " covers reactangle from (" << coords[0][0][0] << ", " << coords[0][0][1] << ") to (" << coords[1][1][0] << ", " << coords[1][1][1] << ").\n"; } void VertexCoordRemapper::Tree::ResetIndex() @@ -913,8 +901,6 @@ unsigned int VertexCoordRemapper::Tree::GetNext() { - // unsigned int old_tree_node = cur_tree_node; - // std::cout << "Finding leaf node after " << cur_tree_node <<".\n"; // depth first search for leaf nodes with cur_tree_node unsigned int x, y, row_size, depth; GetPosition(cur_tree_node, x, y, row_size, depth); @@ -967,7 +953,6 @@ }; } } - //std::cout << "Moved from node " << old_tree_node << " to node " << cur_tree_node << ", then trailed down to the leaf at "; // find the first leaf on this subtree, taking top left every time. while (nodes[cur_tree_node].flags & (split_flag_x | split_flag_y)) { @@ -977,7 +962,6 @@ depth++; cur_tree_node = GetIndex(x, y, row_size, depth); } - // std::cout << cur_tree_node << ".\n"; return cur_tree_node; } @@ -1042,10 +1026,6 @@ double xf = (double) rem_x / (double) step_x; double yf = (double) rem_y / (double) step_y; - /*std::cout << "To get (" << src_x << ", " << src_y << ") of depth " - << max_depth << " we use (" << no_x << ", " << no_y - << ") of depth " << depth << " interpolating by x:" << xf - << ", y: " << yf << ".\n";*/ double top_x = (1.0 - xf) * nodes[node_id].verts[0][0][0] + xf * nodes[node_id].verts[1][0][0], bottom_x = (1-.0 - xf) * nodes[node_id].verts[0][1][0] Modified: hugin/branches/gsoc2008_integration/src/hugin1/hugin/ViewState.cpp =================================================================== --- hugin/branches/gsoc2008_integration/src/hugin1/hugin/ViewState.cpp 2008-09-24 10:41:35 UTC (rev 3456) +++ hugin/branches/gsoc2008_integration/src/hugin1/hugin/ViewState.cpp 2008-09-24 16:21:15 UTC (rev 3457) @@ -204,10 +204,10 @@ || new_img->getHFOV() != img->getHFOV() || new_img->getProjection() != img->getProjection() || new_img->getLensNr() != img->getLensNr() - || !(new_img->getShear() == img->getShear()) + || new_img->getShear() != img->getShear() // FIXME are these photometric or geometric? - || !(new_img->getRadialDistortionCenterShift() - == img->getRadialDistortionCenterShift()) + || new_img->getRadialDistortionCenterShift() + == img->getRadialDistortionCenterShift() || new_img->getRadialDistortion() != img->getRadialDistortion() || new_img->getCropRect() != img->getCropRect() ) @@ -220,7 +220,25 @@ dirty_image_sizes = true; } } - // the photometric changes are handled by the texture manager. + // photometric adjustments + if ( new_img->getVigCorrMode() != img->getVigCorrMode() + || new_img->getRadialVigCorrCoeff() != img->getRadialVigCorrCoeff() + || new_img->getRadialVigCorrCenterShift() != + img->getRadialVigCorrCenterShift() + || new_img->getExposureValue() != img->getExposureValue() + || new_img->getGamma() != img->getGamma() + || new_img->getWhiteBalanceRed() != img->getWhiteBalanceRed() + || new_img->getWhiteBalanceBlue() != img->getWhiteBalanceBlue() + || new_img->getResponseType() != img->getResponseType() + ) + { + // real time photometric correction just needs a redraw. + /* full photometric correction will be redone automattically by the + TextureManager next redraw. */ + /* FIXME only white balance and exposure are actually used for + real-time photometric correction. */ + dirty_draw = true; + } } // store the new options img_states[image_nr] = *new_img; Modified: hugin/branches/gsoc2008_integration/src/hugin_base/hugin_math/hugin_math.h =================================================================== --- hugin/branches/gsoc2008_integration/src/hugin_base/hugin_math/hugin_math.h 2008-09-24 10:41:35 UTC (rev 3456) +++ hugin/branches/gsoc2008_integration/src/hugin_base/hugin_math/hugin_math.h 2008-09-24 16:21:15 UTC (rev 3457) @@ -117,6 +117,11 @@ { return x == rhs.x && y == rhs.y; } + + bool operator!=(TDiff2D rhs) const + { + return x != rhs.x || y != rhs.y; + } TDiff2D operator+(TDiff2D rhs) const { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |