-
Notifications
You must be signed in to change notification settings - Fork 0
/
openglwidget.h
46 lines (37 loc) · 971 Bytes
/
openglwidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef OPENGLWIDGET_H
#define OPENGLWIDGET_H
#include <QGLWidget>
#include <QGLFunctions>
#include "datasink.h"
#include "vclinxvideocapture.h"
class OpenGLWidget : public QGLWidget, public QGLFunctions
{
Q_OBJECT
protected:
DataSink localVideoBuffer;
unsigned char* localVideoBufferDrawer;
/* Shader ID's */
//GLuint local_yuv_shader;
GLuint vertexShader;
GLuint fragmentShader;
GLuint program;
bool supports_npot;
bool multiTexture;
bool stretchScreen;
bool support_vsync;
GLuint textures[3];
GLint linked;
void drawLocal();
void loadFile(const char *fn, std::string &str);
void loadShader();
VCLinxVideoCapture videoCapturer;
public:
OpenGLWidget(QWidget *parent = 0);
~OpenGLWidget();
virtual void resizeGL(int w, int h);
virtual void paintGL();
virtual void initializeGL();
public slots:
void receiveLocalVideoImg(VideoImage* img);
};
#endif // OPENGLWIDGET_H