Merge remote-tracking branch 'sgitea/main'
This commit is contained in:
commit
bb6a05f191
5 changed files with 34 additions and 8 deletions
1
example02_threaded_raytracing/.gitignore
vendored
1
example02_threaded_raytracing/.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
build*/
|
||||
compile_commands.json
|
||||
.cache/
|
||||
src/*.o
|
||||
|
|
13
example02_threaded_raytracing/buildWin/Makefile
Normal file
13
example02_threaded_raytracing/buildWin/Makefile
Normal file
|
@ -0,0 +1,13 @@
|
|||
CXX=x86_64-w64-mingw32-g++
|
||||
CXXFLAGS=-O3 -DNDEBUG
|
||||
|
||||
all: Example02.exe
|
||||
|
||||
Example02.exe: ../src/main.o ../src/rayTracer.o ../src/argParse.o
|
||||
$(CXX) -o Example02.exe -lpthread $^
|
||||
|
||||
.PHONY:
|
||||
|
||||
clean:
|
||||
rm -f Example02.exe
|
||||
rm -f ../src/*.o
|
|
@ -125,11 +125,11 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
}
|
||||
|
||||
// auto pixels = Ex02::RT::renderGraySphere(
|
||||
// outputWidth, outputHeight, threadCount);
|
||||
std::cout << "Rendering image of width " << outputWidth << " and height "
|
||||
<< outputHeight << " with " << threadCount << " thread(s)..."
|
||||
<< std::endl;
|
||||
// auto pixels = Ex02::RT::renderGraySphere(
|
||||
// outputWidth, outputHeight, threadCount);
|
||||
auto pixels =
|
||||
Ex02::RT::renderColorsWithSpheres(outputWidth, outputHeight, threadCount);
|
||||
|
||||
|
|
|
@ -5,9 +5,15 @@
|
|||
#include <fstream>
|
||||
#include <thread>
|
||||
|
||||
#ifdef __MINGW32__
|
||||
# include "/usr/include/glm/ext/matrix_transform.hpp"
|
||||
# include "/usr/include/glm/gtc/matrix_transform.hpp"
|
||||
# include "/usr/include/glm/matrix.hpp"
|
||||
#else
|
||||
# include <glm/ext/matrix_transform.hpp>
|
||||
# include <glm/gtc/matrix_transform.hpp>
|
||||
# include <glm/matrix.hpp>
|
||||
#endif
|
||||
|
||||
const float PI = std::acos(-1.0F);
|
||||
|
||||
|
|
|
@ -12,9 +12,15 @@ constexpr float EX02_RAY_TRACER_GRAY_SPHERE_RADIUS = 1.5F;
|
|||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
#ifdef __MINGW32__
|
||||
# include "/usr/include/glm/mat4x4.hpp"
|
||||
# include "/usr/include/glm/matrix.hpp"
|
||||
# include "/usr/include/glm/vec3.hpp"
|
||||
#else
|
||||
# include <glm/mat4x4.hpp>
|
||||
# include <glm/matrix.hpp>
|
||||
# include <glm/vec3.hpp>
|
||||
#endif
|
||||
|
||||
namespace Ex02::RT {
|
||||
|
||||
|
|
Loading…
Reference in a new issue