Merge remote-tracking branch 'origin/kameleon' into properties

This commit is contained in:
Alexander Bock
2014-05-02 16:59:50 +02:00
28 changed files with 806 additions and 105 deletions

View File

@@ -44,6 +44,7 @@ public:
protected:
std::string findPath(const std::string& path);
ghoul::opengl::Texture* loadVolume(const std::string& filepath, const ghoul::Dictionary& hintsDictionary);
ghoul::RawVolumeReader::ReadHints readHints(const ghoul::Dictionary& dictionary);
ghoul::opengl::Texture* loadTransferFunction(const std::string& filepath);

View File

@@ -43,6 +43,10 @@
#define SGCT_WINDOWS_INCLUDE
#include <sgct.h>
namespace sgct_utils {
class SGCTBox;
}
//#include <vector>
//#include <string>
#ifdef __APPLE__

View File

@@ -37,7 +37,6 @@
#include <ghoul/opencl/clcommandqueue.h>
#include <ghoul/opencl/clprogram.h>
#include <ghoul/opencl/clkernel.h>
#include <ghoul/io/rawvolumereader.h>
#include <ghoul/filesystem/file.h>
#ifdef __APPLE__
@@ -75,7 +74,7 @@ private:
// Volumes
std::vector<std::string> _volumePaths;
std::vector<ghoul::RawVolumeReader::ReadHints> _volumeHints;
std::vector<ghoul::Dictionary> _volumeHints;
// Textures
ghoul::opengl::Texture* _output;
@@ -98,6 +97,8 @@ private:
ghoul::opencl::CLWorkSize* _ws;
ghoul::filesystem::File* _kernelSourceFile;
std::vector<std::pair<ghoul::opencl::CLProgram::Option, bool> > _kernelOptions;
std::vector<std::string> _kernelIncludes;
std::vector<std::pair<std::string,std::string> > _kernelDefinitions;
bool _programUpdateOnSave;
// mutexes to prevent inconsistencies
@@ -105,10 +106,10 @@ private:
std::mutex* _textureLock;
ghoul::opengl::ProgramObject *_quadProgram;
sgct_utils::SGCTBox* _boundingBox;
GLuint _screenQuad;
VolumeRaycasterBox* _colorBoxRenderer;
glm::vec3 _boxScaling;
};

View File

@@ -44,6 +44,10 @@
#include <mutex>
#endif
namespace sgct_utils {
class SGCTBox;
}
namespace openspace {
class RenderableVolumeGL: public RenderableVolume {

View File

@@ -25,13 +25,18 @@
#ifndef VOLUMERAYCASTERBOX_H_
#define VOLUMERAYCASTERBOX_H_
#include <ghoul/opengl/programobject.h>
#include <ghoul/opengl/framebufferobject.h>
#include <ghoul/opengl/texture.h>
// forward declare private objects
namespace sgct_utils {
class SGCTBox;
}
namespace ghoul {
namespace opengl {
class FramebufferObject;
class ProgramObject;
}
}
namespace openspace {
@@ -40,7 +45,7 @@ public:
VolumeRaycasterBox();
~VolumeRaycasterBox();
bool initialize();
void render(glm::mat4 MVP);
void render(const glm::mat4& MVP);
ghoul::opengl::Texture* backFace();
ghoul::opengl::Texture* frontFace();
@@ -56,5 +61,5 @@ private:
glm::size2_t _dimensions;
};
} /* namespace openspace */
#endif /* VOLUMERAYCASTERBOX_H_ */
} // namespace openspace
#endif // VOLUMERAYCASTERBOX_H_