mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-03 17:30:04 -05:00
Add a proper blackout to the ScreenSpaceRenderables and a property and codegen option to toggle that behavior (#2868)
This commit is contained in:
@@ -61,7 +61,7 @@ public:
|
||||
ScreenSpaceRenderable(const ghoul::Dictionary& dictionary);
|
||||
virtual ~ScreenSpaceRenderable() override;
|
||||
|
||||
virtual void render();
|
||||
virtual void render(float blackoutFactor);
|
||||
|
||||
virtual bool initialize();
|
||||
virtual bool initializeGL();
|
||||
@@ -102,7 +102,7 @@ protected:
|
||||
glm::vec3 raeToCartesian(const glm::vec3& rae) const;
|
||||
glm::vec3 cartesianToRae(const glm::vec3& cartesian) const;
|
||||
|
||||
void draw(glm::mat4 modelTransform);
|
||||
void draw(glm::mat4 modelTransform, float blackoutFactor);
|
||||
|
||||
virtual void bindTexture() = 0;
|
||||
virtual void unbindTexture();
|
||||
@@ -114,6 +114,7 @@ protected:
|
||||
glm::vec3 sanitizeSphericalCoordinates(glm::vec3 spherical) const;
|
||||
|
||||
properties::BoolProperty _enabled;
|
||||
properties::BoolProperty _renderDuringBlackout;
|
||||
properties::BoolProperty _usePerspectiveProjection;
|
||||
properties::BoolProperty _useRadiusAzimuthElevation;
|
||||
properties::BoolProperty _faceCamera;
|
||||
@@ -140,7 +141,7 @@ protected:
|
||||
properties::TriggerProperty _delete;
|
||||
|
||||
glm::ivec2 _objectSize = glm::ivec2(0);
|
||||
UniformCache(color, opacity, mvp, texture, backgroundColor, gamma,
|
||||
UniformCache(color, opacity, blackoutFactor, mvp, texture, backgroundColor, gamma,
|
||||
borderColor, borderWidth) _uniformCache;
|
||||
std::unique_ptr<ghoul::opengl::ProgramObject> _shader;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user