mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-29 23:39:26 -05:00
Cleanup and fix for renderablesolarimageyprojection
This commit is contained in:
@@ -260,6 +260,7 @@ void RenderableSolarImagery::updateTextureGPU(bool asyncUpload, bool resChanged)
|
||||
keyframe->data.fullResolution /
|
||||
std::pow(2, static_cast<int>(_downsamplingLevel))
|
||||
);
|
||||
_isCoronaGraph = keyframe->data.isCoronaGraph;
|
||||
_currentScale = keyframe->data.scale;
|
||||
_currentCenterPixel = keyframe->data.centerPixel;
|
||||
_currentImage = &(keyframe->data);
|
||||
@@ -272,6 +273,7 @@ void RenderableSolarImagery::updateTextureGPU(bool asyncUpload, bool resChanged)
|
||||
// No need to re-upload an empty image.
|
||||
return;
|
||||
}
|
||||
_isCoronaGraph = false;
|
||||
_imageSize = 32;
|
||||
_currentScale = 0;
|
||||
_currentCenterPixel = glm::vec2(2.f);
|
||||
|
||||
@@ -58,11 +58,6 @@ RenderableSolarImageryProjection::RenderableSolarImageryProjection(
|
||||
: Renderable(dictionary)
|
||||
, _sphere(6.96701E8f, 100)
|
||||
{
|
||||
if (!dictionary.getValue(SceneGraphNode::KeyIdentifier, _nodeName)) {
|
||||
throw ghoul::RuntimeError("Nodename has to be specified");
|
||||
}
|
||||
|
||||
|
||||
ghoul::Dictionary nodes = dictionary.value<ghoul::Dictionary>(KeyDependentNodes);
|
||||
for (int i = 1; i <= nodes.size(); ++i) {
|
||||
std::string n = nodes.value<std::string>(std::to_string(i));
|
||||
@@ -71,10 +66,6 @@ RenderableSolarImageryProjection::RenderableSolarImageryProjection(
|
||||
}
|
||||
|
||||
void RenderableSolarImageryProjection::initialize() {
|
||||
SceneGraphNode* thisNode = global::renderEngine.scene()->sceneGraphNode(
|
||||
_nodeName
|
||||
);
|
||||
|
||||
for (const std::string& n : _dependentNodes) {
|
||||
SceneGraphNode* depNode = global::renderEngine.scene()->sceneGraphNode(n);
|
||||
if (!depNode) {
|
||||
|
||||
@@ -64,7 +64,6 @@ private:
|
||||
|
||||
std::vector<std::string> _dependentNodes;
|
||||
std::vector<SceneGraphNode*> _solarImageryDependencies;
|
||||
std::string _nodeName;
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -96,7 +96,7 @@ Fragment getFragment() {
|
||||
|
||||
if (renderSurface) {
|
||||
// Yellow-ish. Could discard to get the standard sun texture
|
||||
outColor = vec4(0.93, 0.96, 0.3, 1.0);
|
||||
outColor = vec4(0.2, 0.2, 0.2, 1.0);
|
||||
}
|
||||
|
||||
Fragment frag;
|
||||
|
||||
@@ -250,7 +250,6 @@ ImageMetadata SpacecraftImageryManager::parseJ2kMetadata(
|
||||
return im;
|
||||
}
|
||||
std::string_view bufferView(buffer.data(), size);
|
||||
|
||||
|
||||
auto extractInnerXml = [](std::string_view view, const std::string& elementName) ->
|
||||
std::optional<std::string_view>
|
||||
@@ -386,7 +385,6 @@ ImageMetadata SpacecraftImageryManager::parseJ2kMetadata(
|
||||
return im;
|
||||
}
|
||||
|
||||
|
||||
// This is currently not used. Instead, the parseJ2kMetadata is used,
|
||||
// extracting the data directoy from the JPEG2000 file by naively searching the entire
|
||||
// buffer for metadata, avoiding pre-processing steps.
|
||||
|
||||
Reference in New Issue
Block a user