added slider widget
This commit is contained in:
@@ -25,8 +25,7 @@
|
||||
#include "render/rendertexture.h"
|
||||
#include "render/gl/shadergenerators.h"
|
||||
|
||||
AlphaOverBlend::AlphaOverBlend() :
|
||||
shader_(nullptr)
|
||||
AlphaOverBlend::AlphaOverBlend()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -48,7 +47,6 @@ QString AlphaOverBlend::Description()
|
||||
|
||||
void AlphaOverBlend::Release()
|
||||
{
|
||||
shader_ = nullptr;
|
||||
}
|
||||
|
||||
QVariant AlphaOverBlend::Value(NodeOutput *param, const rational &time)
|
||||
@@ -76,14 +74,8 @@ QVariant AlphaOverBlend::Value(NodeOutput *param, const rational &time)
|
||||
// Bind blend
|
||||
blend->Bind();
|
||||
|
||||
// Get default pipeline shader
|
||||
// FIXME: Come up with a good way to share pipeline shaders since a lot of nodes will just use the default
|
||||
if (shader_ == nullptr) {
|
||||
shader_ = olive::ShaderGenerator::DefaultPipeline();
|
||||
}
|
||||
|
||||
// Draw blend on base
|
||||
olive::gl::Blit(shader_);
|
||||
olive::gl::Blit(renderer->default_pipeline());
|
||||
|
||||
// Release all
|
||||
blend->Release();
|
||||
|
||||
@@ -39,7 +39,6 @@ protected:
|
||||
virtual QVariant Value(NodeOutput* param, const rational& time) override;
|
||||
|
||||
private:
|
||||
ShaderPtr shader_;
|
||||
};
|
||||
|
||||
#endif // ALPHAOVER_H
|
||||
|
||||
@@ -28,6 +28,7 @@ OpacityNode::OpacityNode()
|
||||
{
|
||||
opacity_input_ = new NodeInput("opacity_in");
|
||||
opacity_input_->add_data_input(NodeParam::kFloat);
|
||||
opacity_input_->set_value(100);
|
||||
AddParameter(opacity_input_);
|
||||
|
||||
texture_input_ = new NodeInput("tex_in");
|
||||
|
||||
Reference in New Issue
Block a user