mathnode: implemented add/subtract/multiply/divide/power functions

Includes implementing combobox UI for the NodeParamViewWidgetBridge.
This commit is contained in:
itsmattkc
2020-04-15 01:52:24 +10:00
parent fd1ecfae6f
commit a0a7d106dc
15 changed files with 451 additions and 88 deletions
+4 -1
View File
@@ -67,7 +67,7 @@ bool OpenGLProxy::Init()
return true;
}
void OpenGLProxy::FrameToValue(FramePtr frame, StreamPtr stream, const TimeRange &range, NodeValueTable* table)
void OpenGLProxy::FrameToValue(FramePtr frame, StreamPtr stream, NodeValueTable* table)
{
// Ensure stream is video or image type
if (stream->type() != Stream::kVideo && stream->type() != Stream::kImage) {
@@ -289,6 +289,9 @@ void OpenGLProxy::RunNodeAccelerated(const Node *node, const TimeRange &range, c
case NodeInput::kMatrix:
shader->setUniformValue(variable_location, value.value<QMatrix4x4>());
break;
case NodeInput::kCombo:
shader->setUniformValue(variable_location, value.value<int>());
break;
case NodeInput::kColor:
{
Color color = value.value<Color>();
+1 -1
View File
@@ -63,7 +63,7 @@ public:
void Close();
void FrameToValue(FramePtr frame, StreamPtr stream, const TimeRange &range, NodeValueTable* table);
void FrameToValue(FramePtr frame, StreamPtr stream, NodeValueTable* table);
void RunNodeAccelerated(const Node *node, const TimeRange &range, const NodeValueDatabase &input_params, NodeValueTable* output_params);
+1 -1
View File
@@ -41,7 +41,7 @@ void OpenGLWorker::FrameToValue(DecoderPtr decoder, StreamPtr stream, const Time
FramePtr frame = decoder->RetrieveVideo(range.in(), video_params().divider());
if (frame) {
emit RequestFrameToValue(frame, stream, range, table);
emit RequestFrameToValue(frame, stream, table);
}
}
+1 -1
View File
@@ -38,7 +38,7 @@ public:
QObject* parent = nullptr);
signals:
void RequestFrameToValue(FramePtr frame, StreamPtr stream, const TimeRange &range, NodeValueTable* table);
void RequestFrameToValue(FramePtr frame, StreamPtr stream, NodeValueTable* table);
void RequestRunNodeAccelerated(const Node *node, const TimeRange &range, const NodeValueDatabase &input_params, NodeValueTable* output_params);