diff --git a/.gitignore b/.gitignore
index dc6c035a1a..eb0db62a4f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,10 @@ ext/SGCT
.DS_Store
*.swp
+# generated glsl files
+*.gglsl
+*.OpenSpaceGenerated.glsl
+
# CMake stuff
CMakeCache.txt
CMakeFiles
diff --git a/config/sgct/ccmc_lab_all.xml b/config/sgct/ccmc_lab_all.xml
new file mode 100644
index 0000000000..9c2fcd4958
--- /dev/null
+++ b/config/sgct/ccmc_lab_all.xml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/config/sgct/ccmc_lab_work.xml b/config/sgct/ccmc_lab_work.xml
new file mode 100644
index 0000000000..0c9f4069b6
--- /dev/null
+++ b/config/sgct/ccmc_lab_work.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/config/sgct/single.xml b/config/sgct/single.xml
index 63abb4989c..eec3b163c1 100644
--- a/config/sgct/single.xml
+++ b/config/sgct/single.xml
@@ -1,13 +1,19 @@
-
+
-
+
+
+
+
-
-
+
+
+
+
+
diff --git a/include/openspace/abuffer/abuffer.h b/include/openspace/abuffer/abuffer.h
new file mode 100644
index 0000000000..f7c2f9e032
--- /dev/null
+++ b/include/openspace/abuffer/abuffer.h
@@ -0,0 +1,93 @@
+/*****************************************************************************************
+ * *
+ * OpenSpace *
+ * *
+ * Copyright (c) 2014 *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this *
+ * software and associated documentation files (the "Software"), to deal in the Software *
+ * without restriction, including without limitation the rights to use, copy, modify, *
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
+ * permit persons to whom the Software is furnished to do so, subject to the following *
+ * conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included in all copies *
+ * or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ ****************************************************************************************/
+
+#ifndef __ABUFFER_H__
+#define __ABUFFER_H__
+
+#include
+
+#include
+#include
+
+#include
+#include
+
+namespace ghoul {
+ namespace opengl {
+ class Texture;
+ }
+}
+
+namespace openspace {
+
+class ABuffer: public ABuffer_I {
+public:
+
+ ABuffer();
+ virtual ~ABuffer();
+ virtual void resolve();
+
+ void addVolume(const std::string& tag,ghoul::opengl::Texture* volume);
+ void addTransferFunction(const std::string& tag,ghoul::opengl::Texture* transferFunction);
+ int addSamplerfile(const std::string& filename);
+
+protected:
+ virtual std::string settings() = 0;
+
+ bool initializeABuffer();
+
+ void generateShaderSource();
+ bool updateShader();
+
+ std::string openspaceHeaders();
+ std::string openspaceSamplerCalls();
+ std::string openspaceSamplers();
+ std::string openspaceTransferFunction();
+
+ unsigned int _width, _height, _totalPixels;
+
+private:
+ GLuint _screenQuad;
+
+ bool _validShader;
+ std::string _fragmentShaderPath;
+ ghoul::filesystem::File* _fragmentShaderFile;
+ ghoul::opengl::ProgramObject* _resolveShader;
+
+ std::vector > _volumes;
+ std::vector > _transferFunctions;
+ std::vector _samplerFiles;
+ std::vector _samplers;
+
+ // Development functionality to update shader for changes in several files
+ std::vector _shaderFiles;
+
+ float _volumeStepFactor;
+
+
+
+}; // ABuffer
+} // openspace
+
+#endif // __ABUFFER_H__
\ No newline at end of file
diff --git a/include/openspace/abuffer/abufferSingleLinked.h b/include/openspace/abuffer/abufferSingleLinked.h
new file mode 100644
index 0000000000..c348abee52
--- /dev/null
+++ b/include/openspace/abuffer/abufferSingleLinked.h
@@ -0,0 +1,60 @@
+/*****************************************************************************************
+ * *
+ * OpenSpace *
+ * *
+ * Copyright (c) 2014 *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this *
+ * software and associated documentation files (the "Software"), to deal in the Software *
+ * without restriction, including without limitation the rights to use, copy, modify, *
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
+ * permit persons to whom the Software is furnished to do so, subject to the following *
+ * conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included in all copies *
+ * or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ ****************************************************************************************/
+
+#ifndef __ABUFFERSINGLELINKED_H__
+#define __ABUFFERSINGLELINKED_H__
+
+#include
+
+namespace openspace {
+
+class ABufferSingleLinked: public ABuffer {
+public:
+
+ ABufferSingleLinked();
+ virtual ~ABufferSingleLinked();
+ virtual bool initialize();
+
+ virtual void clear();
+ virtual void preRender();
+ virtual void postRender();
+
+ virtual std::string settings();
+
+private:
+
+ GLuint *_data;
+ GLuint _anchorPointerTexture;
+ GLuint _anchorPointerTextureInitializer;
+ GLuint _atomicCounterBuffer;
+ GLuint _fragmentBuffer;
+ GLuint _fragmentTexture;
+
+
+
+
+}; // ABufferSingleLinked
+} // openspace
+
+#endif // __ABUFFERSINGLELINKED_H__
\ No newline at end of file
diff --git a/include/openspace/abuffer/abuffer_i.h b/include/openspace/abuffer/abuffer_i.h
new file mode 100644
index 0000000000..04a8e4277c
--- /dev/null
+++ b/include/openspace/abuffer/abuffer_i.h
@@ -0,0 +1,43 @@
+/*****************************************************************************************
+ * *
+ * OpenSpace *
+ * *
+ * Copyright (c) 2014 *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this *
+ * software and associated documentation files (the "Software"), to deal in the Software *
+ * without restriction, including without limitation the rights to use, copy, modify, *
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
+ * permit persons to whom the Software is furnished to do so, subject to the following *
+ * conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included in all copies *
+ * or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ ****************************************************************************************/
+
+#ifndef __ABUFFER_I_H__
+#define __ABUFFER_I_H__
+
+namespace openspace {
+
+class ABuffer_I {
+public:
+ virtual ~ABuffer_I() {};
+ virtual bool initialize() = 0;
+
+ virtual void clear() = 0;
+ virtual void preRender() = 0;
+ virtual void postRender() = 0;
+ virtual void resolve() = 0;
+
+}; // ABuffer_I
+} // openspace
+
+#endif // __ABUFFER_I_H__
\ No newline at end of file
diff --git a/include/openspace/abuffer/abufferdynamic.h b/include/openspace/abuffer/abufferdynamic.h
new file mode 100644
index 0000000000..23959f08f1
--- /dev/null
+++ b/include/openspace/abuffer/abufferdynamic.h
@@ -0,0 +1,60 @@
+/*****************************************************************************************
+ * *
+ * OpenSpace *
+ * *
+ * Copyright (c) 2014 *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this *
+ * software and associated documentation files (the "Software"), to deal in the Software *
+ * without restriction, including without limitation the rights to use, copy, modify, *
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
+ * permit persons to whom the Software is furnished to do so, subject to the following *
+ * conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included in all copies *
+ * or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ ****************************************************************************************/
+
+#ifndef __ABUFFERDYNAMIC_H__
+#define __ABUFFERDYNAMIC_H__
+
+#include
+
+namespace openspace {
+
+class ABufferDynamic: public ABuffer {
+public:
+
+ ABufferDynamic();
+ virtual ~ABufferDynamic();
+ virtual bool initialize();
+
+ virtual void clear();
+ virtual void preRender();
+ virtual void postRender();
+
+ virtual std::string settings();
+
+private:
+
+ GLuint *_data;
+ GLuint _anchorPointerTexture;
+ GLuint _anchorPointerTextureInitializer;
+ GLuint _atomicCounterBuffer;
+ GLuint _fragmentBuffer;
+ GLuint _fragmentTexture;
+
+
+
+
+}; // ABufferDynamic
+} // openspace
+
+#endif // __ABUFFERDYNAMIC_H__
\ No newline at end of file
diff --git a/include/openspace/abuffer/abufferfixed.h b/include/openspace/abuffer/abufferfixed.h
new file mode 100644
index 0000000000..cc211e0b57
--- /dev/null
+++ b/include/openspace/abuffer/abufferfixed.h
@@ -0,0 +1,61 @@
+/*****************************************************************************************
+ * *
+ * OpenSpace *
+ * *
+ * Copyright (c) 2014 *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this *
+ * software and associated documentation files (the "Software"), to deal in the Software *
+ * without restriction, including without limitation the rights to use, copy, modify, *
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
+ * permit persons to whom the Software is furnished to do so, subject to the following *
+ * conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included in all copies *
+ * or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
+ * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
+ * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
+ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ ****************************************************************************************/
+
+#ifndef __ABUFFERFIXED_H__
+#define __ABUFFERFIXED_H__
+
+#include
+
+namespace openspace {
+
+class ABufferFixed: public ABuffer {
+public:
+
+ ABufferFixed();
+ virtual ~ABufferFixed();
+ virtual bool initialize();
+
+ virtual void clear();
+ virtual void preRender();
+ virtual void postRender();
+
+ virtual std::string settings();
+
+private:
+
+ GLuint *_data;
+ GLuint _anchorPointerTexture;
+ GLuint _anchorPointerTextureInitializer;
+ GLuint _atomicCounterBuffer;
+ GLuint _atomicCounterTexture;
+ GLuint _fragmentBuffer;
+ GLuint _fragmentTexture;
+
+
+
+
+}; // ABufferFixed
+} // openspace
+
+#endif // __ABUFFERFIXED_H__
\ No newline at end of file
diff --git a/include/openspace/engine/openspaceengine.h b/include/openspace/engine/openspaceengine.h
index ef98decc83..dae55381ab 100644
--- a/include/openspace/engine/openspaceengine.h
+++ b/include/openspace/engine/openspaceengine.h
@@ -27,7 +27,6 @@
#include
#include
-#include
#include
#include
@@ -35,22 +34,25 @@
#include
#include
-//#define FLARE_ONLY
+// #define FLARE_ONLY
#include
+#include
-namespace ghoul {
- namespace cmdparser {
- class CommandlineCommand;
- class CommandlineParser;
- }
-}
+#define ABUFFER_SINGLE_LINKED 1
+#define ABUFFER_FIXED 2
+#define ABUFFER_DYNAMIC 3
+#define ABUFFER_IMPLEMENTATION ABUFFER_SINGLE_LINKED
+
+// #define OPENSPACE_VIDEO_EXPORT
namespace openspace {
+class ScriptEngine;
+
class OpenSpaceEngine {
public:
- static bool create(int argc, char** argv, std::vector& sgctArguments);
+ static void create(int argc, char** argv, std::vector& sgctArguments);
static void destroy();
static OpenSpaceEngine& ref();
@@ -65,7 +67,7 @@ public:
ghoul::opencl::CLContext& clContext();
InteractionHandler& interactionHandler();
RenderEngine& renderEngine();
- scripting::ScriptEngine& scriptEngine();
+ ShaderCreator& shaderBuilder();
// SGCT callbacks
bool initializeGL();
@@ -82,24 +84,25 @@ public:
void decode();
private:
- OpenSpaceEngine(std::string programName);
+ OpenSpaceEngine();
~OpenSpaceEngine();
-
- bool gatherCommandlineArguments();
-
+
static OpenSpaceEngine* _engine;
ghoul::Dictionary* _configurationManager;
InteractionHandler* _interactionHandler;
RenderEngine* _renderEngine;
- scripting::ScriptEngine* _scriptEngine;
- ghoul::cmdparser::CommandlineParser* _commandlineParser;
+#ifdef OPENSPACE_VIDEO_EXPORT
+ bool _doVideoExport;
+#endif
#ifdef FLARE_ONLY
Flare* _flare;
#endif
+ // ScriptEngine* _scriptEngine;
ghoul::opencl::CLContext _context;
sgct::SharedVector _synchronizationBuffer;
+ ShaderCreator _shaderBuilder;
};
#define OsEng (openspace::OpenSpaceEngine::ref())
diff --git a/include/openspace/interaction/interactionhandler.h b/include/openspace/interaction/interactionhandler.h
index b8505beda2..80b867dd91 100644
--- a/include/openspace/interaction/interactionhandler.h
+++ b/include/openspace/interaction/interactionhandler.h
@@ -11,6 +11,8 @@
#include
#include
#include
+#include