mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-23 12:39:24 -05:00
Issue/24 (#549)
* Implemented property animation mechanism * Added easing functions to Ghoul and make them usable in animation * Make sure that we don't leave properties around if SceneGraphNodes are deleted * Adding opacity settings to base renderables
This commit is contained in:
@@ -137,6 +137,9 @@ RenderableSphericalGrid::RenderableSphericalGrid(const ghoul::Dictionary& dictio
|
||||
"RenderableSphericalGrid"
|
||||
);
|
||||
|
||||
addProperty(_opacity);
|
||||
registerUpdateRenderBinFromOpacity();
|
||||
|
||||
if (dictionary.hasKey(GridMatrixInfo.identifier)) {
|
||||
_gridMatrix = dictionary.value<glm::dmat4>(GridMatrixInfo.identifier);
|
||||
}
|
||||
@@ -210,6 +213,8 @@ void RenderableSphericalGrid::deinitializeGL() {
|
||||
void RenderableSphericalGrid::render(const RenderData& data, RendererTasks&){
|
||||
_gridProgram->activate();
|
||||
|
||||
_gridProgram->setUniform("opacity", _opacity);
|
||||
|
||||
glm::dmat4 modelTransform =
|
||||
glm::translate(glm::dmat4(1.0), data.modelTransform.translation) * // Translation
|
||||
glm::dmat4(data.modelTransform.rotation) * // Spice rotation
|
||||
|
||||
Reference in New Issue
Block a user