renderer: moved all shader code into one solidified function

Makes texture-based optimizations easier when they're all in one place.
This commit is contained in:
itsmattkc
2020-06-10 01:54:02 +10:00
parent 29537fea3c
commit 71ec148e76
35 changed files with 274 additions and 191 deletions
+5 -5
View File
@@ -32,31 +32,31 @@ Block::Block() :
next_(nullptr)
{
name_input_ = new NodeInput("name_in", NodeParam::kString);
name_input_->SetConnectable(false);
name_input_->set_connectable(false);
name_input_->set_is_keyframable(false);
AddInput(name_input_);
length_input_ = new NodeInput("length_in", NodeParam::kRational);
length_input_->SetConnectable(false);
length_input_->set_connectable(false);
length_input_->set_is_keyframable(false);
AddInput(length_input_);
disconnect(length_input_, &NodeInput::ValueChanged, this, &Block::InputChanged);
connect(length_input_, &NodeInput::ValueChanged, this, &Block::LengthInputChanged);
media_in_input_ = new NodeInput("media_in_in", NodeParam::kRational);
media_in_input_->SetConnectable(false);
media_in_input_->set_connectable(false);
media_in_input_->set_is_keyframable(false);
AddInput(media_in_input_);
enabled_input_ = new NodeInput("enabled_in", NodeParam::kBoolean);
enabled_input_->SetConnectable(false);
enabled_input_->set_connectable(false);
enabled_input_->set_is_keyframable(false);
enabled_input_->set_standard_value(true);
AddInput(enabled_input_);
speed_input_ = new NodeInput("speed_in", NodeParam::kRational);
speed_input_->set_standard_value(QVariant::fromValue(rational(1)));
speed_input_->SetConnectable(false);
speed_input_->set_connectable(false);
speed_input_->set_is_keyframable(false);
AddInput(speed_input_);
+1 -1
View File
@@ -113,7 +113,7 @@ void ClipBlock::Retranslate()
void ClipBlock::Hash(QCryptographicHash &hash, const rational &time) const
{
if (texture_input_->IsConnected()) {
if (texture_input_->is_connected()) {
rational t = InputTimeAdjustment(texture_input_, TimeRange(time, time)).in();
texture_input_->get_connected_node()->Hash(hash, t);
+2 -2
View File
@@ -139,11 +139,11 @@ void TransitionBlock::Hash(QCryptographicHash &hash, const rational &time) const
hash.addData(reinterpret_cast<const char*>(&in_prog), sizeof(double));
hash.addData(reinterpret_cast<const char*>(&out_prog), sizeof(double));
if (out_block_input_->IsConnected()) {
if (out_block_input_->is_connected()) {
out_block_input_->get_connected_node()->Hash(hash, time);
}
if (in_block_input_->IsConnected()) {
if (in_block_input_->is_connected()) {
in_block_input_->get_connected_node()->Hash(hash, time);
}
}