From 2fee1bb18e052c241069c6d72a9dc9734c4426e3 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 9 Sep 2019 21:55:46 +0100 Subject: [PATCH] travis --- .travis.yml | 3 +++ test/default.cpp | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..f859718 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,3 @@ +language: cpp +install: make get-deps +script: mkdir build && cd build && cmake .. && make && ./output diff --git a/test/default.cpp b/test/default.cpp index e69de29..7c53bf5 100644 --- a/test/default.cpp +++ b/test/default.cpp @@ -0,0 +1,33 @@ +#include "../src/inferno.hpp" + +static const int width = 1000; +static const int height = 1000; + +int main(int argc, char** argv) { + InfernoEngine inferno; + + inferno.SetMode(MODE_OPERATION_PROGRESSIVE_GUI); + + inferno.InitWindow(width, height); + + Scene* scene = new Scene(width, height); + scene->sky = new SolidColourSky({ 0.0f, 0.0f, 0.0f } 0.0f); + scene->camera = new Camera(width, height); + + // Light + Sphere light({ 35.0f, 56.0f, 25.0f }, 35.0f, new Material({ 1.0f, 1.0f, 1.0f }, 0.0f, 5.0f)); + scene->objects.push_back(&light); + + Sphere sphere({ 0.0f, 0.0f, -8.0f }, 1.0f, new Material({ 0.817f, 0.374, 0.574 }, 0.5f)); + scene->objects.push_back(&sphere); + + Plane plane({ 0.0f,-1.0f, 0.0f }, { 0.0f, -1.0f, 0.0f }, new Material({ 0.9f, 0.9f, 0.9f }, 0.0f)); + scene->objects.push_back(&plane); + + inferno.SetScene(scene); + + inferno.Ready(); + inferno.Render(); + + return 0; +}