mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-24 04:58:59 -05:00
Update Ghoul version to accommodate public API bool parameter changes
This commit is contained in:
@@ -84,7 +84,7 @@ ModelGeometry::ModelGeometry(const ghoul::Dictionary& dictionary)
|
||||
}
|
||||
_file = FileSys.absolutePath(_file);
|
||||
|
||||
if (!FileSys.fileExists(_file, true))
|
||||
if (!FileSys.fileExists(_file, ghoul::filesystem::FileSystem::RawPath::Yes))
|
||||
LERROR("Could not load OBJ file '" << _file << "': File not found");
|
||||
|
||||
|
||||
@@ -145,7 +145,10 @@ void ModelGeometry::deinitialize() {
|
||||
}
|
||||
|
||||
bool ModelGeometry::loadObj(const std::string& filename) {
|
||||
std::string cachedFile = FileSys.cacheManager()->cachedFilename(filename, true);
|
||||
std::string cachedFile = FileSys.cacheManager()->cachedFilename(
|
||||
filename,
|
||||
ghoul::filesystem::CacheManager::Persistent::Yes
|
||||
);
|
||||
|
||||
bool hasCachedFile = FileSys.fileExists(cachedFile);
|
||||
if (hasCachedFile) {
|
||||
|
||||
@@ -144,7 +144,8 @@ bool RenderablePlanet::initialize() {
|
||||
if (!_programObject) return false;
|
||||
|
||||
}
|
||||
_programObject->setIgnoreSubroutineUniformLocationError(true);
|
||||
using IgnoreError = ghoul::opengl::ProgramObject::IgnoreError;
|
||||
_programObject->setIgnoreSubroutineUniformLocationError(IgnoreError::Yes);
|
||||
|
||||
loadTexture();
|
||||
_geometry->initialize(this);
|
||||
|
||||
@@ -155,8 +155,9 @@ void RenderableSphere::render(const RenderData& data) {
|
||||
|
||||
|
||||
// Activate shader
|
||||
_shader->activate();
|
||||
_shader->setIgnoreUniformLocationError(true);
|
||||
using IgnoreError = ghoul::opengl::ProgramObject::IgnoreError;
|
||||
_shader->activate();
|
||||
_shader->setIgnoreUniformLocationError(IgnoreError::Yes);
|
||||
|
||||
_shader->setUniform("ViewProjection", data.camera.viewProjectionMatrix());
|
||||
_shader->setUniform("ModelTransform", transform);
|
||||
@@ -174,7 +175,7 @@ void RenderableSphere::render(const RenderData& data) {
|
||||
|
||||
_sphere->render();
|
||||
|
||||
_shader->setIgnoreUniformLocationError(false);
|
||||
_shader->setIgnoreUniformLocationError(IgnoreError::No);
|
||||
_shader->deactivate();
|
||||
}
|
||||
|
||||
|
||||
@@ -206,8 +206,10 @@ void RenderableSphericalGrid::render(const RenderData& data){
|
||||
}
|
||||
|
||||
|
||||
using IgnoreError = ghoul::opengl::ProgramObject::IgnoreError;
|
||||
|
||||
// setup the data to the shader
|
||||
_gridProgram->setIgnoreUniformLocationError(true);
|
||||
_gridProgram->setIgnoreUniformLocationError(IgnoreError::Yes);
|
||||
_gridProgram->setUniform("ViewProjection", data.camera.viewProjectionMatrix());
|
||||
_gridProgram->setUniform("ModelTransform", transform);
|
||||
setPscUniforms(_gridProgram, &data.camera, data.position);
|
||||
|
||||
@@ -191,7 +191,8 @@ void RenderableStars::render(const RenderData& data) {
|
||||
glm::mat4 viewMatrix = data.camera.viewMatrix();
|
||||
glm::mat4 projectionMatrix = data.camera.projectionMatrix();
|
||||
|
||||
_program->setIgnoreUniformLocationError(true);
|
||||
using IgnoreError = ghoul::opengl::ProgramObject::IgnoreError;
|
||||
_program->setIgnoreUniformLocationError(IgnoreError::Yes);
|
||||
//_program->setUniform("ViewProjection", data.camera.viewProjectionMatrix());
|
||||
//_program->setUniform("ModelTransform", glm::mat4(1.f));
|
||||
_program->setUniform("model", modelMatrix);
|
||||
@@ -222,7 +223,8 @@ void RenderableStars::render(const RenderData& data) {
|
||||
glDrawArrays(GL_POINTS, 0, nStars);
|
||||
|
||||
glBindVertexArray(0);
|
||||
_program->setIgnoreUniformLocationError(false);
|
||||
using IgnoreError = ghoul::opengl::ProgramObject::IgnoreError;
|
||||
_program->setIgnoreUniformLocationError(IgnoreError::No);
|
||||
_program->deactivate();
|
||||
|
||||
glDepthMask(true);
|
||||
@@ -343,7 +345,10 @@ void RenderableStars::update(const UpdateData& data) {
|
||||
|
||||
bool RenderableStars::loadData() {
|
||||
std::string _file = _speckFile;
|
||||
std::string cachedFile = FileSys.cacheManager()->cachedFilename(_file, true);
|
||||
std::string cachedFile = FileSys.cacheManager()->cachedFilename(
|
||||
_file,
|
||||
ghoul::filesystem::CacheManager::Persistent::Yes
|
||||
);
|
||||
|
||||
bool hasCachedFile = FileSys.fileExists(cachedFile);
|
||||
if (hasCachedFile) {
|
||||
|
||||
Reference in New Issue
Block a user