Bruno Postle wrote:
> This is a bug and should go in the tracker.
> 
> I suspect that Enblend -> use alternative Enblend/Enfuse program is 
> similarly broken.
> 

actually it is more than a bug. It's a mess.

I've been working on Andrew's nona-gpu branch as this is the next 
feature we want to release. I studied all of his commit and understood 
pretty quickly that he neatly self-contained everything in nona and that 
we need a way to make it accessible from the Hugin GUI, i.e. pass the -g 
switch (which is similar to passing the -t switch). I figured out that 
by looking at how Hugin handles similar switches I can drill through the 
different stages and implement the missing code.

First I decided where to put the choice. The GPU is a system-wide 
choice, so it makes sense to put it in the preferences (as opposed to 
put it in the nona options on the stitcher tab, which I also considered 
because I thought I could use example code from there). On the stitcher 
tab I found that some option go into the project file (and are 
saved/implemented). others *should* go into the makefile.

To debug my work, I mutilated Andrew's nona (sorry Andrew). Where he 
inserted his code with

             case 'g':
                 useGPU = 1;

I replaced it with a very gross way to know that I passed the right switch:

             case 'g':
                 cerr << "nona was called with the right switch" << 
std::endl;
                 abort();
                 useGPU = 1;

Next I added a preference. This was quite simple and worked well: it is 
stored, I can set and unset it, and I've learned a bit about Hugin's 
preferences panel.

Next I looked at where the Makefile is created. I was able to create a 
Makefile with the -g nona switch when hitting "Save", but not when 
hitting "Stitch Now".

I tried to follow the Stitch Now button and to these days I do not 
understand the logic. It is only a few lines, but it looks to me like 
Russian Dolls. Why so many calls into each other I do not understand 
yet. And why not using the same Makefile generation for "Save" and for 
"Stitch Now" neither.

All of this has stretched over the past two weeks, and I documented it 
only partially. This is so frustrating that I am toying with the idea of 
rewriting a GUI to the different CLI tools... in Python.

there is plenty more broken in that part of the code that should 
actually be trivial.

Yuv

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/hugin-ptx
-~----------~----~----~----~------~----~------~--~---

Reply via email to