Showing the changes to interface/src/MetavoxelSystem.cpp (1 of 29 files). Show all
Unified · Split
| @@ -26,6 +26,7 @@ · 25 unmodified lines | |||
| 26 | 26 | ||
| 27 | #include <MetavoxelMessages.h> | 27 | #include <MetavoxelMessages.h> |
| 28 | #include <MetavoxelUtil.h> | 28 | #include <MetavoxelUtil.h> |
| 29 | #include <PathUtils.h> | ||
| 29 | #include <ScriptCache.h> | 30 | #include <ScriptCache.h> |
| 30 | 31 | ||
| 31 | #include "Application.h" | 32 | #include "Application.h" |
| @@ -63,9 +64,9 @@ void MetavoxelSystem::init() { · 31 unmodified lines | |||
| 63 | _voxelBufferAttribute->setLODThresholdMultiplier( | 64 | _voxelBufferAttribute->setLODThresholdMultiplier( |
| 64 | AttributeRegistry::getInstance()->getVoxelColorAttribute()->getLODThresholdMultiplier()); | 65 | AttributeRegistry::getInstance()->getVoxelColorAttribute()->getLODThresholdMultiplier()); |
| 65 | 66 | ||
| 66 | _baseHeightfieldProgram.addShaderFromSourceFile(QGLShader::Vertex, Application::resourcesPath() + | 67 | _baseHeightfieldProgram.addShaderFromSourceFile(QGLShader::Vertex, PathUtils::resourcesPath() + |
| 67 | "shaders/metavoxel_heightfield_base.vert"); | 68 | "shaders/metavoxel_heightfield_base.vert"); |
| 68 | _baseHeightfieldProgram.addShaderFromSourceFile(QGLShader::Fragment, Application::resourcesPath() + | 69 | _baseHeightfieldProgram.addShaderFromSourceFile(QGLShader::Fragment, PathUtils::resourcesPath() + |
| 69 | "shaders/metavoxel_heightfield_base.frag"); | 70 | "shaders/metavoxel_heightfield_base.frag"); |
| 70 | _baseHeightfieldProgram.link(); | 71 | _baseHeightfieldProgram.link(); |
| 71 | 72 | ||
| @@ -78,9 +79,9 @@ void MetavoxelSystem::init() { · 6 unmodified lines | |||
| 78 | 79 | ||
| 79 | loadSplatProgram("heightfield", _splatHeightfieldProgram, _splatHeightfieldLocations); | 80 | loadSplatProgram("heightfield", _splatHeightfieldProgram, _splatHeightfieldLocations); |
| 80 | 81 | ||
| 81 | _heightfieldCursorProgram.addShaderFromSourceFile(QGLShader::Vertex, Application::resourcesPath() + | 82 | _heightfieldCursorProgram.addShaderFromSourceFile(QGLShader::Vertex, PathUtils::resourcesPath() + |
| 82 | "shaders/metavoxel_heightfield_cursor.vert"); | 83 | "shaders/metavoxel_heightfield_cursor.vert"); |
| 83 | _heightfieldCursorProgram.addShaderFromSourceFile(QGLShader::Fragment, Application::resourcesPath() + | 84 | _heightfieldCursorProgram.addShaderFromSourceFile(QGLShader::Fragment, PathUtils::resourcesPath() + |
| 84 | "shaders/metavoxel_cursor.frag"); | 85 | "shaders/metavoxel_cursor.frag"); |
| 85 | _heightfieldCursorProgram.link(); | 86 | _heightfieldCursorProgram.link(); |
| 86 | 87 | ||
| @@ -88,17 +89,17 @@ void MetavoxelSystem::init() { · 1 unmodified line | |||
| 88 | _heightfieldCursorProgram.setUniformValue("heightMap", 0); | 89 | _heightfieldCursorProgram.setUniformValue("heightMap", 0); |
| 89 | _heightfieldCursorProgram.release(); | 90 | _heightfieldCursorProgram.release(); |
| 90 | 91 | ||
| 91 | _baseVoxelProgram.addShaderFromSourceFile(QGLShader::Vertex, Application::resourcesPath() + | 92 | _baseVoxelProgram.addShaderFromSourceFile(QGLShader::Vertex, PathUtils::resourcesPath() + |
| 92 | "shaders/metavoxel_voxel_base.vert"); | 93 | "shaders/metavoxel_voxel_base.vert"); |
| 93 | _baseVoxelProgram.addShaderFromSourceFile(QGLShader::Fragment, Application::resourcesPath() + | 94 | _baseVoxelProgram.addShaderFromSourceFile(QGLShader::Fragment, PathUtils::resourcesPath() + |
| 94 | "shaders/metavoxel_voxel_base.frag"); | 95 | "shaders/metavoxel_voxel_base.frag"); |
| 95 | _baseVoxelProgram.link(); | 96 | _baseVoxelProgram.link(); |
| 96 | 97 | ||
| 97 | loadSplatProgram("voxel", _splatVoxelProgram, _splatVoxelLocations); | 98 | loadSplatProgram("voxel", _splatVoxelProgram, _splatVoxelLocations); |
| 98 | 99 | ||
| 99 | _voxelCursorProgram.addShaderFromSourceFile(QGLShader::Vertex, Application::resourcesPath() + | 100 | _voxelCursorProgram.addShaderFromSourceFile(QGLShader::Vertex, PathUtils::resourcesPath() + |
| 100 | "shaders/metavoxel_voxel_cursor.vert"); | 101 | "shaders/metavoxel_voxel_cursor.vert"); |
| 101 | _voxelCursorProgram.addShaderFromSourceFile(QGLShader::Fragment, Application::resourcesPath() + | 102 | _voxelCursorProgram.addShaderFromSourceFile(QGLShader::Fragment, PathUtils::resourcesPath() + |
| 102 | "shaders/metavoxel_cursor.frag"); | 103 | "shaders/metavoxel_cursor.frag"); |
| 103 | _voxelCursorProgram.link(); | 104 | _voxelCursorProgram.link(); |
| 104 | } | 105 | } |
| @@ -836,9 +837,9 @@ void MetavoxelSystem::guideToAugmented(MetavoxelVisitor& visitor, bool render) { · 731 unmodified lines | |||
| 836 | } | 837 | } |
| 837 | 838 | ||
| 838 | void MetavoxelSystem::loadSplatProgram(const char* type, ProgramObject& program, SplatLocations& locations) { | 839 | void MetavoxelSystem::loadSplatProgram(const char* type, ProgramObject& program, SplatLocations& locations) { |
| 839 | program.addShaderFromSourceFile(QGLShader::Vertex, Application::resourcesPath() + | 840 | program.addShaderFromSourceFile(QGLShader::Vertex, PathUtils::resourcesPath() + |
| 840 | "shaders/metavoxel_" + type + "_splat.vert"); | 841 | "shaders/metavoxel_" + type + "_splat.vert"); |
| 841 | program.addShaderFromSourceFile(QGLShader::Fragment, Application::resourcesPath() + | 842 | program.addShaderFromSourceFile(QGLShader::Fragment, PathUtils::resourcesPath() + |
| 842 | "shaders/metavoxel_" + type + "_splat.frag"); | 843 | "shaders/metavoxel_" + type + "_splat.frag"); |
| 843 | program.link(); | 844 | program.link(); |
| 844 | 845 | ||