mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06: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:
@@ -111,6 +111,9 @@ RenderablePlane::RenderablePlane(const ghoul::Dictionary& dictionary)
|
||||
"RenderablePlane"
|
||||
);
|
||||
|
||||
addProperty(_opacity);
|
||||
registerUpdateRenderBinFromOpacity();
|
||||
|
||||
_size = static_cast<float>(dictionary.value<double>(SizeInfo.identifier));
|
||||
|
||||
if (dictionary.hasKey(BillboardInfo.identifier)) {
|
||||
@@ -185,6 +188,8 @@ void RenderablePlane::deinitializeGL() {
|
||||
void RenderablePlane::render(const RenderData& data, RendererTasks&) {
|
||||
_shader->activate();
|
||||
|
||||
_shader->setUniform("opacity", _opacity);
|
||||
|
||||
// Model transform and view transform needs to be in double precision
|
||||
const glm::dmat4 rotationTransform = _billboard ?
|
||||
glm::inverse(glm::dmat4(data.camera.viewRotationMatrix())) :
|
||||
|
||||
Reference in New Issue
Block a user