Text archives Help
- From: "Thiago Ize" <thiago@sci.utah.edu>
- To: manta@sci.utah.edu
- Subject: [Manta] r2067 - trunk/StandAlone
- Date: Thu, 14 Feb 2008 12:53:46 -0700 (MST)
Author: thiago
Date: Thu Feb 14 12:53:45 2008
New Revision: 2067
Modified:
trunk/StandAlone/manta.cc
Log:
Only allow the first -imagedisplay to count. Note this means that calling
-imagedisplay opengl -nodisplaybench
will result in the benchmark actually displaying an image, but at
least it will be visually obvious to the user that something is
wrong. This also fixes the more insidious bug of
-imagedisplay null -nodisplaybench
which causes manta to render twice, and so run twice as slow, without
any indication for why.
Perhaps it would be nice if someone were to write some more robust
parameter error checking and warn the user of all the invalid
arguments being passed in.
Modified: trunk/StandAlone/manta.cc
==============================================================================
--- trunk/StandAlone/manta.cc (original)
+++ trunk/StandAlone/manta.cc Thu Feb 14 12:53:45 2008
@@ -281,9 +281,12 @@
if (arg.find("-nodisplaybench") == 0) {
// setup the ui and imagedisplay to both be null
- ImageDisplay *display = factory->createImageDisplay( "null" );
- rtrt->createChannel(display, currentCamera, stereo, xres, yres);
- channelCreated=true;
+
+ if(!channelCreated) {
+ ImageDisplay *display = factory->createImageDisplay( "null" );
+ rtrt->createChannel(display, currentCamera, stereo, xres,
yres);
+ channelCreated=true;
+ }
UserInterface* ui = factory->createUserInterface("null");
if (!ui) throw UnknownComponent( "Null user interface not
found", "");
ui->startup();
@@ -315,10 +318,11 @@
// Create the channel.
try {
- ImageDisplay *display = factory->createImageDisplay( s );
-
- rtrt->createChannel(display, currentCamera, stereo, xres, yres);
+ if(!channelCreated) {
+ ImageDisplay *display = factory->createImageDisplay( s );
+ rtrt->createChannel(display, currentCamera, stereo, xres,
yres);
+ }
} catch (UnknownComponent e) {
cerr << e.message() << "\n"
- [Manta] r2067 - trunk/StandAlone, Thiago Ize, 02/14/2008
Archive powered by MHonArc 2.6.16.