Update README.md
This commit is contained in:
14
README.md
14
README.md
@@ -11,9 +11,9 @@ The output of this programme is a [PPM file](https://en.wikipedia.org/wiki/Netpb
|
||||
# :hammer_and_wrench: Building and Running the Code
|
||||
To run this code, you'll need to build it as it uses CMake. To build it, go to the root directory in the terminal and run the commands:
|
||||
|
||||
`cmake -B build`
|
||||
- `cmake -B build`
|
||||
|
||||
`cmake --build build`
|
||||
- `cmake --build build`
|
||||
|
||||
>The `cmake --build build` command should be run whenever a change is made to the `CMakeLists.txt` file in the build directory.
|
||||
|
||||
@@ -25,19 +25,19 @@ To run the code, you run the command:
|
||||
This build option is to render faster.
|
||||
|
||||
For **Windows**, run this command to optimised build:
|
||||
`cmake --build build --config release`
|
||||
- `cmake --build build --config release`
|
||||
|
||||
And to run the build:
|
||||
`build\Release\Raytracer.exe > image.ppm`
|
||||
- `build\Release\Raytracer.exe > image.ppm`
|
||||
|
||||
For **Mac** or **Linux**, run these commands to obptimise build for the fastest results:
|
||||
|
||||
`cmake -B build/Release -DCMAKE_BUILD_TYPE=Release`
|
||||
- `cmake -B build/Release -DCMAKE_BUILD_TYPE=Release`
|
||||
|
||||
`cmake --build build/Release`
|
||||
- `cmake --build build/Release`
|
||||
|
||||
And to run the build:
|
||||
`build/Release/Raytracer > image.ppm`
|
||||
- `build/Release/Raytracer > image.ppm`
|
||||
|
||||
You'll need an image viewer to view the PPM file. I used [feh](https://feh.finalrewind.org/).
|
||||
|
||||
|
Reference in New Issue
Block a user