documentation updates, allow to specify the configuration file

metadata
Wenzel Jakob 2010-11-01 22:33:00 +01:00
parent 7036116997
commit ba5a9654d9
3 changed files with 57 additions and 8 deletions

View File

@ -5,12 +5,17 @@ import os
import fnmatch import fnmatch
import multiprocessing import multiprocessing
if not os.path.exists('config.py'): AddOption("--configfile", dest="configfile", type="string", nargs=1, action='store', help='Manually specify a configuration file')
configFile = GetOption('configfile')
if configFile == None:
configFile = "config.py"
if not os.path.exists(configFile):
print 'A configuration file must be selected! Have a look at \"README\"' print 'A configuration file must be selected! Have a look at \"README\"'
Exit(1) Exit(1)
# Parse configuration options # Parse configuration options
vars = Variables('config.py'); vars = Variables(configFile);
vars.Add('CXX', 'C++ compiler') vars.Add('CXX', 'C++ compiler')
vars.Add('CC', 'C compiler') vars.Add('CC', 'C compiler')
vars.Add('CXXFLAGS', 'C++ flags') vars.Add('CXXFLAGS', 'C++ flags')

View File

@ -159,7 +159,50 @@ In the case that you have multiple processors, you might want to parallelize the
If all goes well, the build process will finish successfully after a few If all goes well, the build process will finish successfully after a few
minutes. In comparison to the other platforms, you don't have to run the \code{setpath.sh} script at this point. minutes. In comparison to the other platforms, you don't have to run the \code{setpath.sh} script at this point.
All binaries are now located in the \code{dist} directory, and they should be executed directly from there. All binaries are now located in the \code{dist} directory, and they should be executed directly from there.
\subsubsection{Integration with the Visual Studio interface}
If you plan to modify Mitsuba and you enjoy working within the Visual
Studio interface, the following steps should help you integrate the two
(thanks to Marios Papas for this description!). The instructions are for Visual Studio 2008,
hence some changes may be necessary on other versions. Also, they assume
that you followed all of the previous steps.
\begin{enumerate}
\item Create a copy of \code{config.py} in the Mitsuba root directory and
name it \code{config\_debug.py}. This will later be used to support debug
builds. Open the file and make the following changes:
\begin{enumerate}
\item In \code{CXXFLAGS}, replace \code{/Ox} by \code{/Od} (this disables
optimizations, which is necessary to see variable contents in the debugger)
\item In \code{CXXFLAGS}, add an entry \code{'/Z7'}.
\item In \code{LINKFLAGS}, add an entry \code{'/DEBUG'}.
\end{enumerate}
\item Now, start a fresh instance of Visual Studio and click on
the \emph{File$\to$New$\to$Project From Existing Code} menu entry.
\item Choose \emph{Visual C++} from the drop-down menu and press \emph{Next}
\item Specify the Mitsuba root directory at the top and enter \emph{mitsuba}
as the project name. Uncheck \emph{Show all files in Solution explorer} and
press \emph{Next}.
\item Choose \emph{Use external build systen} and press \emph{Next}.
\item In the following, feel free to replace any occurrence of
\code{scons} by \code{scons -jX}, where \code{X} is the number of
cores in your machine (this will provide faster build times).
Fill in the following values:
\begin{tabular}{ll}i
\emph{Build command line}:&\code{scons}\\
\emph{Rebuild command line}:&\code{scons -c \&\& scons}\\
\emph{Clean command line}:&\code{scons -c}\\
\emph{Output}:&\code{dist\textbackslash mtsgui.exe}\\
\emph{Include search paths}:&\code{C:\textbackslash Qt\textbackslash
include} (your Qt path may be different)
\end{tabular}
\item On the next page, uncheck \emph{Same as Debug configuration}.
Afterwards, enter exactly the same values as before except replacing
every occurrence of \code{scons} by \code{scons {-}-cfg=config\_debug.py}.
\item Click \emph{Finish} and wait for IntelliSense to finish (this might take
a while).
\item Switch to the Release configuration.
\end{enumerate}
\subsection{Building on Mac OS X} \subsection{Building on Mac OS X}
On Mac OS X, you will need to install both scons (\code{www.scons.org}) and On Mac OS X, you will need to install both scons (\code{www.scons.org}) and
a recent release of XCode. You will also need to get Qt 4.7.0 or a newer version a recent release of XCode. You will also need to get Qt 4.7.0 or a newer version

View File

@ -38,12 +38,13 @@ MTS_NAMESPACE_BEGIN
* *
* The general interaction between a sampler and a rendering algorithm is as * The general interaction between a sampler and a rendering algorithm is as
* follows: Before beginning to render a pixel, the rendering algorithm calls * follows: Before beginning to render a pixel, the rendering algorithm calls
* \ref generate(). The first pixel sample is generated, after which \ref * \ref generate(). The first pixel sample can now be computed, after which
* advance() needs to be invoked, and so on. Note that any implementations need * \ref advance() needs to be invoked. This repeats until all pixel samples have
* to be configured for a certain number of pixel samples, and exceeding these * been generated. Note that some implementations need to be configured for a
* will lead to an exception being thrown. While computing a pixel sample, the * certain number of pixel samples, and exceeding these will lead to an
* rendering algorithm usually requests batches of (pseudo-) random numbers * exception being thrown. While computing a pixel sample, the rendering
* using the \ref next1D(), \ref next2D(), \ref next1DArray() and * algorithm usually requests batches of (pseudo-) random numbers using
* the \ref next1D(), \ref next2D(), \ref next1DArray() and
* \ref next2DArray() functions. * \ref next2DArray() functions.
* *
*/ */