Text archives Help
- From: abe@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r859 - in trunk: . Image Interface Model/Materials StandAlone fox/disco_demo/Engine/Shaders
- Date: Sun, 22 Jan 2006 00:17:24 -0700 (MST)
Author: abe
Date: Sun Jan 22 00:17:23 2006
New Revision: 859
Added:
trunk/Interface/Parameters.h.CMakeTemplate
- copied, changed from r857, trunk/Interface/Parameters.h
trunk/MantaTypes.h.CMakeTemplate
- copied, changed from r857, trunk/MantaTypes.h
Removed:
trunk/Interface/Parameters.h
trunk/MantaTypes.h
Modified:
trunk/CMakeLists.txt
trunk/Image/NRRDFile-stub.cc
trunk/Interface/CMakeLists.txt
trunk/Interface/Fragment.h
trunk/Interface/RayPacket.h
trunk/Model/Materials/Phong.cc
trunk/StandAlone/manta_path_plot.pl
trunk/StandAlone/manta_scaling_plot.pl
trunk/fox/disco_demo/Engine/Shaders/AOShader.cc
Log:
Fixed prototype of writeNRRD
M Image/NRRDFile-stub.cc
Added cmake CONFIGURE_FILE directives for Real, ColorComponent types.
As well as Fragment, RayPacket, and ScratchPad MaxSizes.
CONFIGURE_FILE copies and replaces strings in the *.CMakeTemplate files
during cmake configuration.
Don't add the .h files to the repository, they should be copied each time for
build.
A MantaTypes.h.CMakeTemplate
M fox/disco_demo/Engine/Shaders/AOShader.cc
M Interface/Fragment.h
D Interface/Parameters.h
A Interface/Parameters.h.CMakeTemplate
M Interface/CMakeLists.txt
M Interface/RayPacket.h
M Model/Materials/Phong.cc
D MantaTypes.h
M CMakeLists.txt
Added enough features to the benchmark scripts that they can reconfigure and
rebuild manta to test out different ray packet sizes.
M StandAlone/manta_path_plot.pl
M StandAlone/manta_scaling_plot.pl
Here's what a benchmark can look like:
# Ray Packet size test.
plot: -sync 2 -interval 2 4 -warmup 1
# Specify the location of the dataset.
set: DATA_FILE /home/sci/abe/models/defender.v3c1
# Manta Command.
set: SCENE -scene "lib/libscene_boeing777.so( -file ${DATA_FILE} )"
set: MANTA_CMD bin/manta -np 4 -imagedisplay null ${SCENE}
# Run Macro.
begin_macro: RUN(SIZE)
plot: -subtitle Size ${SIZE}
echo: --------------------------------------------------${SIZE}
system: cmake -D MANTA_RAYPACKET_MAXSIZE=${SIZE} ..
system: gmake -sj 4
${MANTA_CMD}
end_macro:
# Run the benchmark.
macro: RUN(1)
macro: RUN(2)
macro: RUN(3)
(Now maybe I'll do some real work.)
Details on alternative ray packets sizes soon.
Modified: trunk/CMakeLists.txt
==============================================================================
--- trunk/CMakeLists.txt (original)
+++ trunk/CMakeLists.txt Sun Jan 22 00:17:23 2006
@@ -151,7 +151,15 @@
## We need SCI_NOPERSISTENT to be defined
FORCE_ADD_CXX_FLAGS("-DSCI_NOPERSISTENT")
-
+##################################################################
+## Configure MantaTypes.h
+SET(MANTA_REAL double CACHE STRING "Typedef for Real")
+SET(MANTA_COLOR_COMPONENT float CACHE STRING "Typedef for ColorComponent")
+
+CONFIGURE_FILE(
+ ${CMAKE_SOURCE_DIR}/MantaTypes.h.CMakeTemplate
+ ${CMAKE_SOURCE_DIR}/MantaTypes.h
+ )
IF (OPENGL_INCLUDE_PATH)
INCLUDE_DIRECTORIES (${OPENGL_INCLUDE_PATH})
@@ -190,14 +198,16 @@
# Since SWIG support wasn't added to CMake until version 2.0, only do
# the check if we have a new enough version.
+SET(BUILD_SWIG_INTERFACE 0 CACHE BOOL "Check for swig/python")
+IF(BUILD_SWIG_INTERFACE)
IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.9)
# Only process the swig directory if we have swig stuff
FIND_PACKAGE(SWIG)
IF (SWIG_FOUND)
- SET(MAIN_SUBDIRS ${MAIN_SUBDIRS} SwigInterface)
+ SET(MAIN_SUBDIRS ${MAIN_SUBDIRS} SwigInterface)
ENDIF (SWIG_FOUND)
ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.9)
-
+ENDIF(BUILD_SWIG_INTERFACE)
# Check to see whether the histx performance monitoring tools should
Modified: trunk/Image/NRRDFile-stub.cc
==============================================================================
--- trunk/Image/NRRDFile-stub.cc (original)
+++ trunk/Image/NRRDFile-stub.cc Sun Jan 22 00:17:23 2006
@@ -40,7 +40,7 @@
using namespace Manta;
using namespace SCIRun;
-extern "C" void writeNRRD( Image const *image, std::string const &file_name
) {
+extern "C" void writeNRRD( Image const *image, std::string const &file_name,
int which ) {
throw OutputError( "Nrrd writing not supported by this build. Perhaps you
need to add the path to the Teem libraries.");
}
Modified: trunk/Interface/CMakeLists.txt
==============================================================================
--- trunk/Interface/CMakeLists.txt (original)
+++ trunk/Interface/CMakeLists.txt Sun Jan 22 00:17:23 2006
@@ -1,4 +1,16 @@
+###############################################################################
+## Configure Parameters.h
+SET(MANTA_RAYPACKET_MAXSIZE 32 CACHE STRING "Static RayPacket size.")
+SET(MANTA_FRAGMENT_MAXSIZE 32 CACHE STRING "Static Fragment size.")
+SET(MANTA_SCRATCHPAD_MAXSIZE 128 CACHE STRING "Static Scratchpad size.")
+
+CONFIGURE_FILE(
+ ${CMAKE_SOURCE_DIR}/Interface/Parameters.h.CMakeTemplate
+ ${CMAKE_SOURCE_DIR}/Interface/Parameters.h
+ )
+
+## Create the Interface library.
ADD_LIBRARY(Manta_Interface
AmbientLight.h
AmbientLight.cc
Modified: trunk/Interface/Fragment.h
==============================================================================
--- trunk/Interface/Fragment.h (original)
+++ trunk/Interface/Fragment.h Sun Jan 22 00:17:23 2006
@@ -20,6 +20,8 @@
#include <Core/Util/FancyAssert.h>
#include <Core/Util/Assert.h>
+#include <Interface/Parameters.h>
+
// TODO:
//
// add in: static const int ConsecutiveY = 0x01;
@@ -142,7 +144,7 @@
// Constant number of Elements so that we do not have to
// dynamically allocate them.
- static const int MaxSize = 32;
+ static const int MaxSize = FRAGMENT_MAXSIZE;
// Represents a Pixel
struct Element {
Copied: trunk/Interface/Parameters.h.CMakeTemplate (from r857,
trunk/Interface/Parameters.h)
==============================================================================
--- trunk/Interface/Parameters.h (original)
+++ trunk/Interface/Parameters.h.CMakeTemplate Sun Jan 22 00:17:23 2006
@@ -1,3 +1,30 @@
+/*
+ For more information, please see:
http://software.sci.utah.edu
+
+ The MIT License
+
+ Copyright (c) 2005-2006
+ Scientific Computing and Imaging Institute, University of Utah
+
+ License for the specific language governing rights and limitations under
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+*/
#ifndef Manta_Interface_Parameters_h
#define Manta_Interface_Parameters_h
@@ -7,5 +34,13 @@
#define DENOM_EPSILON ((Real)1.e-6)
#define MAXT ((Real)1.e19)
+namespace Manta {
+ // Parameters configured by CMake.
+ enum {
+ RAYPACKET_MAXSIZE = ${MANTA_RAYPACKET_MAXSIZE},
+ FRAGMENT_MAXSIZE = ${MANTA_FRAGMENT_MAXSIZE},
+ SCRATCHPAD_MAXSIZE = ${MANTA_SCRATCHPAD_MAXSIZE}
+ };
+};
#endif
Modified: trunk/Interface/RayPacket.h
==============================================================================
--- trunk/Interface/RayPacket.h (original)
+++ trunk/Interface/RayPacket.h Sun Jan 22 00:17:23 2006
@@ -17,8 +17,8 @@
class RayPacketData {
public:
enum {
- MaxScratchpadSize = 128,
- Size = 32
+ MaxScratchpadSize = SCRATCHPAD_MAXSIZE,
+ Size = RAYPACKET_MAXSIZE
};
RayPacketData()
{
Copied: trunk/MantaTypes.h.CMakeTemplate (from r857, trunk/MantaTypes.h)
==============================================================================
--- trunk/MantaTypes.h (original)
+++ trunk/MantaTypes.h.CMakeTemplate Sun Jan 22 00:17:23 2006
@@ -32,7 +32,7 @@
namespace Manta {
// Scalars
- typedef double Real;
+ typedef ${MANTA_REAL} Real;
// typedef float Real;
// Colors - forward declarations only
@@ -41,7 +41,7 @@
// type and not an integral type. If you wish to make it an
// integral type, you should go through the code and make sure
// function like ColorSpace::Mean do the right thing.
- typedef float ColorComponent;
+ typedef ${MANTA_COLOR_COMPONENT} ColorComponent;
class RGBTraits;
template<typename T> class ColorSpace;
typedef ColorSpace<RGBTraits> Color;
Modified: trunk/Model/Materials/Phong.cc
==============================================================================
--- trunk/Model/Materials/Phong.cc (original)
+++ trunk/Model/Materials/Phong.cc Sun Jan 22 00:17:23 2006
@@ -1,4 +1,32 @@
+/*
+ For more information, please see:
http://software.sci.utah.edu
+
+ The MIT License
+
+ Copyright (c) 2005-2006
+ Scientific Computing and Imaging Institute, University of Utah
+
+ License for the specific language governing rights and limitations under
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+*/
+
#include <Model/Materials/Phong.h>
#include <Core/Math/ipow.h>
#include <Interface/AmbientLight.h>
Modified: trunk/StandAlone/manta_path_plot.pl
==============================================================================
--- trunk/StandAlone/manta_path_plot.pl (original)
+++ trunk/StandAlone/manta_path_plot.pl Sun Jan 22 00:17:23 2006
@@ -22,6 +22,8 @@
$plot_y = 5;
$plot_columns = 5;
$keep = 1;
+$line = 0;
+
$start_time = time();
@@ -31,6 +33,46 @@
"Elapse Seconds",
"Average fps" );
+
+###############################################################################
+# Variable replacement.
+sub variable_replace {
+ my @result = ();
+
+ # Replace in each string.
+ foreach (split(/ /,$_[0])) {
+ my $string = $_;
+
+ # print "Initial: $string\n";
+
+ # Look for a variable to replace.
+ if ($string =~ /\$\{([a-zA-Z\_]+)/) {
+ my $variable = $1;
+
+ # print "\t[$variable]\n";
+
+ # Search for the key.
+ if ($variables{$variable}) {
+ my $value = $variables{$variable};
+ $string =~ s/\$\{$variable\}/$value/g;
+ }
+ else {
+ print "Line $line: \${$variable} Not found.\n";
+ exit(1);
+ }
+ # print "Result: $result\n";
+ }
+ push(@result,$string);
+
+
+
+ }
+ return join(" ",@result);
+}
+
+
+###############################################################################
+# Main program.
for ($i=0;$i<@ARGV;++$i) {
if ($ARGV[$i] eq "-file") {
$input_file = $ARGV[++$i];
@@ -115,17 +157,120 @@
print HTML "Generated using:<br><font face=\"courier\"
size=-1>manta_path_plot.pl " . join(" ",@ARGV) . "</font><p>\n";
# Read in manta commands.
-$line = 0;
$subtitle = 0;
while (<INPUT>) {
$input_line = $_;
+
+ # Process the command.
+ process_command( $input_line );
+}
+
+# Make sure some runs were made.
+if (@command_array == 0) {
+ exit(0);
+}
+
+###############################################################################
+# Create a graph with all results.
+# Pipe commands to gnuplot.
+
+print HTML "<h2>Summary</h2>\n";
+print HTML "<pre>\n";
+
+if (!open(GNUPLOT, "|-", "gnuplot")) {
+ print "Could not open gnuplot\n";
+ exit(1);
+}
+
+$png_file = $output_prefix . "-all.png";
+
+@array = split(/\//,$png_file);
+$png_file_name = $array[@array-1];
+
+$eps_file = $output_prefix . $line . "-all.eps";
+
+@array = split(/\//,$eps_file);
+$eps_file_name = $array[@array-1];
+
+@array = split(/\//,$out_file);
+$txt_file_name = $array[@array-1];
+
+$plot_file = $output_prefix . $line . "-all.gnuplot";
+
+$plot = "plot ";
+for ($i=0; $i<@out_array; ++$i) {
+
+ print HTML "$subtitle_array[$i]: $command_array[$i]\n";
+
+ $plot = $plot . "\"$out_array[$i]\" using
$plot_x_array[$i]:$plot_y_array[$i] title \"$subtitle_array[$i]\" ";
+ if ($i < (@out_array)-1) {
+ $plot = $plot . ", ";
+ }
+}
+$plot = $plot . "\n";
+
+print HTML "</pre>\n";
+
+print GNUPLOT "set data style linespoints\n";
+print GNUPLOT "set term png small color\n";
+print GNUPLOT "set xlabel \"" . $plot_label[$plot_x-1] . "\"\n";
+print GNUPLOT "set ylabel \"" . $plot_label[$plot_y-1] . "\"\n";
+print GNUPLOT "set title \"$input_file: $title Summary\"\n";
+print GNUPLOT "set output \"$png_file\"\n";
+print GNUPLOT $plot;
+
+print GNUPLOT "set term postscript eps enhanced color\n";
+print GNUPLOT "set output \"$eps_file\"\n";
+print GNUPLOT $plot;
+
+print GNUPLOT "save '$plot_file'\n";
+
+close(GNUPLOT);
+# Output to html file.
+print HTML "<img src=\"$png_file_name\" /><br>\n";
+
+print HTML "(<a href=\"$eps_file_name\">eps</a>)";
+if ($keep) {
+ print HTML "(<a href=\"$txt_file_name\">txt</a>)";
+}
+print HTML "(<a href=\"$plot_file\">gnuplot</a>)";
+
+print HTML "<hr width=100%><p>\n";
+
+close (HTML);
+close (INPUT);
+
+###############################################################################
+# Delete the temporary files.
+if (!$keep) {
+ for ($i=0; $i<@out_array; ++$i) {
+ if (!unlink($out_array[$i])) {
+ print "Could not delete $out_file\n";
+ exit(1);
+ }
+ }
+}
+
+print "manta_path_plot.pl Completed successfully in " .
((time()-$start_time)/60) ." minutes.\n\n";
+
+###############################################################################
+# Process commands.
+sub process_command {
+
+ my $input_line = $_[0];
+ $_ = $_[0];
+
+
###########################################################################
# Check for a plot arg change.
if (/^plot:(.*)/) {
- @plot_args = split(/ /,$1);
+ my $cmd = variable_replace( $1 );
+
+ @plot_args = split(/ /,$cmd);
+ my $i;
for ($i=0;$i<@plot_args;++$i) {
if ($plot_args[$i] eq "-path") {
@@ -168,9 +313,119 @@
}
}
+
###########################################################################
+ # Set command.
+ elsif (/^set:[ \t]*([a-zA-Z\_]+)[ \t]*(.+)/) {
+ my $var = $1;
+ my $value = $2;
+
+ # Save the variable.
+ $variables{$var} = variable_replace($value);
+ }
+
+
###########################################################################
+ # System command.
+ elsif (/^system:[ \t]*(.*)/) {
+
+ my $command_line = $1;
+ chomp($command_line);
+
+ print "SYSTEM: $command_line\n";
+
+ # Parse command line args.
+ @system_args = split(/[ ]+/,variable_replace($command_line));
+
+ # Run the command.
+ if (system(@system_args)!=0) {
+ # Exit on error.
+ print "manta_path_plot.pl:\n";
+ print "\t$command_line\n";
+ print "\tTerminated code: $?\n";
+
+ exit(1);
+ }
+ }
+
+
###########################################################################
+ # Create a Macro.
+ elsif (/^begin_macro:\s*(\w*)\((\w*)\)/) {
+
+ # Initialize the macro.
+ my $name = $1;
+ my $macro = {
+ "parameter" => $2,
+ "commands" => []
+ };
+
+ # Collect input lines for the macro.
+ my $macro_line;
+ while (!(($macro_line = <INPUT>) =~ /^end_macro:/)) {
+ chomp($macro_line);
+ push( @{$macro{"commands"}}, $macro_line );
+ }
+
+ # Add to the macro hash.
+ $macros{$name} = $macro;
+ }
+
+ # Run a macro
+ elsif (/^macro:\s*(\w*)\((\w*)\)/) {
+
+ my $name = $1;
+ my $value = $2;
+
+ # Check to see if the macro exists.
+ my $macro = $macros{$name};
+ if ($macro) {
+
+ # print "Begin Macro\n";
+
+ # Add the global variable.
+ $variables{$$macro{"parameter"}} = $value;
+
+ # Execute the macro.
+ my $i;
+ for ($i=0;$i<@{$macro{"commands"}};++$i) {
+
+ $str = ${$macro{"commands"}}[$i];
+ $cmd = variable_replace( $str );
+
+ process_command( $cmd );
+ }
+
+ # Remove the parameter.
+ $variables{$$macro{"parameter"}} = 0;
+
+ # print "End Macro\n";
+ }
+ else {
+ # Exit on error.
+ print "manta_path_plot.pl:\n";
+ print "\t$input_line\n";
+ print "\tMacro not found: $name\n";
+
+ exit(1);
+ }
+ }
+
+
###########################################################################
+ # Blank lines or comments
+ elsif (/^[ \t]*\#/) {
+ # Quietly skip
+ }
+ elsif (/^$/) {
+ # Quietly skip
+ }
+ elsif (/^echo:\s*(.*)/) {
+ print variable_replace( $1 ) . "\n";
+ }
+
+
###########################################################################
# Otherwise process the line as a command.
else {
+ $input_line = variable_replace( $input_line );
+
# Form the camera path command.
$path_command = " -ui \"camerapath( -file $path_file -sync
$path_sync -behavior exit -warmup $path_warmup ";
if ($path_t != 0) {
@@ -332,88 +587,5 @@
}
}
-
-# Create a graph with all results.
-# Pipe commands to gnuplot.
-
-print HTML "<h2>Summary</h2>\n";
-print HTML "<pre>\n";
-
-if (!open(GNUPLOT, "|-", "gnuplot")) {
- print "Could not open gnuplot\n";
- exit(1);
-}
-
-$png_file = $output_prefix . "-all.png";
-
-@array = split(/\//,$png_file);
-$png_file_name = $array[@array-1];
-
-$eps_file = $output_prefix . $line . "-all.eps";
-
-@array = split(/\//,$eps_file);
-$eps_file_name = $array[@array-1];
-
-@array = split(/\//,$out_file);
-$txt_file_name = $array[@array-1];
-
-$plot_file = $output_prefix . $line . "-all.gnuplot";
-
-$plot = "plot ";
-for ($i=0; $i<@out_array; ++$i) {
-
- print HTML "$subtitle_array[$i]: $command_array[$i]\n";
-
- $plot = $plot . "\"$out_array[$i]\" using
$plot_x_array[$i]:$plot_y_array[$i] title \"$subtitle_array[$i]\" ";
- if ($i < (@out_array)-1) {
- $plot = $plot . ", ";
- }
-}
-$plot = $plot . "\n";
-
-print HTML "</pre>\n";
-
-print GNUPLOT "set data style linespoints\n";
-print GNUPLOT "set term png small color\n";
-print GNUPLOT "set xlabel \"" . $plot_label[$plot_x-1] . "\"\n";
-print GNUPLOT "set ylabel \"" . $plot_label[$plot_y-1] . "\"\n";
-print GNUPLOT "set title \"$input_file: $title Summary\"\n";
-print GNUPLOT "set output \"$png_file\"\n";
-print GNUPLOT $plot;
-
-print GNUPLOT "set term postscript eps enhanced color\n";
-print GNUPLOT "set output \"$eps_file\"\n";
-print GNUPLOT $plot;
-
-print GNUPLOT "save '$plot_file'\n";
-
-close(GNUPLOT);
-
-# Output to html file.
-print HTML "<img src=\"$png_file_name\" /><br>\n";
-
-print HTML "(<a href=\"$eps_file_name\">eps</a>)";
-if ($keep) {
- print HTML "(<a href=\"$txt_file_name\">txt</a>)";
-}
-print HTML "(<a href=\"$plot_file\">gnuplot</a>)";
-
-print HTML "<hr width=100%><p>\n";
-
-close (HTML);
-close (INPUT);
-
-# Delete the temporary files.
-if (!$keep) {
- for ($i=0; $i<@out_array; ++$i) {
- if (!unlink($out_array[$i])) {
- print "Could not delete $out_file\n";
- exit(1);
- }
- }
-}
-
-print "manta_path_plot.pl Completed successfully in " .
((time()-$start_time)/60) ." minutes.\n\n";
-
Modified: trunk/StandAlone/manta_scaling_plot.pl
==============================================================================
--- trunk/StandAlone/manta_scaling_plot.pl (original)
+++ trunk/StandAlone/manta_scaling_plot.pl Sun Jan 22 00:17:23 2006
@@ -1,37 +1,49 @@
+sub usage {
+
+ print
+ "Usage: make_scaling_plot.pl -file <infile.html>\n" .
+ "-file <infile.html> -- Input file\n" .
+ "-key <string> -- Key to search for on x axis default
\"np\"\n" .
+ "-series <n> -- Independent series inteleaved by n lines.\n" .
+ " This means that the input is interleaved.\n" .
+ " Default 1.\n" .
+ "-label <label0> <label1>\n" .
+ " -- Specify a label for each series. (required)\n";
+}
+
$series = 1;
+$key = "np";
# Parse args
for ($i=0;$i<@ARGV;++$i) {
if ($ARGV[$i] eq "-file") {
$input_file = $ARGV[++$i];
}
- if ($ARGV[$i] eq "-series") {
+ elsif ($ARGV[$i] eq "-series") {
$series = $ARGV[++$i];
}
- if ($ARGV[$i] eq "-labels") {
+ elsif ($ARGV[$i] eq "-labels") {
++$i;
while (($i < @ARGV) && !($ARGV[$i] =~ /^-/)) {
push(@labels,$ARGV[$i++]);
}
}
+ elsif ($ARGV[$i] eq "-key") {
+ $key = $ARGV[++$i];
+ }
}
# Check to see if enough subtitles were provided.
if (@labels < $series) {
print "Must provide a label for each series.\n";
+ usage();
exit(1);
}
if ($input_file eq "") {
- print
- "Usage: make_scaling_plot.pl -file <infile.html>\n" .
- "-file <infile.html> -- Input file\n" .
- "-series <n> -- Independent series inteleaved by n lines.\n" .
- " This means that the input is interleaved.\n" .
- " Default 1.\n" .
- "-label <label0> <label1>\n" .
- " -- Specify a label for each series. (required)\n";
+ print "Specify and input file\n";
+ usage();
exit(1);
}
@@ -57,7 +69,7 @@
while (<INPUT>) {
$line = $_;
- if ($line =~ /np([0-9]+)/) {
+ if ($line =~ /$key\s*([0-9]+)/) {
$np = $1;
}
@@ -107,7 +119,7 @@
print GNUPLOT "set data style linespoints\n";
print GNUPLOT "set title \"Processor Scaling: $input_file\"\n";
-print GNUPLOT "set xlabel \"np\"\n";
+print GNUPLOT "set xlabel \"$key\"\n";
print GNUPLOT "set ylabel \"fps\"\n";
print GNUPLOT "set term png small color\n";
Modified: trunk/fox/disco_demo/Engine/Shaders/AOShader.cc
==============================================================================
--- trunk/fox/disco_demo/Engine/Shaders/AOShader.cc (original)
+++ trunk/fox/disco_demo/Engine/Shaders/AOShader.cc Sun Jan 22 00:17:23
2006
@@ -172,7 +172,7 @@
ray_packet.computeHitPositions();
// Set ray packet colors.
- // shade_materials( context, ray_packet );
+ shade_materials( context, ray_packet );
///////////////////////////////////////////////////////////////////////////
// Compute local coordinate system for each hit position.
@@ -284,7 +284,7 @@
p.illuminance = ( total_hit / total_sent );
// Copy over the material color and normal
- p.color = Color(RGB(1,1,1));
+ p.color = ray_packet.getColor( i ); // Color(RGB(1,1,1));
p.normal = ray_packet.getNormal(i);
}
- [MANTA] r859 - in trunk: . Image Interface Model/Materials StandAlone fox/disco_demo/Engine/Shaders, abe, 01/22/2006
Archive powered by MHonArc 2.6.16.