Olive
renderfunctions.h
Go to the documentation of this file.
1 /***
2 
3  Olive - Non-Linear Video Editor
4  Copyright (C) 2019 Olive Team
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
19 ***/
20 
21 #ifndef RENDERFUNCTIONS_H
22 #define RENDERFUNCTIONS_H
23 
24 #include <QOpenGLContext>
25 #include <QVector>
26 #include <QOpenGLShaderProgram>
27 
28 #include "project/sequence.h"
29 #include "project/effect.h"
30 
31 #include "panels/viewer.h"
32 
39 
46 
54  QOpenGLContext* ctx;
55 
63 
70  QVector<ClipPtr> nests;
71 
77  bool video;
78 
86 
108 
124 
133 
145  QOpenGLShaderProgram* blend_mode_program;
146 
157  QOpenGLShaderProgram* premultiply_program;
158 
166  GLuint main_buffer;
167 
176 
184 
192 
200 
208 
212  QOpenGLShaderProgram* ocio_shader;
213 
218 };
219 
243 
263 void compose_audio(Viewer* viewer, SequencePtr seq, int playback_speed);
264 
265 #endif // RENDERFUNCTIONS_H
QOpenGLShaderProgram * ocio_shader
OpenGL shader containing OpenColorIO shader information.
Definition: renderfunctions.h:212
QOpenGLShaderProgram * premultiply_program
Premultiply alpha shader.
Definition: renderfunctions.h:157
The ComposeSequenceParams struct.
Definition: renderfunctions.h:38
GLuint compose_sequence(ComposeSequenceParams &params)
Compose a frame of a given sequence.
Definition: renderfunctions.cpp:151
GLuint backend_buffer2
Backend OpenGL framebuffer 2 used for further processing before rendering to main_buffer.
Definition: renderfunctions.h:199
GLuint backend_buffer1
Backend OpenGL framebuffer 1 used for further processing before rendering to main_buffer.
Definition: renderfunctions.h:183
bool texture_failed
A variable that compose_sequence() will set to TRUE if any of the clips couldn't be shown.
Definition: renderfunctions.h:107
QVector< ClipPtr > nests
Array to store the nested sequence hierarchy.
Definition: renderfunctions.h:70
GLuint ocio_lut_texture
OpenGL texture containing LUT obtained form OpenColorIO.
Definition: renderfunctions.h:217
bool video
Set compose mode to video or audio.
Definition: renderfunctions.h:77
GLuint main_attachment
The attachment to the framebuffer in main_buffer.
Definition: renderfunctions.h:175
Viewer * viewer
Reference to the Viewer class that's calling compose_sequence()
Definition: renderfunctions.h:45
std::shared_ptr< Sequence > SequencePtr
Definition: clip.h:48
EffectPtr * gizmos
Set to the Effect whose gizmos were chosen to be drawn on screen.
Definition: renderfunctions.h:85
GLuint main_buffer
The OpenGL framebuffer object that the final texture to be shown is rendered to.
Definition: renderfunctions.h:166
QOpenGLShaderProgram * blend_mode_program
Blending mode shader.
Definition: renderfunctions.h:145
int playback_speed
Set the current playback speed (adjusted with Shuttle Left/Right)
Definition: renderfunctions.h:132
GLuint backend_attachment2
Backend OpenGL framebuffer 2's texture attachment.
Definition: renderfunctions.h:207
SequencePtr seq
The sequence to compose.
Definition: renderfunctions.h:62
std::shared_ptr< Effect > EffectPtr
Definition: effect.h:48
Definition: viewer.h:43
QOpenGLContext * ctx
The OpenGL context to use while rendering.
Definition: renderfunctions.h:54
GLuint backend_attachment1
Backend OpenGL framebuffer 1's texture attachment.
Definition: renderfunctions.h:191
void compose_audio(Viewer *viewer, SequencePtr seq, int playback_speed)
Convenience wrapper function for compose_sequence() to render audio.
Definition: renderfunctions.cpp:639
bool single_threaded
Run all cachers in the same thread that compose_sequence() is in.
Definition: renderfunctions.h:123