diff options
Diffstat (limited to 'BuddhaTest/include/Helpers.h')
-rw-r--r-- | BuddhaTest/include/Helpers.h | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/BuddhaTest/include/Helpers.h b/BuddhaTest/include/Helpers.h index a25aa31..61bd7a0 100644 --- a/BuddhaTest/include/Helpers.h +++ b/BuddhaTest/include/Helpers.h @@ -3,13 +3,14 @@ #include <GLFW/glfw3.h>
#include <vector>
#include <stdio.h> //includes FILE typedef
+#include <string>
namespace Helpers
{
GLuint LoadShaders(const char * vertex_file_path, const char * fragment_file_path);
GLuint LoadComputeShader(const char * compute_file_path, unsigned int localSizeX, unsigned int localSizeY, unsigned int localSizeZ);
- void WriteOutputPNG(const std::vector<uint32_t>& data, unsigned int width, unsigned int bufferHeight, double gamma, double colorScale);
+ void WriteOutputPNG(const std::string& path, const std::vector<uint32_t>& data, unsigned int width, unsigned int bufferHeight, double gamma, double colorScale);
/** Wraps around a C file descriptor. Libpng could be taught to use C++ streams, but I'm too lazy and rather wrap this ugly thing up, so it gets cleaned... */
class ScopedCFileDescriptor
@@ -22,4 +23,32 @@ namespace Helpers private:
FILE * Descriptor;
};
+
+ struct RenderSettings
+ {
+ unsigned int imageWidth = 1920;
+ unsigned int imageHeight = 1080;
+
+ unsigned int windowWidth = 1024;
+ unsigned int windowHeight = 576;
+
+ unsigned int orbitLengthRed = 10;
+ unsigned int orbitLengthGreen = 100;
+ unsigned int orbitLengthBlue = 1000;
+
+ unsigned int localWorkgroupSizeX = 1024;
+ unsigned int localWorkgroupSizeY = 1;
+ unsigned int localWorkgroupSizeZ = 1;
+
+ unsigned int globalWorkGroupSizeX = 1024;
+ unsigned int globalWorkGroupSizeY = 1;
+ unsigned int globalWorkGroupSizeZ = 1;
+
+ std::string pngFilename = "";
+ double pngGamma = 1.0;
+ double pngColorScale = 2.0;
+
+ bool CheckValidity();
+ bool ParseCommandLine(int argc, char * argv[]);
+ };
}
|