Text archives Help
- From: Li-Ta Lo <
>
- To:
- Subject: [Manta] Re: Re: Dynamically changing rendering stack?
- Date: Thu, 18 Sep 2008 15:45:03 -0600
- Organization: Los Alamos National Lab
On Thu, 2008-09-18 at 15:24 -0600, Abe Stephens wrote:
>
Yes, just make the change in a transaction.
>
Do you mean putting Factory::selectShadowAlgorithm() in a transaction?
Why does (only) Factory::selectImageType() has its own callback?
bool Factory::selectImageType(const string& spec) const
{
string name;
vector<string> args;
parseSpec(spec, name, args);
ImageCreatorMapType::const_iterator iter = imageCreators.find(name);
if(iter == imageCreators.end())
return 0;
ImageCreator creator = iter->second;
// Create a static method callback.
manta_interface->setCreateImageCallback( Callback::create(
&Factory::createImageCallback,
creator,
args ) );
return true;
}
void Factory::createImageCallback( bool stereo, int xres, int yres,
Image *& image, ImageCreator creator, vector<string> args ) {
// Invoke the legacy image creator.
image = (creator)(args, stereo, xres, yres);
}
Ollie
Archive powered by MHonArc 2.6.16.