Getting Started

Generating Documentation

First of all, if you're viewing this text in ReadMe.h, you should download Doxygen and run

doxygen $RENDERCHIMP$/doc/doxy

to generate HTML documentaion.

Setting up

RC comes with ready made project solutions for Visual Studio (Windows) and XCode (Mac). These projects have different build configurations, usually targeting a specific renderer in debug or release mode. If you've downloaded a fresh copy of RC, you should be able to select the desired configuration, compile and run without any further setup. The default program renders an example scene consisting of a single triangle.

RC comes with a few example programs. You can switch the example to build by modifying the RC_ACTIVE_EXAMPLE define in Example.h and recompiling. Short descriptions of the availble examples follows.

It is encouraged that you take a look at the code of these example programs before proceeding with your own development, as the examples are thoroughly commented. The filenames are Example##.cpp, where ## is the example number.

For a program to be properly set up with RC a few simple criterias must be met:

It is also a good idea to take a look at RenderChimp.h and glance through the build flags available there. (Note that some flags may already be set in the build configuration.)

Debugging

Apart from using Visual Studio, GDB or whatever, RC has some additional means to hunt for bugs.

First of all, calls to any of the REPORT-functions found in Result.h is logged to the file log.txt. RC usually give ample information leading up to a crash and this can be viewed in log.txt. It can also be a good idea to set a break point inside the ResultReport-function found in Result.cpp to capture reported warnings and errors.

Second, if you suspect that there are memory leaks or memory corruption a memory debugger can be enabled by enabling the RC_MEMORY_DEBUG-define found in RenderChimp.h. Your program will run much slower, but the allocated and freed memory will constantly be checked for suspicios activity. It's a good idea to enable this flag every now and then, just to ensure that everything is OK with the memory usage.

The status of the memory (number of allocations, memory used, etc) can be polled at any time from your application. Check Memory.h for more details.

 All Classes Functions