Text archives Help
- From: abe@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r509 - in branches/AFR: Engine/Control Engine/ImageTraversers StandAlone
- Date: Sat, 27 Aug 2005 13:56:30 -0600 (MDT)
Author: abe
Date: Sat Aug 27 13:56:29 2005
New Revision: 509
Modified:
branches/AFR/Engine/Control/AFRPipeline.cc
branches/AFR/Engine/Control/RTRT.cc
branches/AFR/Engine/ImageTraversers/AFImageTraverser.cc
branches/AFR/StandAlone/manta.cc
Log:
(Hopefully) fixed race condition in conditional barriers.
Added -chunk, command line now: -imagetraverser afr( -inner <real> -chunk
<size> )
M Engine/Control/RTRT.cc
M Engine/Control/AFRPipeline.cc
M Engine/ImageTraversers/AFImageTraverser.cc
Merged change to benchmark helper from itanium2
M StandAlone/manta.cc
Modified: branches/AFR/Engine/Control/AFRPipeline.cc
==============================================================================
--- branches/AFR/Engine/Control/AFRPipeline.cc (original)
+++ branches/AFR/Engine/Control/AFRPipeline.cc Sat Aug 27 13:56:29 2005
@@ -283,8 +283,9 @@
///////////////////////////////////////////////////////////////////////////////
void AFRPipeline::internalRenderLoop(int proc, bool lateComerFlag)
{
- bool changed = true;
- bool firstFrame = true;
+ static bool changed = true;
+ static bool firstFrame = true;
+ static bool wait_for_transactions = false;
Real last_samples = 0.0;
@@ -323,32 +324,37 @@
// that could possibly change state and get everything set up to
// render the next frame
- // Check to see if the barrier is necessary??
+ // Check to see of the barrier is necessary due to a state change.
if ( transactions.size() || pipelineNeedsSetup || firstFrame ) {
- outer_loop_barrier.wait(workersRendering);
- }
- firstFrame = false;
+ // Re sync after state changes.
+ if (proc == 0) {
+ wait_for_transactions = true;
+ }
- // Copy over the frame state
- if(proc == 0) {
- renderFrameState = animFrameState;
- }
+ outer_loop_barrier.wait( workersRendering );
+ // Copy over the frame state
+ if(proc == 0) {
+ firstFrame = false;
+ renderFrameState = animFrameState;
+ }
+ }
+
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
// Outer Loop: Pipeline Stage 1.
// Callbacks & Transactions.
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
- changed=false;
doParallelAnimationCallbacks(changed, proc, workersAnimAndImage);
doSerialAnimationCallbacks (changed, proc, workersAnimAndImage);
// Post Transactions.
- if(proc == 0)
+ if(proc == 0) {
postTransactions(changed);
+ }
// What is "changed" used for?
@@ -366,19 +372,25 @@
// Note doIdleModeCallbacks is omitted -- the pipeline should
never be idle.
- if (pipelineNeedsSetup) {
+ if (pipelineNeedsSetup || wait_for_transactions /*||
changed*/) {
// Negotiate the image pipeline for each channel
- if(proc == 0){
+ if ((proc == 0) && (pipelineNeedsSetup)) {
setupPipelines(numProcs);
resizeImages(renderFrameState.frameNumber);
- }
+ }
+ // Reset barrier conditions.
+ if (proc == 0) {
+ pipelineNeedsSetup = false;
+ wait_for_transactions = false;
+ changed = false;
+ }
+
// Wait for all of the other processors to finish
setup.
pipeline_setup_barrier.wait(numProcs);
-
- pipelineNeedsSetup = false;
}
+
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
Modified: branches/AFR/Engine/Control/RTRT.cc
==============================================================================
--- branches/AFR/Engine/Control/RTRT.cc (original)
+++ branches/AFR/Engine/Control/RTRT.cc Sat Aug 27 13:56:29 2005
@@ -54,24 +54,24 @@
namespace Manta {
RTRTInterface* createRTRT()
- {
+{
return new RTRT();
- }
+}
- bool bool_or(const bool& b1, const bool& b2) {
- return b1 || b2;
- }
- void registerKnownComponents(RTRTInterface* rtrt);
+bool bool_or(const bool& b1, const bool& b2) {
+ return b1 || b2;
+}
+void registerKnownComponents(RTRTInterface* rtrt);
}
RTRT::RTRT()
- : runningLock("RTRT running mutex"),
- callbackLock("RTRT callback r/w lock"),
- barrier1("RTRT frame barrier #1"),
- barrier2("RTRT frame barrier #2"),
- barrier3("RTRT frame barrier #3"),
- transaction_lock("RTRT transaction lock"),
- ids("RTRT id counter", 1)
+: runningLock("RTRT running mutex"),
+callbackLock("RTRT callback r/w lock"),
+barrier1("RTRT frame barrier #1"),
+barrier2("RTRT frame barrier #2"),
+barrier3("RTRT frame barrier #3"),
+transaction_lock("RTRT transaction lock"),
+ids("RTRT id counter", 1)
{
workersWanted=0;
workersRendering=0;
@@ -97,7 +97,7 @@
Channel* channel = *iter;
delete channel->display;
for(vector<Image*>::iterator iter = channel->images.begin();
- iter != channel->images.end(); iter++)
+ iter != channel->images.end(); iter++)
delete *iter;
}
delete currentImageTraverser;
@@ -110,7 +110,7 @@
{
if(newNumWorkers <= 0)
throw IllegalValue<int>("RTRT::changeNumWorkers, number of workers
should be > 0", newNumWorkers);
-
+
workersWanted=newNumWorkers;
}
@@ -120,7 +120,7 @@
}
void RTRT::addOneShotCallback(Whence /*whence*/, long frame,
- CallbackBase_2Data<int, int>* callback)
+ CallbackBase_2Data<int, int>* callback)
{
#if NOTFINISHED
// What about adding callbacks during anim cycle?
@@ -166,33 +166,33 @@
__FILE__, __LINE__);
running=true;
runningLock.unlock();
-
+
// Preprocess
LightSet* lights = scene->getLights();
PreprocessContext context(this, lights);
lights->preprocess(context);
scene->getBackground()->preprocess(context);
scene->getObject()->preprocess(context);
-
+
if(!currentImageCreator)
throw InvalidState("Image type was not selected", __FILE__, __LINE__);
-
+
#if NOTFINISHED
check for existence of other components;
#endif
-
- if(workersWanted <= 0){
- runningLock.unlock();
- throw IllegalValue<int>("workersWanted should be positive",
workersWanted);
- }
-
+
+ if(workersWanted <= 0){
+ runningLock.unlock();
+ throw IllegalValue<int>("workersWanted should be positive",
workersWanted);
+ }
+
if(workersRendering != 0){
runningLock.unlock();
throw IllegalValue<int>("workersRendering should be zero",
workersRendering);
}
-
+
workersRendering=workersWanted;
-
+
// Start up all of the Worker threads.
workers.resize(workersWanted);
changedFlags.resize(workersWanted);
@@ -201,7 +201,7 @@
ostringstream name;
name << "RTRT Worker " << i;
Thread* t = new Thread(new Worker(this, i, false), name.str().c_str(),
- 0, Thread::NotActivated);
+ 0, Thread::NotActivated);
t->setStackSize(RENDER_THREAD_STACKSIZE);
t->activate(false);
workers[i] = t;
@@ -231,30 +231,30 @@
if(proc == 0){
animFrameState.frameNumber++;
switch(timeMode){
- case RealTime:
- animFrameState.frameTime = Time::currentSeconds() * timeScale;
- break;
- case FixedRate:
- animFrameState.frameTime =
static_cast<double>(animFrameState.frameNumber) / frameRate;
- break;
- case Static:
- break;
+ case RealTime:
+ animFrameState.frameTime = Time::currentSeconds() * timeScale;
+ break;
+ case FixedRate:
+ animFrameState.frameTime =
static_cast<double>(animFrameState.frameNumber) / frameRate;
+ break;
+ case Static:
+ break;
}
// Update the number of workers to be used for the animation and
// image display portion
workersAnimAndImage = workersRendering;
}
-
+
// Start of non-rendering portion of the loop. Make callbacks
// that could possibly change state and get everything set up to
// render the next frame
barrier1.wait(workersRendering);
-
+
// Copy over the frame state
if(proc == 0)
renderFrameState = animFrameState;
-
+
// Do callbacks
changed=false;
//callbackLock.readLock();
@@ -262,56 +262,56 @@
doSerialAnimationCallbacks(changed, proc, workersAnimAndImage);
if(proc == 0)
postTransactions(changed);
-
+
if(!firstFrame){
for(int index = 0;index < static_cast<int>(channels.size());index++){
- Channel* channel = channels[index];
- RenderContext myContext(this, index, proc, workersAnimAndImage,
- &animFrameState,
- currentLoadBalancer, currentPixelSampler,
- currentRenderer, currentShadowAlgorithm,
- channel->camera, scene);
- currentImageTraverser->setupFrame(myContext);
+ Channel* channel = channels[index];
+ RenderContext myContext(this, index, proc, workersAnimAndImage,
+ &animFrameState,
+ currentLoadBalancer, currentPixelSampler,
+ currentRenderer, currentShadowAlgorithm,
+ channel->camera, scene);
+ currentImageTraverser->setupFrame(myContext);
}
}
//callbackLock.readUnlock();
-
+
// P0 resize images for next frame
if(proc == 0)
resizeImages(animFrameState.frameNumber);
-
+
// Update the number of workers to be used for the rendering of this
frame
if(proc == 0){
// Copy the number out of memory - we want to read it only once
// in case it changes
int newWorkers = workersWanted;
if(newWorkers > workersRendering){
- // We must start new threads, if the number increased. Mark
- // these threads as "latecomers", which will skip to the rendering
- // section of this loop for the first frame
- workersChanged = true;
- workers.resize(newWorkers);
- int oldworkers = workersRendering;
- workersRendering = workersWanted;
- for(int i=oldworkers;i<newWorkers;i++){
- ostringstream name;
- name << "RTRT Worker " << i;
- workers[i] = new Thread(new Worker(this, i, true),
name.str().c_str(),
- 0, Thread::NotActivated);
- workers[i]->setStackSize(RENDER_THREAD_STACKSIZE);
- workers[i]->activate(false);
- }
+ // We must start new threads, if the number increased. Mark
+ // these threads as "latecomers", which will skip to the rendering
+ // section of this loop for the first frame
+ workersChanged = true;
+ workers.resize(newWorkers);
+ int oldworkers = workersRendering;
+ workersRendering = workersWanted;
+ for(int i=oldworkers;i<newWorkers;i++){
+ ostringstream name;
+ name << "RTRT Worker " << i;
+ workers[i] = new Thread(new Worker(this, i, true),
name.str().c_str(),
+ 0, Thread::NotActivated);
+ workers[i]->setStackSize(RENDER_THREAD_STACKSIZE);
+ workers[i]->activate(false);
+ }
} else if(newWorkers < workersRendering) {
- workersChanged = true;
- workersRendering = workersWanted;
+ workersChanged = true;
+ workersRendering = workersWanted;
} else {
- // Don't set it to false if it is already false - avoids
- // flushing the other caches
- if(workersChanged)
- workersChanged = false;
+ // Don't set it to false if it is already false - avoids
+ // flushing the other caches
+ if(workersChanged)
+ workersChanged = false;
}
}
-
+
// New scope to control variable lifetimes
{
// Reduce on changed flag
@@ -322,17 +322,17 @@
barrier2.wait(numProcs);
changed=false;
for(int i=0;i<numProcs;i++){
- if(changedFlags[i].changed){
- changed=true;
- break;
- }
+ if(changedFlags[i].changed){
+ changed=true;
+ break;
+ }
}
-
+
if(changed != lastChanged || firstFrame){
if(proc == 0)
doIdleModeCallbacks(changed, firstFrame, pipelineNeedsSetup,
proc, numProcs);
- barrier2.wait(numProcs);
+ barrier2.wait(numProcs);
lastChanged = changed;
}
if(firstFrame)
@@ -340,84 +340,84 @@
// P0 process deletions
if(proc == 0){
- //callbackLock.readLock();
- processDeletions();
- //callbackLock.readUnlock();
+ //callbackLock.readLock();
+ processDeletions();
+ //callbackLock.readUnlock();
}
-
+
if(pipelineNeedsSetup){
- // Negotiate the image pipeline for each channel
- if(proc == 0){
- setupPipelines(numProcs);
- resizeImages(renderFrameState.frameNumber);
- }
- for(int index = 0;index < static_cast<int>(channels.size());index++){
- Channel* channel = channels[index];
- RenderContext myContext(this, index, proc, workersAnimAndImage,
- &animFrameState,
- currentLoadBalancer, currentPixelSampler,
- currentRenderer, currentShadowAlgorithm,
- channel->camera, scene);
- currentImageTraverser->setupFrame(myContext);
- }
- barrier3.wait(numProcs);
- pipelineNeedsSetup = false;
+ // Negotiate the image pipeline for each channel
+ if(proc == 0){
+ setupPipelines(numProcs);
+ resizeImages(renderFrameState.frameNumber);
+ }
+ for(int index = 0;index < static_cast<int>(channels.size());index++){
+ Channel* channel = channels[index];
+ RenderContext myContext(this, index, proc, workersAnimAndImage,
+ &animFrameState,
+ currentLoadBalancer, currentPixelSampler,
+ currentRenderer, currentShadowAlgorithm,
+ channel->camera, scene);
+ currentImageTraverser->setupFrame(myContext);
+ }
+ barrier3.wait(numProcs);
+ pipelineNeedsSetup = false;
}
-
+
// Image display, if image is valid
for(ChannelListType::iterator iter = channels.begin();
- iter != channels.end(); iter++){
- Channel* channel = *iter;
- long displayFrame =
(renderFrameState.frameNumber-1)%channel->pipelineDepth;
- Image* image = channel->images[displayFrame];
- if(image && image->isValid()){
- DisplayContext myContext(proc, workersAnimAndImage);
- channel->display->displayImage(myContext, image);
- }
+ iter != channels.end(); iter++){
+ Channel* channel = *iter;
+ long displayFrame =
(renderFrameState.frameNumber-1)%channel->pipelineDepth;
+ Image* image = channel->images[displayFrame];
+ if(image && image->isValid()){
+ DisplayContext myContext(proc, workersAnimAndImage);
+ channel->display->displayImage(myContext, image);
+ }
}
-
+
// Possibly change # of workers
if(proc == 0 && workersRendering < numProcs){
- for(int i = workersRendering; i<numProcs; i++){
- // Clean up after worker. Don't attempt to join with self
- if(i != 0)
- workers[i]->join();
- }
- workers.resize(workersRendering == 0?1:workersRendering);
+ for(int i = workersRendering; i<numProcs; i++){
+ // Clean up after worker. Don't attempt to join with self
+ if(i != 0)
+ workers[i]->join();
+ }
+ workers.resize(workersRendering == 0?1:workersRendering);
}
if(proc >= workersRendering)
- break;
+ break;
}
- skipToRendering:
- // Pre-render callbacks
- //callbackLock.readLock();
- doParallelPreRenderCallbacks(proc, workersRendering);
+skipToRendering:
+ // Pre-render callbacks
+ //callbackLock.readLock();
+ doParallelPreRenderCallbacks(proc, workersRendering);
doSerialPreRenderCallbacks(proc, workersRendering);
//callbackLock.readUnlock();
-
+
if(workersChanged){
barrier3.wait(workersRendering);
if(proc == 0)
- changedFlags.resize(workersRendering);
+ changedFlags.resize(workersRendering);
}
-
+
#if NOTFINISHED
//if(!idle){
#endif
{
for(int index = 0;index < static_cast<int>(channels.size());index++){
- Channel* channel = channels[index];
- long renderFrame =
renderFrameState.frameNumber%channel->pipelineDepth;
- Image* image = channel->images[renderFrame];
- RenderContext myContext(this, index, proc, workersRendering,
&renderFrameState,
- currentLoadBalancer, currentPixelSampler,
- currentRenderer, currentShadowAlgorithm,
- channel->camera, scene);
- currentImageTraverser->renderImage(myContext, image);
+ Channel* channel = channels[index];
+ long renderFrame =
renderFrameState.frameNumber%channel->pipelineDepth;
+ Image* image = channel->images[renderFrame];
+ RenderContext myContext(this, index, proc, workersRendering,
&renderFrameState,
+ currentLoadBalancer, currentPixelSampler,
+ currentRenderer, currentShadowAlgorithm,
+ channel->camera, scene);
+ currentImageTraverser->renderImage(myContext, image);
}
}
#if NOTFINISHED
- how to set rendering complete flag?;
+ how to set rendering complete flag?;
} else {
//callbackLock.readLock();
idle callbacks;
@@ -464,19 +464,19 @@
transaction_lock.lock();
changed = true;
for(TransactionListType::iterator iter = transactions.begin();
- iter != transactions.end(); iter++){
+ iter != transactions.end(); iter++){
TransactionBase* transaction = *iter;
if(verbose_transactions){
- cerr << "Apply transaction: " << transaction->getName() << " : ";
- transaction->printValue(cerr);
- cerr << " : ";
- transaction->printOp(cerr);
- cerr << " : ";
+ cerr << "Apply transaction: " << transaction->getName() << " : ";
+ transaction->printValue(cerr);
+ cerr << " : ";
+ transaction->printOp(cerr);
+ cerr << " : ";
}
transaction->apply();
if(verbose_transactions){
- transaction->printValue(cerr);
- cerr << '\n';
+ transaction->printValue(cerr);
+ cerr << '\n';
}
delete transaction;
}
@@ -613,15 +613,15 @@
Channel* channel = channels[index];
SetupContext context(this, index, numChannels, 0, numProcs,
channel->stereo, channel->xres, channel->yres,
- currentLoadBalancer, currentPixelSampler,
+ currentLoadBalancer, currentPixelSampler,
currentRenderer);
int iteration = 100;
do {
context.setChanged(false);
context.clearMasterWindow();
for(vector<SetupCallback*>::iterator iter = setupCallbacks.begin();
- iter != setupCallbacks.end(); iter++)
- (*iter)->setupDisplayChannel(context);
+ iter != setupCallbacks.end(); iter++)
+ (*iter)->setupDisplayChannel(context);
currentImageTraverser->setupDisplayChannel(context);
channel->display->setupDisplayChannel(context);
} while(context.isChanged() && --iteration > 0);
@@ -633,7 +633,7 @@
throw IllegalValue<int>("Resolution should be positive",
channel->xres);
if(channel->yres <= 0)
throw IllegalValue<int>("Resolution should be positive",
channel->yres);
-
+
if(context.getMinDepth() > context.getMaxDepth())
throw InternalError("Pipeline depth negotiation failed",
__FILE__, __LINE__);
@@ -650,7 +650,7 @@
channel->images.resize(depth);
}
}
-
+
void RTRT::resizeImages(long frame)
{
for(ChannelListType::iterator iter = channels.begin();
@@ -665,13 +665,13 @@
if(!channel->images[which] || channel->stereo != stereo
|| channel->xres != xres || channel->yres != yres){
if(channel->images[which])
- delete channel->images[which];
+ delete channel->images[which];
ImageCreator creator = channel->imageCreator;
if(!creator)
- creator = currentImageCreator;
+ creator = currentImageCreator;
channel->images[which] = (creator)(currentImageCreatorArgs,
- channel->stereo,
- channel->xres, channel->yres);
+ channel->stereo,
+ channel->xres, channel->yres);
} else {
if (channel->pipelineDepth > 1)
channel->images[which]->setValid(false);
@@ -939,7 +939,7 @@
string name;
vector<string> args;
parseSpec(spec, name, args);
-
+
// Pull off the suffix...
string::size_type dot = name.rfind('.');
string suffix;
@@ -949,7 +949,7 @@
suffix = name.substr(dot+1);
}
Scene* newScene = 0;
-
+
// These are to try and guess what the shared library extension is
// on various systems.
string system_suffix;
@@ -960,7 +960,7 @@
#else
system_suffix = "so";
#endif
-
+
std::cout << "Scene suffix: " << suffix << std::endl;
if((suffix == "mo") || (suffix == "so") || (suffix == "dylib") ||
@@ -976,7 +976,7 @@
std::cout << "Appending "<<system_suffix<<" to scene" << std::endl;
newScene = readMOScene(name+"."+system_suffix, args, false);
-
+
#if 0
// This looks redundant, going to nix it.
if(!newScene){
@@ -1027,7 +1027,7 @@
}
Scene* RTRT::readMOScene(const string& name, const vector<string>& args,
- bool printErrors)
+ bool printErrors)
{
vector<string> dirs = split_string(scenePath, ':');
for(vector<string>::iterator dir = dirs.begin(); dir != dirs.end(); dir++){
@@ -1035,22 +1035,22 @@
struct stat statbuf;
if(stat(fullname.c_str(), &statbuf) != 0){
if(printErrors){
- cerr << "Error reading " << fullname << ": " << strerror(errno) <<
'\n';
+ cerr << "Error reading " << fullname << ": " << strerror(errno) <<
'\n';
}
continue;
}
void* handle=dlopen(fullname.c_str(), RTLD_NOW);
if(!handle){
if(printErrors){
- cerr << "Error opening scene: " << fullname << '\n';
- cerr << dlerror() << '\n';
+ cerr << "Error opening scene: " << fullname << '\n';
+ cerr << dlerror() << '\n';
}
continue;
}
void* scene_fn=dlsym(handle, "make_scene");
if(!scene_fn){
if(printErrors){
- cerr << "Scene file found, but make_scene() function not found\n";
+ cerr << "Scene file found, but make_scene() function not found\n";
}
// If we get here, we fail so that we don't keep searching the path
// for another scene
@@ -1063,7 +1063,7 @@
Scene* scene=(*make_scene)(context, args);
if(!scene){
if(printErrors)
- cerr << "scene " << name << " did not produce a scene\n";
+ cerr << "scene " << name << " did not produce a scene\n";
return 0;
}
return scene;
Modified: branches/AFR/Engine/ImageTraversers/AFImageTraverser.cc
==============================================================================
--- branches/AFR/Engine/ImageTraversers/AFImageTraverser.cc (original)
+++ branches/AFR/Engine/ImageTraversers/AFImageTraverser.cc Sat Aug 27
13:56:29 2005
@@ -47,7 +47,8 @@
AFImageTraverser::AFImageTraverser(const vector<string>& args) :
myRandomNumber( 0 ),
- inner_loop_time( 0.06 )
+ inner_loop_time( 0.06 ),
+ chunk_size( 256 )
{
for (int i=0;i<args.size();++i) {
if (args[i] == "-inner") {
@@ -55,6 +56,11 @@
throw IllegalArgument("-inner <Real>", i, args);
}
}
+ if (args[i] == "-chunk") {
+ if (!getArg( i, args, chunk_size )) {
+ throw IllegalArgument("-chunk <Int>", i, args);
+ }
+ }
}
}
@@ -124,7 +130,8 @@
// set a mean number of tiles, i.e. cut at middle of tree
kdtree[i].resetPseudoRandomSeed();
}
- chunk_size = 256; // this is a fixed number as of now
+
+ // chunk_size = 256; // this is a fixed number as of now
int qSize = (int)(samplingrate*0.1); // temporal queue size
temporalQ = new CQ<Sample>[num_clients];
Modified: branches/AFR/StandAlone/manta.cc
==============================================================================
--- branches/AFR/StandAlone/manta.cc (original)
+++ branches/AFR/StandAlone/manta.cc Sat Aug 27 13:56:29 2005
@@ -98,8 +98,9 @@
{
double dt = Time::currentSeconds()-startTime;
double fps = static_cast<double>(numFrames)/dt;
- cout << "Benchmark completed in " << dt << " seconds (" << numFrames << "
frames, " << fps << " frames per second)\n";
- rtrt->finish();
+ // cout << "Benchmark completed in " << dt << " seconds (" << numFrames <<
" frames, " << fps << " frames per second)\n";
+ std::cout << fps << std::endl;
+ rtrt->finish();
delete this;
}
@@ -125,24 +126,22 @@
rtrt->setScenePath(".:../scenes");
rtrt->changeNumWorkers(1);
if(!rtrt->selectImageType("rgba8"))
- throw InternalError("default image not found", __FILE__, __LINE__);
+ throw InternalError("default image not found", __FILE__, __LINE__ );
if(!rtrt->selectLoadBalancer("workqueue"))
- throw InternalError("default load balancer not found",
- __FILE__, __LINE__);
+ throw InternalError("default load balancer not found", __FILE__,
__LINE__ );
if(!rtrt->selectImageTraverser("tiled"))
- throw InternalError("default image traverser not found",
- __FILE__, __LINE__);
+ throw InternalError("default image traverser not found", __FILE__,
__LINE__ );
if(!rtrt->selectPixelSampler("singlesample"))
- throw InternalError("default pixel sampler not found",
- __FILE__, __LINE__);
+ throw InternalError("default pixel sampler not found", __FILE__,
__LINE__ );
if(!rtrt->selectRenderer("raytracer"))
- throw InternalError("default renderer not found", __FILE__, __LINE__);
+ throw InternalError("default renderer not found", __FILE__, __LINE__ );
if(!rtrt->selectShadowAlgorithm("hard"))
- throw InternalError("default shadow algorithm not found",
- __FILE__, __LINE__);
+ throw InternalError("default shadow algorithm not found", __FILE__,
__LINE__ );
+
Camera* currentCamera = rtrt->createCamera("pinhole(-eye 3 3 2 -lookat 0
0 0.3 -up 0 0 1 -fov 60)");
if(!currentCamera)
- throw InternalError("cannot create default camera", __FILE__,
__LINE__);
+ throw InternalError("cannot create default camera", __FILE__, __LINE__
);
+
int xres = 512, yres = 512;
bool channelCreated=false;
bool haveUI = false;
- [MANTA] r509 - in branches/AFR: Engine/Control Engine/ImageTraversers StandAlone, abe, 08/27/2005
Archive powered by MHonArc 2.6.16.