mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-26 14:08:53 -05:00
Removing more warnings
This commit is contained in:
@@ -202,8 +202,9 @@ void ChunkRenderer::renderChunkGlobally(const Chunk& chunk, const RenderData& da
|
||||
glm::dmat4 inverseModelTransform = chunk.owner().inverseModelTransform();
|
||||
glm::dvec3 cameraPosition = glm::dvec3(
|
||||
inverseModelTransform * glm::dvec4(data.camera.positionVec3(), 1));
|
||||
float distanceScaleFactor = chunk.owner().generalProperties().lodScaleFactor *
|
||||
ellipsoid.minimumRadius();
|
||||
float distanceScaleFactor = static_cast<float>(
|
||||
chunk.owner().generalProperties().lodScaleFactor * ellipsoid.minimumRadius()
|
||||
);
|
||||
programObject->setUniform("cameraPosition", glm::vec3(cameraPosition));
|
||||
programObject->setUniform("distanceScaleFactor", distanceScaleFactor);
|
||||
programObject->setUniform("chunkLevel", chunk.tileIndex().level);
|
||||
@@ -277,8 +278,11 @@ void ChunkRenderer::renderChunkLocally(const Chunk& chunk, const RenderData& dat
|
||||
|
||||
|
||||
if (_layerManager->hasAnyBlendingLayersEnabled()) {
|
||||
float distanceScaleFactor = chunk.owner().generalProperties().lodScaleFactor *
|
||||
chunk.owner().ellipsoid().minimumRadius();
|
||||
float distanceScaleFactor = static_cast<float>(
|
||||
chunk.owner().generalProperties().lodScaleFactor *
|
||||
chunk.owner().ellipsoid().minimumRadius()
|
||||
);
|
||||
|
||||
programObject->setUniform("distanceScaleFactor", distanceScaleFactor);
|
||||
programObject->setUniform("chunkLevel", chunk.tileIndex().level);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace ghoul::opengl { class ProgramObject; }
|
||||
|
||||
namespace openspace::globebrowsing {
|
||||
|
||||
struct LayerAdjustment;
|
||||
class LayerAdjustment;
|
||||
|
||||
class GPULayerAdjustment{
|
||||
public:
|
||||
|
||||
@@ -51,7 +51,12 @@ void GPULayerManager::bind(ghoul::opengl::ProgramObject* programObject,
|
||||
|
||||
for (size_t i = 0; i < layerGroups.size(); ++i) {
|
||||
const std::string& nameBase = layergroupid::LAYER_GROUP_NAMES[i];
|
||||
_gpuLayerGroups[i]->bind(programObject, *layerGroups[i], nameBase, i);
|
||||
_gpuLayerGroups[i]->bind(
|
||||
programObject,
|
||||
*layerGroups[i],
|
||||
nameBase,
|
||||
static_cast<int>(i)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,15 @@ LayerShaderManager::LayerShaderPreprocessingData
|
||||
const LayerGroup& layerGroup = layerManager->layerGroup(i);
|
||||
std::vector<std::shared_ptr<Layer>> layers = layerGroup.activeLayers();
|
||||
|
||||
layeredTextureInfo.lastLayerIdx = layerGroup.activeLayers().size() - 1;
|
||||
// This check was implicit before; not sure if it will fire or will be handled
|
||||
// elsewhere
|
||||
ghoul_assert(
|
||||
!layerGroup.activeLayers().empty(),
|
||||
"If activeLayers is empty the following line will lead to an overflow"
|
||||
);
|
||||
layeredTextureInfo.lastLayerIdx = static_cast<int>(
|
||||
layerGroup.activeLayers().size() - 1
|
||||
);
|
||||
layeredTextureInfo.layerBlendingEnabled = layerGroup.layerBlendingEnabled();
|
||||
|
||||
for (const std::shared_ptr<Layer>& layer : layers) {
|
||||
|
||||
Reference in New Issue
Block a user